qrisp.interface.BatchedBackend.run#

BatchedBackend.run(circuits: QuantumCircuit, shots: int | None = None) MeasurementResult[source]#
BatchedBackend.run(circuits: Sequence[QuantumCircuit], shots: int | None = None) list[MeasurementResult]

Register one or more circuits in the queue and return lazy result(s).

Each circuit is stored alongside its shot count. The corresponding MeasurementResult objects are empty until dispatch() is called.

Parameters:
circuitsQuantumCircuit or Sequence[QuantumCircuit]

One circuit or a sequence of circuits to include in the batch.

shotsint or None

Number of shots. Defaults to the backend’s shots option.

Returns:
MeasurementResult or list[MeasurementResult]

A single lazy result for a single circuit, or a list of lazy results when multiple circuits are given.