qat.purr.compiler.hardware_models module
- class ErrorMitigation(readout_mitigation=None)
Bases:
Calibratable
- class HardwareModel(shot_limit=-1)
Bases:
object
Base class for all hardware models. Every model should return the builder class that should be used to build circuits/pulses for its particular back-end.
- create_builder()
- Return type:
- create_engine()
- Return type:
- create_runtime(existing_engine=None)
- LegacyHardwareModel
alias of
HardwareModel
- class QuantumHardwareModel(shot_limit=10000, acquire_mode=None, repeat_count=1000, repetition_period=0.0001, error_mitigation=None)
Bases:
HardwareModel
,Calibratable
Object modelling our superconducting hardware. Holds up-to-date information about a current piece of hardware, whether simulated or physical machine.
- add_device(device)
- add_physical_baseband(*basebands)
- add_physical_channel(*physical_channels)
- add_pulse_channel(*pulse_channels)
- add_quantum_device(*devices)
- constrain(angle)
- create_builder()
- Return type:
- create_engine()
- Return type:
- get_device(id_)
- get_devices_from_physical_channel(physical_channel)
- get_devices_from_pulse_channel(pulse_channel)
- get_gate_U(qubit, theta, phi, lamb, pulse_channel=None)
- get_gate_X(qubit, theta, pulse_channel=None)
- get_gate_Y(qubit, theta, pulse_channel=None)
- get_gate_Z(qubit, theta, pulse_channel=None)
- get_gate_ZX(qubit, theta, target_qubit)
- get_hw_x_pi_2(qubit, pulse_channel=None, amp_scale=None)
- Return type:
List
[Any
]
- get_hw_z(qubit, phase, pulse_channel=None)
- Return type:
List
[Any
]
- get_hw_zx_pi_4(qubit, target_qubit)
- Return type:
List
[Any
]
- get_physical_baseband(id_)
- get_physical_channel(id_)
- get_pulse_channel_from_device(ch_type, host_device_id, aux_device_ids=None)
- get_pulse_channel_from_id(id_)
- get_pulse_channels_from_physical_channel(physical_channel)
- get_quantum_device(id_)
- get_qubit(id_)
Returns a qubit based on id/index. If the passed-in object is already a Qubit object just returns that.
- Return type:
- has_qubit(id_)
- property is_calibrated
- property qubits
Returns list of the qubits on this hardware sorted by index.
- resolve_qb_pulse_channel(chanbit)
- Return type:
Tuple
[Qubit
,PulseChannel
]
- property resonators
- class ReadoutMitigation(linear=None, matrix=None, m3=False)
Bases:
Calibratable
Linear maps each individual qubit to its <0/1> given <0/1> probability. Note that linear assumes no cross-talk effects and considers each qubit independent. linear = {
- <qubit_number>: {
“0|0”: 1, “1|0”: 1, “0|1”: 1, “1|1”: 1,
}
} Matrix is the entire 2**n x 2**n process matrix of p(<bitstring_1>|<bitstring_2>). M3 is a runtime mitigation strategy that builds up the calibration it needs at runtime, hence a bool of available or not. For more info https://github.com/Qiskit-Partners/mthree.
- get_cl2qu_index_mapping(instructions, model)
Returns a Dict[str, str] mapping creg to qreg indices. Classical register indices are extracted following the pattern <clreg_name>[<clreg_index>]