Introduction to primitives
Primitives were created to simplify the most common tasks for quantum computers: namely, sampling quantum states and calculating expectation values. The first Qiskit Runtime primitives (EstimatorV2 and SamplerV2) are implementations of the Qiskit primitives base classes. They provide a more sophisticated implementation (for example, by including error mitigation) as a cloud-based service and are used to access IBM Quantum® hardware.
The newest Qiskit Runtime primitive, Executor (which is in beta), provides a lower-level interface that gives more visibility and control without sacrificing performance.
Computes the expectation values for one or more observables with respect to states prepared by quantum circuits. Has built-in error suppression and mitigation methods.
Get started with Estimator
Samples the output register from the execution of one or more quantum circuits.
Get started with Sampler
Next steps
- Learn about the Qiskit primitives that the Qiskit Runtime primitives are based on.
- Review detailed Estimator or Sampler examples.
- See the input and output details for Estimator or Sampler.
- Practice with primitives by working through the Cost function lesson in IBM Quantum Learning.
- See the EstimatorV2 API reference and SamplerV2 API reference.
- Read Migrate to V2 primitives.