GateCalibrations

class braket.circuits.gate_calibrations.GateCalibrations(pulse_sequences)[source]

Bases: object

An object containing gate calibration data. The data represents the mapping on a particular gate on a set of qubits to its calibration to be used by a quantum device. This is represented by a dictionary with keys of Tuple(Gate, QubitSet) mapped to a PulseSequence.

Parameters:

pulse_sequences (dict[tuple[Gate, QubitSet], PulseSequence])

Inits a GateCalibrations.

Parameters:

pulse_sequences (dict[tuple[Gate, QubitSet], PulseSequence]) – A mapping containing a key of (Gate, QubitSet) mapped to the corresponding pulse sequence.

property pulse_sequences: dict[tuple[Gate, QubitSet], PulseSequence]

Gets the mapping of (Gate, Qubit) to the corresponding PulseSequence.

Returns:

dict[tuple[Gate, QubitSet], PulseSequence] – The calibration data Dictionary.

copy()[source]

Returns a copy of the object.

Return type:

GateCalibrations

Returns:

GateCalibrations – a copy of the calibrations.

filter(gates=None, qubits=None)[source]

Filters the data based on optional lists of gates and QubitSets.

Parameters:
  • gates (list[Gate] | None) – An optional list of gates to filter on.

  • qubits (QubitSet | list[QubitSet] | None) – An optional QubitSet or list of QubitSet to filter on.

Return type:

GateCalibrations

Returns:

GateCalibrations – A filtered GateCalibrations object.

to_ir(calibration_key=None)[source]

Returns the defcal representation for the GateCalibrations object.

Parameters:

calibration_key (tuple[Gate, QubitSet] | None) – An optional key to get a specific defcal. Default: None

Raises:

ValueError – Key does not exist in the GateCalibrations object.

Return type:

str

Returns:

str – the defcal string for the object.