Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

QuantumFramework

Tutorials

  • Bell's Theorem: CHSH inequality
  • Bosonic Operator Algebra
  • Circuit Diagram
  • Exploring Fundamentals of Quantum Theory
  • Getting Started
  • An IBM Quantum Error Map
  • Connecting to QPU Services
  • Quantum Machine Learning in Phase Space
  • Quantum object abstraction
  • Quantum Object Composition
  • Sending Queries to IBM QPUs
  • Tensor Network
  • Time Evolution
  • Fast Gates on a Transmon
  • Quantum Computation

Guides

  • Wolfram Quantum Computation Framework

Tech Notes

  • Quantum Optimization
  • Second Quantization Functions

Symbols

  • CliffordChannel
  • EinsteinSummation
  • GraphState
  • IBMJob
  • IBMJobSubmit
  • LocalComplement
  • PauliStabilizer
  • QiskitCircuit
  • QiskitTarget
  • QuantumBasis
  • QuantumChannel
  • QuantumCircuitMultiwayGraph [EXPERIMENTAL]
  • QuantumCircuitOperator
  • QuantumDistance
  • QuantumEntangledQ
  • QuantumEntanglementMonotone
  • QuantumEvolve
  • QuantumMeasurement
  • QuantumMeasurementOperator
  • QuantumMeasurementSimulation
  • QuantumMPS [EXPERIMENTAL]
  • QuantumOperator
  • QuantumPartialTrace
  • QuantumPhaseSpaceTransform
  • QuantumQASM
  • QuantumShortcut [EXPERIMENTAL]
  • QuantumSimilarity
  • QuantumStateEstimate [EXPERIMENTAL]
  • QuantumState
  • QuantumTensorProduct
  • QuantumWignerMICTransform [EXPERIMENTAL]
  • QuantumWignerTransform [EXPERIMENTAL]
  • QuditBasis
  • QuditName
  • StabilizerFrame
  • StabilizerStateQ

Fast Gates on a Transmon

The Driven Transmon
The Gate Error
Leakage
Five Levels Are Enough
What DRAG Does
References
The Best Pulse Length
​
A transmon is a superconducting circuit that behaves as a weakly anharmonic oscillator. A qubit is stored in its two lowest levels, and a microwave pulse at the qubit frequency rotates it between them. The anharmonicity is small, a few hundred megahertz against a qubit frequency of several gigahertz, so the transition from
|1〉
to
|2〉
lies close to the qubit transition from
|0〉
to
|1〉
. A short pulse has a broad spectrum and drives both transitions, carrying population out of the qubit. It must also be strong to complete the rotation in time. A strong drive couples
|1〉
to
|2〉
and pushes the energy of
|1〉
, which moves the qubit transition away from the drive frequency, so the rotation misses its target unless the pulse's amplitude and frequency are calibrated. A long pulse avoids both problems but is exposed for longer to energy decay and dephasing.
The gate studied here flips the qubit, taking
|0〉
to
|1〉
and
|1〉
to
|0〉
. It rotates the qubit by an angle π, so it is called a π pulse. The population a pulse carries out of the qubit, mostly into
|2〉
, is called leakage. A correction known as DRAG (derivative removal by adiabatic gate) reduces it by adding a second component to the microwave pulse.
For a given pulse shape, how long the best π pulse is, and how much DRAG shortens it, has no exact closed-form answer. Both follow from the Schrödinger and Lindblad equations solved with the levels the qubit leaks into kept explicitly, and with the amplitude, frequency and DRAG coefficient of the pulse calibrated together with its length. For an anharmonicity of −200 MHz and coherence times
T
1
and
T
2
of 100 μs, DRAG lets the pulse shrink until energy decay and dephasing dominate its error. Without DRAG the pulse must stay long enough for leakage to die out, and its best error is larger.

The Driven Transmon

The transmon is well approximated by an anharmonic oscillator. It is driven by a microwave pulse near its qubit frequency, with a DRAG correction added to the pulse:
H
lab
(t)=
ω
q
†
b
b+
α
2
†
b
†
b
bb+Ω(t)cos(
ω
d
t)-
λ

Ω
(t)
α
sin(
ω
d
t)(b+
†
b
)
The first two terms describe the transmon, and the last term is the drive. Here
b
lowers the number of excitations by one,
ω
q
is the qubit frequency and
α
is the anharmonicity. For a transmon
α
is negative: the transition from
|1〉
to
|2〉
lies
α
below the qubit transition.
The drive oscillates at
ω
d
=
ω
q
-δ
, detuned from the qubit by
δ
, and its envelope
Ω(t)
sets its strength. A constant detuning compensates for the shift of the qubit transition that the drive causes. The second term in the bracket is the DRAG correction. It oscillates as
sin(
ω
d
t)
instead of
cos(
ω
d
t)
, and its strength follows the slope of the envelope, scaled by the DRAG coefficient
λ
. Dividing the slope by
α
gives it the units of
Ω
, so
λ
is a pure number. For a weak drive and no detuning,
λ=1
removes the component of the drive at the leakage frequency. At
λ=0
the correction is off and the pulse is a plain microwave drive. The amplitude of the envelope,
λ
and
δ
are the three controls of the pulse.
The drive is simplest to describe in a frame rotating with it, which subtracts
ω
d
for every excitation. In the rotating frame, some drive terms vary only with the pulse envelope. Others oscillate at
2
ω
d
, much faster than the envelope and populations change. These fast terms largely average out when
Ω≪
ω
q
; dropping them is the rotating-wave approximation. What remains is the Hamiltonian used throughout:
H(t)=
α
2
†
b
†
b
bb+δ
†
b
b+
Ω(t)
2
(b+
†
b
)-
λ

Ω
(t)
2α
i(
†
b
-b)
In this frame the first two terms set the energies of the levels, and the last two couple neighboring levels. To write these terms as matrices, the oscillator is truncated to its five lowest levels,
|0〉
to
|4〉
, which hold the qubit and the levels it leaks into; the last section checks how many levels are needed.
Define the lowering operator of a five-level oscillator:
In[1]:=
Needs["Wolfram`QuantumFramework`"];Needs["Wolfram`QuantumFramework`SecondQuantization`"]
In[1]:=
b=AnnihilationOperator[5]
Out[1]=
QuantumOperator
Pure map
​
Dimension: 5→5
Order: {1}→{1}

The drive couples neighboring levels with strengths 1,
2
,
3
and 2, so it drives the transition from
|1〉
to
|2〉
more strongly than the qubit transition:
In[2]:=
MatrixForm[(b+
†
b
)["Matrix"]]
Out[2]=
0
1
0
0
0
1
0
2
0
0
0
2
0
3
0
0
0
3
0
2
0
0
0
2
0
The envelope is a raised cosine of length
τ
and amplitude
A
. It and its slope vanish at both ends, so the DRAG term also starts and ends at zero, and at
A=1
its area is
π
:
In[3]:=
envelope=A(Pi/τ)(1-Cos[2Pit/τ])
Out[3]=
Aπ1-Cos
2πt
τ

τ
Write
H(t)
for any lowering operator
c
, so that the number of kept levels can be changed later:
In[4]:=
hamiltonian[c_]:=(α/2)
†
c
@
†
c
@c@c+δ
†
c
@c+​​(envelope/2)(c+
†
c
)-(λD[envelope,t]/(2α))(I(
†
c
-c));
Make
H(t)
for five levels one operator. Its
"Parameters"
list fixes the order in which numbers are supplied:
α
,
A
,
λ
,
δ
and
τ
:
In[5]:=
model=
QuantumOperator
[hamiltonian[b],"Parameters"{α,A,λ,δ,τ}]
Out[5]=
QuantumOperator
Pure map
​
Dimension: 5→5
Order: {1}→{1}

Times are in nanoseconds and frequencies in radians per nanosecond, so an anharmonicity of
α/2π=-200
MHz is:
In[6]:=
anharmonicity=-2Pi0.2
Out[6]=
-1.25664

Leakage

An uncalibrated 8 ns π pulse, with
A=1
, no DRAG and no detuning, starting from
|0〉
:
In[7]:=
psi=
QuantumEvolve
[model[anharmonicity,1,0,0,8],FockState[0,5],{t,0,8}]
Out[7]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 5

The populations of the three lowest levels during the pulse, together with the shape of the pulse scaled to a peak of 1:
In[8]:=
Plot[Evaluate[Append[psi[t]["ProbabilitiesList"]〚;;3〛,envelope/(envelope/.t4)/.{A1,τ8}]],{t,0,8},​​PlotStyle{Automatic,Automatic,Automatic,Directive[Gray,Dashed]},​​PlotLegends{"|0〉","|1〉","|2〉","pulse shape (scaled)"},​​PlotLabel"population change during a π pulse",​​FrameTrue,FrameLabel{"t (ns)","population"}]
Out[8]=
Population reaches
|2〉
through
|1〉
, since the drive couples only neighboring levels, and part of it stays there.
The populations at the end of the pulse:
In[9]:=
psi[8]["Probabilities"]
Out[9]=
|0〉0.0657671,|1〉0.838515,|2〉0.0956994,|3〉0.0000183186,|4〉1.90366×
-10
10

Single-qubit gates on current devices last about 35 ns. The same pulse at that length:
In[10]:=
QuantumEvolve
[model[anharmonicity,1,0,0,35],FockState[0,5],{t,0,35}][35]["Probabilities"]
Out[10]=
|0〉0.00387148,|1〉0.996127,|2〉1.10446×
-6
10
,|3〉1.9029×
-14
10
,|4〉1.63989×
-13
10

Leakage is now small, but the flip is still incomplete, because the drive shifts the qubit transition.

What DRAG Does

Define the final populations of a transmon truncated to
n
levels, without decay and dephasing. With strict precision goals the default integration method can stop partway through some pulses, so an explicit Runge-Kutta method is used:
In[11]:=
finalPopulations[n_,{amplitude_,drag_,detuning_,length_}]:=
QuantumEvolve
​​
QuantumOperator
[hamiltonian[AnnihilationOperator[n]],"Parameters"{α,A,λ,δ,τ}][​​anharmonicity,amplitude,drag,detuning,length],​​FockState[0,n],{t,0,length},Method"ExplicitRungeKutta",PrecisionGoal12,AccuracyGoal14[length]["ProbabilitiesList"]
At 8 ns, with
A=1
and no detuning, vary
λ
and compare the leakage, the final population outside the qubit levels, with the transfer error, the population missing from
|1〉
:
In[12]:=
ListLogPlot[Transpose@Table[With[{p=finalPopulations[5,{1,drag,0,8}]},{{drag,Total[p〚3;;〛]},{drag,1-p〚2〛}}],{drag,0,2,0.1}],​​JoinedTrue,PlotMarkersAutomatic,PlotLegends{"leakage","transfer error"},​​PlotLabel"8 ns π pulse",FrameTrue,FrameLabel{"λ","population"}]
Out[12]=
leakage
transfer error
The transfer error is the population left in
|0〉
plus the leakage, since the populations sum to one. Leakage is smallest just above the weak-drive value
λ=1
, but there almost all of the transfer error is population left in
|0〉
, and the transfer error is smallest at a much smaller
λ
: DRAG alone does not complete the flip. The amplitude and detuning are therefore calibrated together with
λ
.

The Best Pulse Length

To find the best length, include energy decay and dephasing and, as on a real device, calibrate the pulse controls with them present.
We describe the state by a density matrix
ρ(t)
in our truncated five-level model. Keeping the same Hamiltonian
H(t)
, it evolves under the Lindblad master equation:
dρ
dt
=-i[H(t),ρ]+
∑
μ∈{1,ϕ}
L
μ
ρ
†
L
μ
-
1
2
†
L
μ
L
μ
ρ-
1
2
ρ
†
L
μ
L
μ
.
The two Lindblad operators, with their rates included, are
L
1
=
b
T
1
,    
L
ϕ
=
2
T
ϕ
†
b
b.
The first describes energy decay from
|n〉
to
|n-1〉
at rate
n/
T
1
. The second describes pure dephasing: on its own, it damps the off-diagonal entries of
ρ
while leaving the populations unchanged. The pure dephasing time
T
ϕ
is related to the qubit’s energy decay time
T
1
and coherence time
T
2
by
With the density matrix, the transfer error is one minus the second diagonal entry at the end of the pulse:
The transfer error of the calibrated pulse at each length:
Leakage dominates at short lengths, and decay and dephasing at long ones, where both curves rise together. DRAG removes most of the leakage, so its curve turns up at a much shorter length and reaches a lower minimum. Near 10 ns the DRAG curve also has a dip narrower than the 1 ns spacing of the scan, whose bottom the scan cannot resolve; Da Costa Jesus et al. found such a dip for this pulse shape.
The lowest point of each curve:
The best pulses found in the scan: their lengths, errors with and without decay and dephasing, and controls:
Without decay and dephasing both pulses are far better, so decay and dephasing dominate their errors. The DRAG pulse wins by being shorter.

The Gate Error

Define the gate error:
The gate error of the best DRAG pulse:
The gate error of the best pulse without DRAG:

Five Levels Are Enough

Every result above keeps five levels. The leakage of the uncalibrated 8 ns pulse for a transmon truncated to three to six levels:
The best DRAG pulse has the smallest error without decay and dephasing, so a change from the truncation would show most there. That error with five and with six levels:
Three levels underestimate the leakage, while five and six agree for both pulses, so five levels are enough.

References

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com