qat.hardware.DefaultGatesSpecification

class qat.hardware.DefaultGatesSpecification(gate_times=None, state_prep=None, meas=None, predef_generator=None, param_generator=None, channel_repr=ChannelRepresentations.KRAUS)

GatesSpecification with perfect noise model for usual gates.

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>>, optional) – contains duration (possibly parametric) of each gate (possibly qubit-wise). Defaults to None (in which case the gate times are set to zero).

  • state_prep (array or dict<int, array>, optional) – array describing state preparation as matrix in computational basis. Defaults to None (perfect initialization).

  • meas (array or dict<int, array>, optional) – array describing measurement as a matrix in computational basis. Defaults to None (perfect measurement).

  • predef_generator (dict, optional) – dictionary containing the matrices corresponding to constant (as opposed to parametric) gates. Defaults to None, in which case it is taken to be equal to qat.core.circuit_builder.matrix_util.get_predef_generator.

  • param_generator (dict, optional) – dictionary containing lambda functions generating the matrices corresponding to parametric gates. Defaults to None, in which case it is taken to be equal to qat.core.circuit_builder.matrix_util.get_param_generator.

  • channel_repr (qat.quops.ChannelRepresentations, optional) – specifies quantum channel representation (e.g Kraus representation or Pauli transfer matrix). Defaults to ChannelRepresentations.KRAUS.

gate_times

contains duration (possibly parametric) of each gate (possibly qubit-wise)

Type

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

quantum_channels

dictionary containing the quantum channels describing each gate

Type

dict<str, QuantumChannel> or dict<str, lambda<param, QuantumChannel>> or dict<str, dict<qbits, QuantumChannel>> or dict<str, dict<qbits, lambda<param, QuantumChannel>>>

state_prep

array describing initial state of register \(\rho_0\) as matrix in computational basis.

Type

array or dict<int, array>, optional

meas

array \(E\) defining the measurement operation. The measurement operation is a two-outcome POVM \(\lbrace I - E, E \rbrace\) with two outcomes 0 and 1. Thus, \(p(0) = \mathrm{Tr}\left[\rho (I - E) \right]\) and \(p(1)=\mathrm{Tr}\left[ \rho E \right]\).

Type

array or dict<int, array>, optional

get_gate_time(gate_type, qbits, *args, **kwargs)

Get time of a specific gate and qubit

Parameters
  • gate_type (string) – type of gate (e.g “H”, “RZ”, …)

  • qbits (tuple) – indices of qbits

Returns

the gate time for the given qubits

Note

Also works if gate time is the same for each qubit/qubit pair etc.

get_quantum_channel(gate_type, qbits, *args, gate_dic=None, key=None, **kwargs)

Get noise channel of a specific gate and qubit

Parameters
  • gate_type (string) – type of the gate (e.g “H”, “RZ”,…)

  • qbits (tuple) – qbits on which gate is applied

Returns

the channel corresponding to the gate

Return type

QuantumChannelKraus