qat.hardware.HardwareModel

class qat.hardware.HardwareModel(gates_specification=None, gate_noise=None, idle_noise=None, params_specification=None, jump_operators=None)

This object contains all necessary elements to describe a hardware (gates + environment).

Parameters:
  • gates_specification (GatesSpecification) – specifies the gates of this hardware.

  • gate_noise (dict<str, ParametricQuantumChannel or lambda<args, QuantumChannel>>, optional) – specifies the noise to be (optionally) appended after each gate application. Defaults to None (no gate noise).

  • idle_noise (dict<int, list<ParametricQuantumChannel>> or list<ParametricQuantumChannel>, optional) – specifies the noise to be applied to idle qubits. Default to None (no idle noise).

  • params_specification (dict<str, Parameter>, optional) – specifies the parameters that are used in the Schedule fed to an analog QPU. Defaults to None.

  • jump_operators (list<Observable>, optional) – list of Lindblad jump operators (for analog QPUs). Defaults to None.

gates_specification

specifies the gates of this hardware.

Type:

GatesSpecification

gate_noise

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).

Type:

dict<str, ParametricQuantumChannel or lambda<args, QuantumChannel> or dict<int, ParametricQuantumChannel>>

idle_noise

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).

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:

Observable

Raises:

ValueError – if no jump operator