deltakit.explorer.qpu.NativeGateSetAndTimes#

class deltakit.explorer.qpu.NativeGateSetAndTimes(one_qubit_gates: dict[type[OneQubitCliffordGate], float] | None = None, two_qubit_gates: dict[type[TwoOperandGate], float] | None = None, reset_gates: dict[type[OneQubitResetGate], float] | None = None, measurement_gates: dict[type[MX | MY | MZ | MRX | MRY | MRZ | HERALD_LEAKAGE_EVENT | MPP], float] | None = None)#

Bases: object

Class for capturing native gate sets of a quantum computer and times of gate execution (in seconds).

Parameters:
  • one_qubit_gates (Optional[Dict[Type[OneQubitCliffordGate], float]]) – Dictionary of the one-qubit gates available on the quantum computer and the associated gate times. By default, the gates are those in DEFAULT_ONE_QUBIT_GATES with times all equal to 1.0.

  • two_qubit_gates (Optional[Dict[Type[TwoOperandGate], float]]) – Dictionary of the two-qubit gates available on the quantum computer and the associated gate times. By default, the gates are those in DEFAULT_TWO_QUBIT_GATES with times all equal to 1.0.

  • reset_gates (Optional[Dict[Type[OneQubitResetGate], float]]) – Dictionary of the reset gates available on the quantum computer and the associated gate times. By default, the gates are those in DEFAULT_RESET_GATES with times all equal to 1.0.

  • measurement_gates (Optional[Dict[Type[_MeasurementGate], float]]) – Dictionary of the one-qubit measurement gates available on the quantum computer and the associated gate times. By default, the gates are those in DEFAULT_MEASUREMENT_GATES with times all equal to 1.0.

Raises:
  • ValueError – If any supplied one-qubit gate is not a valid one-qubit gate.

  • ValueError – If any supplied two-qubit gate is not a valid two-qubit gate.

  • ValueError – If any supplied reset gate is not a valid reset gate.

  • ValueError – If any supplied measurement gate is not a valid one-qubit measurement gate.

  • ValueError

  • ValueError – If any time is not a positive float.

Methods#

NativeGateSetAndTimes.add_gate

Add a gate and associated time to the native gate set.

NativeGateSetAndTimes.from_times

Assign times to gates based on class (1-qubit, 2-qubit, reset, measurement).