# RoughDrag¶

class RoughDrag(qubit, schedule, betas=None, backend=None)[source]

An experiment that scans the DRAG parameter to find the optimal value.

Overview

A Derivative Removal by Adiabatic Gate (DRAG) pulse is designed to minimize phase errors and leakage resulting from the presence of a neighbouring transition. DRAG is a standard pulse with an additional derivative component. The optimal value of the DRAG parameter, $$\beta$$, is chosen to primarily minimize phase errors resulting from the AC Stark shift and potentially leakage errors. The DRAG pulse is

$f(t) = \Omega(t) + 1j \beta d/dt \Omega(t)$

Here, $$\Omega$$ is the envelop of the in-phase component of the pulse and $$\beta$$ is the strength of the quadrature which we refer to as the DRAG parameter and seek to calibrate in this experiment. The DRAG calibration will run several series of circuits. In a given circuit a Rp(β) - Rm(β) block is repeated $$N$$ times. Here, Rp is a rotation with a positive angle and Rm is the same rotation with a native angle and is implemented by the gate sequence Rz(π) - Rp(β) - Rz(π) where the Z rotations are virtual. As example the circuit of a single repetition, i.e. $$N=1$$, is shown below.

           ┌───────┐┌───────┐┌───────┐┌───────┐ ░ ┌─┐
q_0: ┤ Rp(β) ├┤ Rz(π) ├┤ Rp(β) ├┤ Rz(π) ├─░─┤M├
└───────┘└───────┘└───────┘└───────┘ ░ └╥┘
measure: 1/════════════════════════════════════════╩═
0


The parameter β is scanned to find the value that minimizes the unwanted Z-rotation. Note that the analysis class requires this experiment to run with three repetition numbers.

References

[1] 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)

[2] F. Motzoi, J. M. Gambetta, P. Rebentrost, F. K. Wilhelm, Simple pulses for elimination of leakage in weakly nonlinear qubits, Phys. Rev. Lett. 103, 110501 (2009), doi: 10.1103/PhysRevLett.103.110501 (open)

[3] Zijun Chen, Julian Kelly, Chris Quintana, R. Barends, B. Campbell, Yu Chen, B. Chiaro, A. Dunsworth, A. Fowler, E. Lucero, E. Jeffrey, A. Megrant, J. Mutus, M. Neeley, C. Neill, P. J. J. O’Malley, P. Roushan, D. Sank, A. Vainsencher, J. Wenner, T. C. White, A. N. Korotkov, John M. Martinis, Measuring and Suppressing Quantum State Leakage in a Superconducting Qubit, Phys. Rev. Lett. 116, 020501 (2016), doi: 10.1103/PhysRevLett.116.020501 (open)

Tutorials

Calibrating single-qubit gates on a real device

Analysis Class Reference

DragCalAnalysis

Experiment Options

These options can be set by set_experiment_options() method.

Parameters:
• schedule (ScheduleBlock) – The schedule of the rotation.

• reps (List[int]) – The number of times the Rp - Rm gate sequence is repeated in each series. Note that this list must always have a length of three as otherwise the analysis class will not run.

• betas (Iterable) – the values of the DRAG parameter to scan.

Transpiler Options

This option can be set by set_transpile_options() method.

This option is used for circuit optimization. See the documentation of qiskit.transpile for available options.

Backend Run Options

This option can be set by set_run_options() method.

This option is used for controlling job execution condition. Note that this option is provider dependent. See provider’s backend runner API for available options. See the documentation of IBMQBackend.run for the IBM Quantum Service.

Initialization

Initialize a Drag experiment in the given qubit.

Parameters:
• qubit (int) – The qubit for which to run the Drag calibration.

• schedule (ScheduleBlock) – The schedule to run. This schedule should have one free parameter corresponding to a DRAG parameter.

• betas (Optional[Iterable[float]]) – The values of the DRAG parameter to scan. If None is given the default range linspace(-5, 5, 51) is used.

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

Raises:

QiskitError – if the schedule does not have a free parameter.

Attributes

 RoughDrag.analysis Return the analysis instance for the experiment RoughDrag.analysis_options Return the analysis options for run() analysis. RoughDrag.backend Return the backend for the experiment RoughDrag.experiment_options Return the options for the experiment. RoughDrag.experiment_type Return experiment type. RoughDrag.num_qubits Return the number of qubits for the experiment. RoughDrag.physical_qubits Return the device qubits for the experiment. RoughDrag.run_options Return options values for the experiment run() method. RoughDrag.transpile_options Return the transpiler options for the run() method.

Methods

 Create the circuits for the Drag calibration. Return the config dataclass for this experiment Return a copy of the experiment RoughDrag.enable_restless([rep_delay, ...]) Enables a restless experiment by setting the restless run options and the restless data processor. RoughDrag.from_config(config) Initialize an experiment from experiment config RoughDrag.run([backend, analysis, timeout]) Run an experiment and perform analysis. Set the experiment options. RoughDrag.set_run_options(**fields) Set options values for the experiment run() method. Set the transpiler options for run() method.