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
interaction for a qubit pair.Overview
This experiment assumes a two qubit Hamiltonian of the form
and measures the strength
of the term. 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 is symmetric in qubit index, it can also be expressed with the roles of 0 and 1 reversed. Experimentally, we measure 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 axis of Bloch sphere, waiting for some time, and then measuring the qubit project along . By measuring the projection versus time the qubit frequency can be inferred. SeeT2Ramsey
andRamseyXY
.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 term. The net result is that qubit 0 continues to accumulate phase proportional to while the phase due to any ZI term is canceled out. This technique allows 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
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 in the circuits shown below) is removed, leaving only the value. The value of in terms of the experiment options isnum_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
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, thennum_delays
evenly spaced delays betweenmin_delay
andmax_delay
are used. Ifdelays
is set,max_delay
,min_delay
, andnum_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 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
Return the analysis instance for the experiment
Return the backend for the experiment
Return the options for the experiment.
Return experiment type.
Return the number of qubits for the experiment.
Return the device qubits for the experiment.
Return options values for the experiment
run()
method.Return the transpiler options for the
run()
method.Methods
Create circuits
Return the config dataclass for this experiment
Return a copy of the experiment
Delay values to use in circuits
Frequency of qubit rotation when ZZ is 0
ZZRamsey.from_config
(config)Initialize an experiment from experiment config
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.