Note

This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.

ZZRamsey

class ZZRamsey(physical_qubits, backend=None, **experiment_options)[source]

An experiment to characterize the static ZZ interaction for a qubit pair.

Overview

This experiment assumes a two qubit Hamiltonian of the form

H=h(f02ZI+f12IZ+fZZ4ZZ)

and measures the strength fZZ of the ZZ term. fZZ can be described as the difference between the frequency of qubit 0 when qubit 1 is excited and the frequency of qubit 0 when qubit 1 is in the ground state. Because fZZ is symmetric in qubit index, it can also be expressed with the roles of 0 and 1 reversed. Experimentally, we measure fZZ by performing Ramsey sequences on qubit 0 with qubit 1 in the ground state and again with qubit 1 in the excited state. The standard Ramsey experiment consists of putting a qubit along the X axis of Bloch sphere, waiting for some time, and then measuring the qubit project along X. By measuring the X projection versus time the qubit frequency can be inferred. See T2Ramsey and RamseyXY.

Because we are interested in the difference in qubit 0 frequency between the two qubit 1 preparations rather than the absolute frequencies of qubit 0 for those preparations, we modify the Ramsey sequences (the circuits for the modified sequences are shown below). First, we add an X gate on qubit 0 to the middle of the Ramsey delay. This would have the effect of echoing out the phase accumulation of qubit 0 (like a Hahn echo sequence as used in T2Hahn), but we add a simultaneous X gate to qubit 1 as well. Flipping qubit 1 inverts the sign of the fZZ term. The net result is that qubit 0 continues to accumulate phase proportional to fZZ while the phase due to any ZI term is canceled out. This technique allows fZZ to be measured using longer delay times than might otherwise be possible with a qubit with a slow frequency drift (i.e. the measurement is not sensitive to qubit frequency drift from shot to shot, only to drift within a single shot).

The resulting excited state population of qubit 0 versus delay time exhibits slow sinusoidal oscillations (assuming fZZ is relatively small). To help with distinguishing between qubit decay and a slow oscillation, an extra Z rotation is applied before the final pulse on qubit 0. The angle of this Z rotation is set proportional to the delay time of the sequence. This angle proportional to time behaves similarly to measuring at a fixed angle with the qubit rotating at a constant frequency. This virtual frequency is common to the two qubit 1 preparations. By looking at the difference in frequency fitted for the two cases, this virtual frequency (called f in the circuits shown below) is removed, leaving only the fZZ value. The value of f in terms of the experiment options is num_rotations / (max(delays) - min(delays)).

This experiment consists of the following two circuits repeated with different delay values.

Modified Ramsey sequence with qubit 1 initially in the ground state

     ┌────┐ ░ ┌─────────────────┐ ░ ┌───┐ ░ ┌─────────────────┐ ░ »
q_0: ┤ √X ├─░─┤ Delay(delay[s]) ├─░─┤ X ├─░─┤ Delay(delay[s]) ├─░─»
     └────┘ ░ └─────────────────┘ ░ ├───┤ ░ └─────────────────┘ ░ »
q_1: ───────░─────────────────────░─┤ X ├─░─────────────────────░─»
            ░                     ░ └───┘ ░                     ░ »
c: 1/═════════════════════════════════════════════════════════════»
                                                                  »
«     ┌─────────────────────┐┌────┐ ░ ┌─┐
«q_0: ┤ Rz(4*delay*dt*f*pi) ├┤ √X ├─░─┤M├
«     └────────┬───┬────────┘└────┘ ░ └╥┘
«q_1: ─────────┤ X ├────────────────░──╫─
«              └───┘                ░  ║
«c: 1/═════════════════════════════════╩═
«                                      0

Modified Ramsey sequence with qubit 1 initially in the excited state

     ┌────┐ ░ ┌─────────────────┐ ░ ┌───┐ ░ ┌─────────────────┐ ░ »
q_0: ┤ √X ├─░─┤ Delay(delay[s]) ├─░─┤ X ├─░─┤ Delay(delay[s]) ├─░─»
     ├───┬┘ ░ └─────────────────┘ ░ ├───┤ ░ └─────────────────┘ ░ »
q_1: ┤ X ├──░─────────────────────░─┤ X ├─░─────────────────────░─»
     └───┘  ░                     ░ └───┘ ░                     ░ »
c: 1/═════════════════════════════════════════════════════════════»
                                                                  »
«     ┌─────────────────────┐┌────┐ ░ ┌─┐
«q_0: ┤ Rz(4*delay*dt*f*pi) ├┤ √X ├─░─┤M├
«     └─────────────────────┘└────┘ ░ └╥┘
«q_1: ──────────────────────────────░──╫─
«                                   ░  ║
«c: 1/═════════════════════════════════╩═
«                                      0

Analysis class reference

ZZRamseyAnalysis

Experiment options

These options can be set by the set_experiment_options() method.

Options
  • Defined in the class ZZRamsey:

    • delays (list[float])

      Default value: None
      The list of delays that will be scanned in the experiment, in seconds. If not set, then num_delays evenly spaced delays between min_delay and max_delay are used. If delays is set, max_delay, min_delay, and num_delays are ignored.
    • max_delay (float)

      Default value: 1e-05
      Maximum delay time to use.
    • min_delay (float)

      Default value: 0.0
      Minimum delay time to use.
    • num_delays (int)

      Default value: 50
      Number of circuits to use per control state preparation.
    • num_rotations (float)

      Default value: 5
      The extra rotation added to qubit 0 uses a frequency that gives this many rotations in the case where fZZ is 0.
  • Defined in the class BaseExperiment:

    • max_circuits (Optional[int])

      Default value: None
      The maximum number of circuits per job when running an experiment on a backend.

Initialization

Create new experiment.

Parameters:
  • physical_qubits (Tuple[int, int]) – The qubits on which to run the Ramsey XY experiment.

  • backend (Optional[Backend]) – Optional, the backend to run the experiment on.

  • experiment_options – experiment options to set

Attributes

ZZRamsey.analysis

Return the analysis instance for the experiment

ZZRamsey.backend

Return the backend for the experiment

ZZRamsey.experiment_options

Return the options for the experiment.

ZZRamsey.experiment_type

Return experiment type.

ZZRamsey.num_qubits

Return the number of qubits for the experiment.

ZZRamsey.physical_qubits

Return the device qubits for the experiment.

ZZRamsey.run_options

Return options values for the experiment run() method.

ZZRamsey.transpile_options

Return the transpiler options for the run() method.

Methods

ZZRamsey.circuits()

Create circuits

ZZRamsey.config()

Return the config dataclass for this experiment

ZZRamsey.copy()

Return a copy of the experiment

ZZRamsey.delays()

Delay values to use in circuits

ZZRamsey.frequency()

Frequency of qubit rotation when ZZ is 0

ZZRamsey.from_config(config)

Initialize an experiment from experiment config

ZZRamsey.parametrized_circuits()

Create circuits with parameters for numerical quantities

ZZRamsey.run([backend, analysis, timeout])

Run an experiment and perform analysis.

ZZRamsey.set_experiment_options(**fields)

Set the experiment options.

ZZRamsey.set_run_options(**fields)

Set options values for the experiment run() method.

ZZRamsey.set_transpile_options(**fields)

Set the transpiler options for run() method.