EchoedCrossResonanceHamiltonian¶
- class EchoedCrossResonanceHamiltonian(physical_qubits, backend=None, cr_gate=None, durations=None, **kwargs)[source]¶
Echoed cross resonance Hamiltonian tomography experiment.
Overview
This is a variant of
CrossResonanceHamiltonian
for which the experiment framework is identical but the cross resonance operation is realized as an echoed sequence to remove unwanted single qubit rotations. The cross resonance circuit looks like:┌────────────────────┐ ┌───┐ ┌────────────────────┐ q_0: ┤0 ├──┤ X ├──┤0 ├────────── │ cr_tone(duration) │┌─┴───┴─┐│ cr_tone(duration) │┌────────┐ q_1: ┤1 ├┤ Rz(π) ├┤1 ├┤ Rz(-π) ├ └────────────────────┘└───────┘└────────────────────┘└────────┘
Here two
cr_tone
are applied, where the latter one is with the control qubit state flipped and with a phase flip of the target qubit frame. This operation is equivalent to applying thecr_tone
with a negative amplitude. The Hamiltonian for this decomposition has no IX and ZI interactions, and also a reduced IY interaction to some extent (not completely eliminated) [1]. Note that the CR Hamiltonian tomography experiment cannot detect the ZI term. However, it is sensitive to the IX and IY terms.References
[1] Neereja Sundaresan, Isaac Lauer, Emily Pritchett, Easwar Magesan, Petar Jurcevic, Jay M. Gambetta, Reducing unitary and spectator errors in cross resonance with optimized rotary echoes, PRX Quantum 1, 020318 (2020), doi: 10.1103/PRXQuantum.1.020318 (open)
Analysis class reference
CrossResonanceHamiltonianAnalysis
Experiment options
These options can be set by the
set_experiment_options()
method.- Options
Defined in the class
CrossResonanceHamiltonian
:durations (np.ndarray)
Default value:None
The 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-08
The minimum default pulse duration in samples.max_durations (int)
Default value:1.2e-06
The maximum default pulse duration in samples.num_durations (int)
Default value:48
The number of measured durations. The experiment automatically creates durations of linear increment along withmin_durations
andmax_durations
when user doesn’t explicitly providedurations
.amp (complex)
Default value:0.5
Amplitude of the cross resonance tone.amp_t (complex)
Default value:0.0
Amplitude of the cancellation or rotary drive on target qubit.sigma (float)
Default value:64
Sigma of Gaussian rise and fall edges, in units of dt.risefall (float)
Default value:2
Ratio of edge durations to sigma.
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.
See also
Initialization
Create a new experiment.
Deprecated since version 0.8: The class
qiskit_experiments.library.characterization.cr_hamiltonian.CrossResonanceHamiltonian
is deprecated as of qiskit-experiments 0.8. It will be removed no earlier than 3 months after the release date. Due to the deprecation of Qiskit Pulse, experiments involving pulse gate calibrations like this one have been deprecated.- 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.
backend (Backend | None) – Optional, the backend to run the experiment on.
cr_gate (Type[Gate] | None) – 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 parameter
width
in units of sec.durations (Sequence[int] | None) – 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, then
num_durations
evenly spaced durations betweenmin_durations
andmax_durations
are 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
qubits
length is not 2.
Attributes
- analysis¶
Return the analysis instance for the experiment
- backend¶
Return the backend for the experiment
- experiment_options¶
Return the options for the experiment.
- experiment_type¶
Return experiment type.
- num_pulses = 2¶
- num_qubits¶
Return the number of qubits for the experiment.
- physical_qubits¶
Return the device qubits for the experiment.
Methods
- circuits()¶
Return a list of experiment circuits.
- Returns:
A list of
QuantumCircuit
.- Raises:
QiskitError – When the backend is not set and cr gate is
CRPulseGate
type.- Return type:
List[QuantumCircuit]
- config()¶
Return the config dataclass for this experiment
- Return type:
- copy()¶
Return a copy of the experiment
- Return type:
- classmethod from_config(config)¶
Initialize an experiment from experiment config
- Return type:
- job_info(backend=None)¶
Get information about job distribution for the experiment on a specific backend.
- Parameters:
backend (Backend) – Optional, the backend for which to get job distribution information. If not specified, the experiment must already have a set backend.
- Returns:
A dictionary containing information about job distribution.
”Total number of circuits in the experiment”: Total number of circuits in the experiment.
”Maximum number of circuits per job”: Maximum number of circuits in one job based on backend and experiment settings.
”Total number of jobs”: Number of jobs needed to run this experiment on the currently set backend.
- Return type:
dict
- Raises:
QiskitError – if backend is not specified.
- run(backend=None, sampler=None, analysis='default', timeout=None, backend_run=None, **run_options)¶
Run an experiment and perform analysis.
- Parameters:
backend (Backend | None) – Optional, the backend to run on. Will override existing backend settings.
sampler (BaseSamplerV2 | None) – Optional, the sampler to run the experiment on. If None then a sampler will be invoked from previously set backend
analysis (BaseAnalysis | None) – Optional, a custom analysis instance to use for performing analysis. If None analysis will not be run. If
"default"
the experimentsanalysis()
instance will be used if it contains one.timeout (float | None) – Time to wait for experiment jobs to finish running before cancelling.
backend_run (bool | None) – Use backend run (temp option for testing)
run_options – backend runtime options used for circuit execution.
- Returns:
The experiment data object.
- Raises:
QiskitError – If experiment is run with an incompatible existing ExperimentData container.
- Return type:
- set_experiment_options(**fields)¶
Set the experiment options.
- Parameters:
fields – The fields to update the options
- Raises:
AttributeError – If the field passed in is not a supported options
- set_run_options(**fields)¶
Set options values for the experiment
run()
method.- Parameters:
fields – The fields to update the options
See also
The Setting options for your experiment guide for code example.
- set_transpile_options(**fields)¶
Set the transpiler options for
run()
method.- Parameters:
fields – The fields to update the options
- Raises:
QiskitError – If initial_layout is one of the fields.
See also
The Setting options for your experiment guide for code example.