Haiqu.run(circuits: QuantumCircuit | list[QuantumCircuit] | CircuitModel | list[CircuitModel], parameters: list | None = None, shots: int = 1000, observables: SparsePauliOp | list[SparsePauliOp] | list[list[SparsePauliOp]] | None = None, device: DeviceModel | None = None, device_id: str | None = None, options: dict | None = None, use_mitigation: bool = False, job_name: str | None = None, job_description: str | None = None) → RunJobModel
Run quantum circuits on the selected backend. This flexible method supports multiple execution scenarios, with different combinations of circuits, parameters, and observables. When multiple values are provided for any of them, the results are returned as nested lists with up to 3 layers, ordered by circuits, then observables, and finally parameters.- Parameters:
- circuits — The quantum circuit(s) to execute. Can be a single circuit or a list of circuits.
- parameters — The parameters for the circuits. Can be a single set of parameters or nested lists of parameter sets. For
multiple circuits, must be a list where each element corresponds to parameters for that circuit. Defaults
to
None, in which case the circuits must not have any parameters. - shots (int) — The number of shots for each circuit execution. Defaults to 1000.
- observables — The observable(s) to measure. The order of Pauli terms follows the Qiskit reversed-order convention. Can
be a single
SparsePauliOpor nested lists ofSparsePauliOp. For multiple circuits, must be a list where each element corresponds to observables for that circuit. Defaults toNone, in which case the circuits must include their own measurements. - device (DeviceModel | None) — The device to run the circuits on. If specified,
device_idis ignored. - device_id (str | None) — The ID of the device to run the circuits on. Defaults to
None. - options (dict | None) — Options to pass to the device.
- use_mitigation (bool) — Whether to use error mitigation techniques. Defaults to
False. - job_name (str | None) — The name for the job. If
None(default), a name will be automatically generated. - job_description (str | None) — The description for the job.
- Returns: The Run job that will execute the circuit. : Call .result() to get measurement distributions (bitstrings in Qiskit convention).
- Return type: RunJobModel