qat.hardware.DefaultHardwareModel
- class qat.hardware.DefaultHardwareModel(gate_times=None, gate_noise=None, idle_noise=None, channel_repr=ChannelRepresentations.KRAUS)
A default hardware model, with perfect gates and possibility to add idling noise and gate noise. It contains:
gates: instantaneous gates if nothing specified in constructor
environment: noise on idle qubits or nothing if nothing specified
- Parameters:
gate_times (dict<str, float> or dict<str, dict<tuple<int>, float>> or dict<str, lambda<param, float>> or dict<str, dict<tuple<int>, lambda<param, float>>) – contains duration (possibly parametric) of each gate (possibly qubit-wise)
gate_noise (dict<str, ParametricQuantumChannel or lambda<args, QuantumChannel> or dict<int, ParametricQuantumChannel>>) – specifies the noise to be (optionally) appended after each gate application in a dictionary. Keys are gate names, all gates used must be present. Values are either: a quantum channel that depends on gate duration; a lambda giving such channel from gate parameters; or a dictionary of either of these whose keys are qubit indices. The last form is used to have qubit dependent noise. Defaults to None (no gate noise).
idle_noise (dict<int, list<ParametricQuantumChannel>> or list<ParametricQuantumChannel>) – specifies the noise to be applied to idle qubits. If a list of channels is given, it means that the same channel, corresponding to the composition of the channels of the list, is applied to all qubits. If a dictionary is given, with keys being the qubit index and values a list of channels, then each qubit receives an idle noise corresponding to the list of channels (which are composed into a single channel) associated with the key. Defaults to None (no idle noise).
channel_repr (
qat.quops.ChannelRepresentations
, optional) – specifies quantum channel representation (e.g Kraus representation or Pauli transfer matrix). Defaults to ChannelRepresentations.KRAUS.
- gates_specification
specifies the gates of this hardware.
- Type:
- gate_noise
specifies the noise to be (optionally) appended after each gate application.
- Type:
dict<str, ParametricQuantumChannel or lambda<args, QuantumChannel>>
- idle_noise
specifies the noise to be applied to idle qubits.
- Type:
dict<int, list<ParametricQuantumChannel>> or list<ParametricQuantumChannel>
- params_specification
specifies the parameters that are used in the Schedule fed to an analog QPU.
- Type:
dict<str, Parameter>
- jump_operators
list of Lindblad jump operators (for analog QPUs).
- Type:
list<Observable>
- cleanup_jump_operators()
Remove constant jump operators, if any, since they don’t affect the dynamics
- shift_jump_operators(shift: List[complex] | complex) Observable
Shift jump operators \(L_k\) by complex numbers \(\alpha_k\): \(L_k \rightarrow L_k - \alpha_k\).
To maintain the same Lindblad equation, the hamiltonian must be compensated: \(H \rightarrow H + \tilde H\) with
- Parameters:
shift (complex or list<complex>) – a complex scalar shift (same for all jump operators) or a list of such (one for each jump operator)
- Returns:
compensation to the hamiltonian \(\tilde H\).
- Return type:
- Raises:
ValueError – if no jump operator