qrisp.interface.Backend.run_async#
- abstractmethod Backend.run_async(circuits: QuantumCircuit | Sequence[QuantumCircuit], shots: int | list[int] | None = None) Job[source]#
Submit one or more circuits for execution and return a
Job.The returned job must not be in
INITIALIZINGstate: by the timerun_asyncreturns, execution must have been handed off to the backend. The exact state the job enters depends on the backend type:QUEUED: for asynchronous or remote backends where the job waits in a queue before execution begins.RUNNINGorDONE: for synchronous simulators that begin (or complete) execution before returning.
- Parameters:
- circuitsQuantumCircuit or Sequence[QuantumCircuit]
A single circuit or a sequence of circuits to execute. No validation or introspection is performed at the base-class level.
When a sequence is provided, the backend decides internally how to handle the circuit execution. Hardware backends may impose a limit on how many circuits a single job may contain. This is a backend-defined constraint.
- shotsint or list[int] or None, optional
Number of shots (repetitions) for the execution. If
None, the value from the backend’s runtime options should be used. When alist[int]is provided, each entry specifies the shot count for the circuit at the corresponding index.Backends whose SDK does not natively support per-circuit shot counts should fall back to
max(shots)and issue aUserWarning.
- Returns:
- Job
A handle to the submitted execution. Call
Job.resultto wait for completion and retrieve theJobResult.