quchip quchip

Model superconducting quantum chips from device physics to solver-ready dynamics.

quchip is an open-source Python toolkit for explicit, reusable, and differentiable chip models. This page follows one five-device model from declaration and simulation to crosstalk correction and parameter recovery. All values and results are drawn from the paper.

$ pip install quchip{{ copyHint }}
source on GitHub
01 · BUILDING A CHIP

Declare the physics, term by term

Each device contributes its local physics, each coupling an interaction, and each drive a path from control signals into the Hamiltonian. Together, they define the chip model.

+ +
DEVICES
ω ω+α ωr ωr DuffingTransmon Resonator
COUPLINGS
q1 q2 bus r1 r2 30 30 40 40 g in MHz
CONTROL LINES
xy₁ Ω(t) at ωd xy₂ β Ω(t) at ωd , phase +θ q₂ at 5.1900 copy at 5.3240 134 MHz
AND ALL OF IT, DECLARED {{ codeNote }}
q1 = DuffingTransmon(freq=5.3262, anharmonicity=-0.261, levels=4)
q2 = DuffingTransmon(freq=5.1919, anharmonicity=-0.263, levels=4)
bus, r1, r2 = Resonator(freq=6.30, levels=4), Resonator(freq=6.559, levels=3), Resonator(freq=6.658, levels=3)
couplings = [Capacitive(q1, bus, g=0.030), Capacitive(bus, q2, g=0.030),
Capacitive(q1, r1, g=0.040), Capacitive(q2, r2, g=0.040)]
xy1, xy2 = ChargeDrive(target=q1), ChargeDrive(target=q2)
beta, theta = [[1, 0.14], [0.16, 1]], [[0, 1.885], [3.31, 0]]
eq = ControlEquipment([xy1, xy2]); eq.set_crosstalk_matrix(beta, theta)
chip = Chip([q1, q2, bus, r1, r2], couplings=couplings, control_equipment=eq, frame="rotating", approximation=RWA())

Hover over a Hamiltonian term, diagram, or code line to follow the same contribution across all three.Tap Devices, Couplings, or Drives to follow one contribution across the equation, its diagram, and the code. Scheduling adds carrier and phase to each envelope; control equipment transforms the complete I/Q signals before the drives couple them into the Hamiltonian. The same model returns dressed transitions through chip.transition_frequency(...).

02 · THE ENGINE

From a chip declaration to a solver-ready model

quchip resolves each device in the selected solver basis, transforms the complete Hamiltonian into the reference frame, and applies one explicit approximation strategy. Native solving is the default; basis="eigen" projects every attached operator into a retained local energy basis. Terms removed by RWA() remain recorded for review.

5 devices
5.190–6.658 GHz, diagonal
· a few MHz
· a few MHz
StaticTerm
2 transmons
= −0.261/−0.263 GHz
StaticTerm
4 couplings
= 30–40 MHz
· 0.98–1.47 GHz
· 0.98–1.47 GHz
DynamicTerm
frequency
· 11.49–11.88 GHz
· 11.49–11.88 GHz
dropped_terms
2 lines + leaks
= 5.324/5.190 GHz
own tone ≈ 0 · leak 0.134 GHz
own tone ≈ 0 · leak 0.134 GHz
DynamicTerm
fast half · 10.38–10.65 GHz
fast half · 10.38–10.65 GHz
dropped_terms

Local bases, explicit

Native solving preserves the authored local operators. Setting basis="eigen" instead projects each device into a retained local energy basis before assembly.

Approximations leave a record

Exact() retains every authored term. RWA() removes selected structural bands from the same interaction and records each one in dropped_terms.

Observables stay in frame

Observables pass through the same frame machinery as the Hamiltonian, then return in each device’s reference frame. Populations remain frame invariant.

OBSERVABLE READOUT

A transverse observable is split into its two excitation bands before the solve and recombined afterward in the device’s reference frame. Populations belong to the zero-excitation band and are frame invariant.

e_ops = {r0: x} observable x w=+1: a w=−1: a† × × + band-resolved solver traces phase at ωdem recombined observable
e_ops: x observable x w=+1: a w=−1: a† × × + band-resolved solver traces phase at ωdem recombined observable
e_ops = {r0: x} observable x w=+1: a w=−1: a† × × + band-resolved solver traces phase at ωdem recombined observable
03 · SOLVE & DIFFERENTIATE

One model, two solver backends

The engine assembles one backend-independent simulation problem. QuTiP and dynamiqs translate it into their native solver forms, while unchanged models reuse the assembled Hamiltonian. With dynamiqs, gradients flow through signal transformation, Hamiltonian assembly, time evolution, and observable extraction.

THE USER AUTHORS
ENGINE
BACKENDS
DuffingTransmon
Capacitive
Resonator
ControlEquipment signal chain:
ChargeDrive target q₁
Chip frame="rotating", approximation=RWA()
QuantumSequence envelope ; frequency
the chip and its scheduled pulses
backend-agnostic simulation problem
basis + frame
physics assembly
observables
solve request
resolved basis + frame
EngineResult
prepared e_ops
SolveProblem
QuTiP
dynamiqs / JAX
SimulationResult
∇ℒ — one gradient
∇ℒ — one gradient
THE USER AUTHORS
DuffingTransmon
Capacitive
Resonator
ControlEquipment signal chain:
ChargeDrive target q₁ · no traced parameter
Chip frame="rotating", approximation=RWA()
QuantumSequence envelope ; frequency
ENGINE
basis + frameresolved basis + frame
physics assemblyEngineResult
observablesprepared e_ops
solve requestSolveProblem
BACKENDS
QuTiP
dynamiqs / JAX
SimulationResult

Gradients can reach the parameters that define the model: device frequencies, coupling strengths, crosstalk, carrier frequencies, and pulse envelopes.

04 · CLOSING THE EXPERIMENTAL LOOP

Identify, correct, and recover crosstalk

On the paper’s five-device model, phase sweeps identify two directed leakage phasors. Inverting the fitted response matrix then suppresses effective leakage by more than 100×. Finally, the same model is reduced and differentiated to recover the four underlying crosstalk parameters from simulated tomography.

uncorrected corrected / fit ideal / crosstalk-free
(a) identification, qubit 1
β=0.1660 θ=3.304 rad 1 −1 ⟨Z⟩ relative phase Δφ (π)
(b) identification, qubit 2
β=0.1379 θ=1.834 rad relative phase Δφ (π)
(e) 16-pulse closure · of qubit 1
1 0.5 0 0 4 8 12 16 simultaneous pulses
(c) correction, qubit 1
1 −1 ⟨Z⟩ relative phase Δφ (π)
(d) correction, qubit 2
relative phase Δφ (π)
≤ 0.00272max RMS residual of the fits
> 100×effective leakage suppression
< 0.3%absolute population error after 16 simultaneous π pulses
ADIABATIC MODEL REDUCTION

quchip’s eliminate() removes the bus and readout resonators while retaining their effective influence on the two qubits, reducing the Hilbert-space dimension from 576 to 16. Gradients through the reduced simulation then recover two crosstalk magnitudes and two phases from simulated tomography.

(a) magnitude
0.16 0.00
(b) phase (rad)
π −π optimization step
(c) tomography MSE
1e-2 1e-4 1e-6 1e-8 optimization step
576 → 16Hilbert dimension, via eliminate()
4 parameterstwo magnitudes and two phases
1.5 × 10⁻⁵max complex error after 320 Adam steps

Both studies begin from the same chip declaration, and the plots use data recorded for the paper. Read the paper for the full methods and derivations.

Getting started

Start with one chip declaration, then analyze, reduce, sequence, simulate, sweep, or differentiate it. See PHYSICS.md for the implemented conventions and approximations.

$ pip install quchip{{ copyHint }}
docs.quchip.org
Python ≥ 3.11 · Apache 2.0
Occasional updates on releases and results.