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
Samples output registers from quantum circuit executions based on input directives and gives you full control and transparency over customizing error mitigation methods.
Get started with Executor
Next steps
- Learn about the Qiskit primitives that the Qiskit Runtime primitives are based on.
- Review detailed Estimator, Sampler, or Executor examples.
- See the input and output details for Estimator, Executor, and Sampler.
- Practice with primitives by working through the Cost function lesson in IBM Quantum Learning.
- See the EstimatorV2 API reference, SamplerV2 API reference, and Executor API reference.
- Read Migrate to V2 primitives.