zz_circuits

zz_circuits(num_of_gates, gate_time, qubits, spectators, nosc=5)[source]

Generates circuit for measuring ZZ. Two Ramsey experiments, the first with the spectator in the ground state, the second with the spectator in the excited state

Parameters
  • num_of_gates (list of integers) – the number of identity gates in each circuit. Must be in an increasing order.

  • gate_time (float) – time of running a single gate.

  • qubits (list of integers) – indices of the qubits to measure and perform the Ramsey

  • spectators (list of integers) – indices of the qubits to flip the state (ie measure the ZZ between qubits and spectators). Must be the same length as qubits

  • nosc (int) – number of oscillations to induce using the phase gate

Returns

A list of QuantumCircuit xdata: a list of delay times osc_freq: the induced oscillation frequency

Raises

ValueError – If the number of qubits differs from the number of spectators