deltakit.explorer.qpu.QPU#

class deltakit.explorer.qpu.QPU(qubits: ~collections.abc.Iterable[~deltakit_circuit._qubit_identifiers.Qubit], native_gates_and_times: ~deltakit_explorer.qpu._native_gate_set.NativeGateSetAndTimes = <deltakit_explorer.qpu._native_gate_set.NativeGateSetAndTimes object>, noise_model: ~deltakit_explorer.qpu._noise._noise_parameters.NoiseParameters = NoiseParameters(gate_noise=[], idle_noise=None, reset_noise=[], measurement_noise_after=[], measurement_noise_before=[], measurement_flip={}), maximise_parallelism: bool = True)#

Bases: object

Class capturing properties and functionality of a QPU. The class can compile a circuit to the device’s native gates and add noise to a circuit corresponding to the device’s noise model.

Parameters:
  • qubits (Set[Qubit]) – The device qubits.

  • native_gates_and_times (NativeGateSetAndTimes) – The native gates (including measurement and reset) and the time they take to apply.

  • noise_model (NoiseParameters) – The noise associated with operations on the QPU.

  • maximise_parallelism (bool, optional) – Whether to do as many gates in parallel as possible (True) or only to perform gates in parallel if they are in the same GateLayer (False). By default, True.

Methods#

QPU.add_noise_to_circuit

Add noise to the supplied circuit based on the QPU's noise model.

QPU.compile_and_add_noise_to_circuit

Compile the supplied circuit so that it uses the QPU's native gates and add noise based on the QPU's noise model.

QPU.compile_circuit

Compile the supplied circuit so that it uses the QPU's native gates.

QPU.from_circuit_compile_and_add_noise

Compile the supplied circuit with a given noise model on an unconstrained QPU which, by default, supports all gates natively.

QPU.get_circuit_execution_time

Compute the total circuit execution time (in seconds), given a compiled circuit.