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.
FineDrag¶
- class FineDrag(physical_qubits, gate, backend=None)[source]¶
An experiment that performs fine characterizations of DRAG pulse coefficients.
Overview
FineDrag
runs fine DRAG characterization experiments (seeDragCal
for the definition of DRAG pulses). Fine DRAG proceeds by iterating the gate sequence Rp - Rm where Rp is a rotation around an axis and Rm is the same rotation but in the opposite direction and is implemented by the gates Rz - Rp - Rz where the Rz gates are virtual Z-rotations, see Ref. [1]. The executed circuits are of the form┌─────┐┌────┐┌───────┐┌────┐┌───────┐ ┌──────┐ ░ ┌─┐ q_0: ┤ Pre ├┤ Rp ├┤ Rz(π) ├┤ Rp ├┤ Rz(π) ├ ... ┤ Post ├─░─┤M├ └─────┘└────┘└───────┘└────┘└───────┘ └──────┘ ░ └╥┘ meas: 1/══════════════════════════════════════════════════════╩═ 0
Here, “Pre” and “Post” designate gates that may be pre-appended and and post-appended, respectively, to the repeated sequence of Rp - Rz - Rp - Rz gates. When calibrating a pulse with a target rotation angle of π the Pre and Post gates are Id and RYGate(π/2), respectively. When calibrating a pulse with a target rotation angle of π/2 the Pre and Post gates are RXGate(π/2) and RYGate(π/2), respectively.
We now describe what this experiment corrects by following Ref. [2]. We follow equations 4.30 and onwards of Ref. [2] which state that the first-order corrections to the control fields are
Here, the
terms are coefficients of the expansion of an operator that generates a transformation that keeps the qubit sub-space isolated from the higher-order states. is the gate time, is the pulse envelope on the in-phase component of the drive and is a parameter of the Hamiltonian. For additional details please see Ref. [2]. As in Ref. [2] we now set and to zero and set to . This results in a Z angle rotation rate of in the equations above and defines the value for the ideal parameter. In Qiskit pulse, the definition of the DRAG pulse iswhich implies that
is the ideal value. We now assume that there is a small error in such that the instantaneous Z-angle error induced by a single pulse isWe can integrate
, i.e. the instantaneous -angle rotation error, to obtain the total rotation angle error per pulse, :If we assume a Gaussian pulse, i.e.
then the integral of in the equation above results in . Furthermore, the integral of is , where is the target rotation angle, i.e. the area under the pulse. This last point allows us to rewrite as . The total angle error per pulse is thereforeHere,
is the angle error per pulse. The qubit population produced by the gate sequence shown above is used to measure . Indeed, each gate pair Rp - Rm will produce a small unwanted -rotation out of the plane with a magnitude . The total rotation out of the plane is then mapped to a qubit population by the final Post gate. Inverting the relation above after cancelling out the factor of two due to the Rp - Rm pulse pair yields the error in that produced the rotation error asThis is the correction formula in the FineDRAG Updater.
References
[1] David C. McKay, Christopher J. Wood, Sarah Sheldon, Jerry M. Chow, Jay M. Gambetta, Efficient Z-Gates for Quantum Computing, Phys. Rev. A 96, 022330 (2017), doi: 10.1103/PhysRevA.96.022330 (open)
[2] J. M. Gambetta, F. Motzoi, S. T. Merkel, F. K. Wilhelm, Analytic control methods for high fidelity unitary operations in a weakly nonlinear oscillator, Phys. Rev. A 83, 012308 (2011), doi: 10.1103/PhysRevA.83.012308 (open)
Analysis class reference
Experiment options
These options can be set by the
set_experiment_options()
method.- Options
Defined in the class
FineDrag
:repetitions (List[int])
Default value: [0
,1
,2
,3
,4
, …]A list of the number of times that Rp - Rm gate sequence is repeated.schedule (ScheduleBlock)
Default value:None
The schedule for the plus rotation.gate (Gate)
Default value:None
This is the gate such as XGate() that will be in the circuits.
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
Setup a fine amplitude experiment on the given qubit.
- Parameters:
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 the circuits for the fine DRAG calibration experiment.
Return the config dataclass for this experiment
Return a copy of the experiment
FineDrag.enable_restless
([rep_delay, ...])Enables a restless experiment by setting the restless run options and the restless data processor.
FineDrag.from_config
(config)Initialize an experiment from experiment config
FineDrag.run
([backend, analysis, timeout])Run an experiment and perform analysis.
FineDrag.set_experiment_options
(**fields)Set the experiment options.
FineDrag.set_run_options
(**fields)Set options values for the experiment
run()
method.FineDrag.set_transpile_options
(**fields)Set the transpiler options for
run()
method.