Sampler inputs and outputs
หน้านี้ยังไม่ได้รับการแปล คุณกำลังดูเวอร์ชันต้นฉบับภาษาอังกฤษ
Package versions
The code on this page was developed using the following requirements. We recommend using these versions or newer.
qiskit[all]~=2.4.0
qiskit-ibm-runtime~=0.46.1
This page gives an overview of the inputs and outputs of the Qiskit Runtime Sampler primitive, which executes workloads on IBM Quantum® compute resources. Sampler lets you efficiently define vectorized workloads by using a data structure known as a Primitive Unified Bloc (PUB). They are used as inputs to the run() method for the Sampler primitive, which executes the defined workload as a job. Then, after the job has completed, the results are returned in a format that is dependent on both the PUBs used as well as the runtime options specified from the primitive.
Inputs
Each PUB is in the format:
(<single circuit>, <one or more optional parameter value>, <optional shots>),
There can be multiple parameter values items, and each item can be either an array or a single parameter, depending on the chosen circuit. Additionally, the input must contain measurements.
For the Sampler primitive, a PUB can contain at most three values:
- A single
QuantumCircuit, which may contain one or moreParameterobjects Note: These circuits should also include measurement instructions for each of the qubits to be sampled. - A collection of parameter values to bind the circuit against