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.
CrossResonanceHamiltonian¶
- class CrossResonanceHamiltonian(physical_qubits, flat_top_widths=None, backend=None, cr_gate=None, durations=None, **kwargs)[source]¶
Cross resonance Hamiltonian tomography experiment.
Overview
This experiment assumes the two qubit Hamiltonian in the form
\[H = \frac{I \otimes A}{2} + \frac{Z \otimes B}{2}\]where \(A\) and \(B\) are linear combinations of the Pauli operators \(\in {X, Y, Z}\). The coefficient of each Pauli term in the Hamiltonian can be estimated with this experiment.
This experiment is performed by stretching the pulse duration of a cross resonance pulse and measuring the target qubit by projecting onto the x, y, and z bases. The control qubit state dependent (controlled-) Rabi oscillation on the target qubit is observed by repeating the experiment with the control qubit both in the ground and excited states. The fit for the oscillations in the three bases with the two control qubit preparations tomographically reconstructs the Hamiltonian in the form shown above. See Ref. [1] for more details.
More specifically, the following circuits are executed in this experiment.
(X measurement) ┌───┐┌────────────────────┐ q_0: ┤ P ├┤0 ├──────────────────── └───┘│ cr_tone(duration) │┌─────────┐┌────┐┌─┐ q_1: ─────┤1 ├┤ Rz(π/2) ├┤ √X ├┤M├ └────────────────────┘└─────────┘└────┘└╥┘ c: 1/═════════════════════════════════════════════╩═ 0 (Y measurement) ┌───┐┌────────────────────┐ q_0: ┤ P ├┤0 ├───────── └───┘│ cr_tone(duration) │┌────┐┌─┐ q_1: ─────┤1 ├┤ √X ├┤M├ └────────────────────┘└────┘└╥┘ c: 1/══════════════════════════════════╩═ 0 (Z measurement) ┌───┐┌────────────────────┐ q_0: ┤ P ├┤0 ├─── └───┘│ cr_tone(duration) │┌─┐ q_1: ─────┤1 ├┤M├ └────────────────────┘└╥┘ c: 1/════════════════════════════╩═ 0The
Pgate on the control qubit (q_0) indicates the state preparation. Since this experiment requires two sets of sub experiments with the control qubit in the excited and ground state,Pwill becomeXgate or just be omitted, respectively. Herecr_toneis implemented by a single cross resonance tone driving the control qubit at the frequency of the target qubit. The pulse envelope might be a flat-topped Gaussian implemented by the parametric pulseGaussianSquare.This experiment scans the total duration of the cross resonance pulse including the pulse ramps at both edges. The pulse shape is defined by the
GaussianSquare, and an effective length of these Gaussian ramps with \(\sigma\) can be computed by\[\tau_{\rm edges}' = \sqrt{2 \pi} \sigma,\]which is usually shorter than the actual edge duration of
\[\tau_{\rm edges} = 2 r \sigma,\]where the \(r\) is the ratio of the actual edge duration to \(\sigma\). This effect must be considered in the following curve analysis to estimate interaction rates.
References
[1] Sarah Sheldon, Easwar Magesan, Jerry M. Chow, Jay M. Gambetta, Procedure for systematically tuning up crosstalk in the cross resonance gate, Phys. Rev. A 93, 060302 (2016), doi: 10.1103/PhysRevA.93.060302 (open)
User manual
Qiskit Textbook 6.7 (open)
Analysis class reference
CrossResonanceHamiltonianAnalysisExperiment options
These options can be set by the
set_experiment_options()method.- Options
Defined in the class
CrossResonanceHamiltonian:flat_top_widths (np.ndarray)
Default value:NoneDeprecated. Length of Gaussian flat top to scan.durations (np.ndarray)
Default value:NoneThe total duration of the cross resonance pulse(s) to scan, in units of sec. Values should be longer than pulse ramps.min_durations (int)
Default value:6e-08The minimum default pulse duration in samples.max_durations (int)
Default value:1.2e-06The maximum default pulse duration in samples.num_durations (int)
Default value:48The number of measured durations. The experiment automatically creates durations of linear increment along withmin_durationsandmax_durationswhen user doesn’t explicitly providedurations.amp (complex)
Default value:0.5Amplitude of the cross resonance tone.amp_t (complex)
Default value:0.0Amplitude of the cancellation or rotary drive on target qubit.sigma (float)
Default value:64Sigma of Gaussian rise and fall edges, in units of dt.risefall (float)
Default value:2Ratio of edge durations to sigma.
Defined in the class
BaseExperiment:max_circuits (Optional[int])
Default value:NoneThe maximum number of circuits per job when running an experiment on a backend.
Initialization
Create a new experiment.
- Parameters:
physical_qubits (
Tuple[int,int]) – Two-value tuple of qubit indices on which to run tomography. The first index stands for the control qubit.flat_top_widths (
Optional[Iterable[float]]) – Deprecated. The total duration of the square part of cross resonance pulse(s) to scan, in units of dt. The total pulse duration including Gaussian rising and falling edges is implicitly computed with experiment parameterssigmaandrisefall.backend (
Optional[Backend]) – Optional, the backend to run the experiment on.cr_gate (
Optional[Type[Gate]]) – Optional, circuit gate class representing the cross resonance pulse. Providing this object allows us to run this experiment with circuit simulator, and this object might be used for testing, development of analysis protocol, and educational purpose without needing to wait for hardware queueing. Note that this instance must provide matrix representation, such as unitary gate or Hamiltonian gate, and the class is expected to be instantiated with a single parameterwidthin units of sec.durations (
Optional[Sequence[int]]) – Optional. The total duration of cross resonance pulse(s) including rising and falling edges. The minimum number should be larger than the total lengths of these ramps. If not provided, thennum_durationsevenly spaced durations betweenmin_durationsandmax_durationsare automatically generated from these experiment options. The default numbers are chosen to have a good sensitivity for the Hamiltonian coefficient of interest at the rate around 1 MHz. This argument should be provided in units of sec.kwargs – Pulse parameters. See
experiment_options()for details.
- Raises:
QiskitError – When
qubitslength is not 2.
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
Return a list of experiment circuits.
Return the config dataclass for this experiment
Return a copy of the experiment
Initialize an experiment from experiment config
CrossResonanceHamiltonian.run([backend, ...])Run an experiment and perform analysis.
Set the experiment options.
Set options values for the experiment
run()method.Set the transpiler options for
run()method.