Quantum system components API#
cudaq_pulse.quantum_systems holds what pulse.quantum_system(name=...,
qudits=..., couplings=..., model=...) builds a quantum system
(Quantum system API) from: its qudits, couplings and decoherence, the
components of their drive and readout, their gate calibrations and the
simulation models, and the shipped quantum systems.
-
class cudaq_pulse.quantum_systems.PhysicalQudit(
)[source]#index,frequency_hz,t1_us,t2_star_us,*,anharmonicity_hz=None,label='',drive=None,readout=None,t2_echo_us=None,thermal_population=0.0,calibrations={},metadata=mappingproxy({}),
Bases:
_QuditFieldsOne qudit of a quantum system.
frequency_hzis its 0-1 frequency, more than 0.Nonesays the system does not state it: every frequency of its programs is then an offset from the qudit’s own carrier (a tone at 0 Hz is on resonance,set_frequency(tone, 1e6)is 1 MHz above it), as on a control stack that owns the carrier and takes offsets only; a system whose qudits give none declares no couplings, which act by the difference of two qudits’ frequencies.Offset(hz)gives the frequency as an offset from one reference the system’s qudits share and the system does not state: every difference is then known, and couplings compute on the offsets. A system’s qudits give their frequencies all one way.anharmonicity_hzis where a level above the first sits off evenly spaced levels;None(the default) is a qudit that gives none, which aTransmonModelof more than two levels refuses, naming the qudit.driveandreadoutare its physics: how it is driven and read out, each by the component of its modality (MicrowaveDrive,DispersiveReadout), orNonewhen not given.calibrations=gives the pulses it is tuned for, by gate:{pulse.gates.X: DragPulse(...), pulse.gates.READOUT: ReadoutPulse(...)}(a key(gate, (lower, upper))for a transition other than (0, 1)),calibrationsgives them as published, andget_calibrationreads them, deriving what is not given.metadatais the user’s own data (JSON values), which the library never reads, and which does not make a quantum system differ; values the library knows are fields, never metadata. A qubit is read-only:replacemakes a changed copy.- Parameters:
index (int)
frequency_hz (float)
t1_us (float)
t2_star_us (float)
anharmonicity_hz (float | None)
label (str)
drive (Drive | None)
readout (Readout | None)
t2_echo_us (float | None)
thermal_population (float)
calibrations (Mapping[Any, DragPulse | VirtualZ | ReadoutPulse])
metadata (Mapping[str, Any])
- replace(**changes)[source]#
A copy with the fields changes names set to their values.
- Parameters:
changes (Any)
- Return type:
Self
- property depletion_ns: float#
How long after a readout the next one must wait: for a
DispersiveReadout, itsdepletion_nsif given, else the time for its photons to fall to 1% at itslinewidth_hz, ln(100) / kappa; else 0.
- property calibrations: Mapping[Gate | tuple[Gate, tuple[int, int]], DragPulse | ReadoutPulse]#
The calibrations the qudit publishes, as
calibrations=gives them: bypulse.gates.Gate, or by(gate, (lower, upper))for a transition other than (0, 1); read-only. Only what is published:get_calibrationalso derives the rest (X90fromX, an unpublished amplitude).replace(calibrations={**q.calibrations, pulse.gates.X: pulse})changes one.
-
get_calibration(
) DragPulse[source]#gate: Literal[Gate.X, Gate.X90, Gate.Y, Gate.Y90],transition: tuple[int, int] = (0, 1),
-
get_calibration(
) VirtualZgate: Literal[Gate.Z, Gate.S, Gate.T],transition: tuple[int, int] = (0, 1),
-
get_calibration(
) ReadoutPulsegate: Literal[Gate.READOUT],transition: tuple[int, int] = (0, 1),
-
get_calibration(
) DragPulse | VirtualZ | ReadoutPulsetransition: tuple[int, int] = (0, 1),
The calibrated pulse of gate on the qubit’s transition, by the rules of
pulse.gates:X,X90,YandY90aDragPulse(X90half ofX,YandY90at +90 degrees, where not published; an unpublished amplitude makes the rotation),Z,SandTaVirtualZ(by pi, pi / 2 and pi / 4, where not published),READOUTaReadoutPulse. A calibration it neither publishes nor derives is aNotFoundErrornaming the qubit.- Parameters:
gate (Any)
transition (tuple[int, int])
- Return type:
Any
- class cudaq_pulse.quantum_systems.Offset(x=0, /)[source]#
Bases:
floatA qudit’s frequency as an offset in Hz from one reference that the system’s qudits share and the system does not state:
PhysicalQudit(1, Offset(1.5e8), 50.0, 30.0)is 150 MHz above the qudit atOffset(0.0). Every difference of two such qudits’ frequencies is known, so couplings and whatever derives from them compute as on a system with frequencies, and every frequency of the system’s programs is an offset from the same reference.It is a
floatthat says what it is measured from: arithmetic on it gives a plainfloat, and it equals only anotherOffsetof the same value, so a qudit atOffset(5e9)is not the qudit at 5 GHz. It is ordered against otherOffsetvalues only:<with a number is anInvalidTypeError(aTypeError, as between astrand a number);float(offset)is the number. An object that is not a number decides the comparison itself, sopytest.approx(1.5e8)equalsOffset(1.5e8)either way round.An offset is an
Offsetitself: the package tells one by its exact class, and takes an instance of a subclass for thefloatit is.This holds with the
Offseton the left, and on either side of anintor afloat. With another kind of number on the left (aDecimal, acomplex, aFraction, a NumPy float) Python asks that number first, and it compares by value:Decimal(1) == Offset(1.0)is true whereOffset(1.0) == Decimal(1)is false, andDecimal(1) < Offset(2.0)is an answer, not an error.
Drive and readout#
A qudit’s drive and readout are components of their modality: a
MicrowaveDrive and a DispersiveReadout for a transmon. A drive of
another modality, or of none the system states, is a plain Drive:
Drive(amplitude_scale_rad_per_ns=s) gives the Rabi rate of a pulse of
amplitude 1, which is all the simulator needs of a drive. They hold the
qudit’s physics only; the pulses it is tuned for are its calibrations
(below). They are read-only values; component.replace(field=value) makes
a changed copy.
Simulation picks its model by the component’s type and refuses one it has no
model for. In a system file each is a mapping with its kind
("microwave" or, for a plain Drive, "drive"; "dispersive")
and its fields.
- class cudaq_pulse.quantum_systems.Drive(*, amplitude_scale_rad_per_ns=None)[source]#
Bases:
_ComponentHow a qudit is driven: a drive of no stated modality, and the base of the drive modalities, such as
MicrowaveDrive.amplitude_scale_rad_per_nsis the Rabi rate in rad/ns of a pulse of amplitude 1, whatever carries the drive. The simulator turns a pulse’s amplitude into a Rabi rate by it; without it, by the scale that makes the qudit’sXcalibration a pi rotation, if that gives an amplitude; else 1.0. Simulation picks a drive’s model by its type: it drives aDriveand aMicrowaveDriveso, and refuses another subclass, which it has no model for. A subclass with fields of its own states them all in_fields.- Parameters:
amplitude_scale_rad_per_ns (float | None)
- class cudaq_pulse.quantum_systems.MicrowaveDrive(*, amplitude_scale_rad_per_ns=None)[source]#
Bases:
DriveA microwave drive: the physics of the qudit’s drive.
Its one field is
Drive’samplitude_scale_rad_per_ns, the Rabi rate in rad/ns of a pulse of amplitude 1. The tuned pulses are the qudit’s calibrations (get_calibration).- Parameters:
amplitude_scale_rad_per_ns (float | None)
- class cudaq_pulse.quantum_systems.Readout[source]#
Bases:
_ComponentHow a qudit is read out: the base of the readout modalities, such as
DispersiveReadout. Simulation and emulation pick a readout’s model by its type, and refuse a type they have no model for.- property frequency_hz: float | None#
The frequency its readout line plays at by default (
None: the qudit’s 0-1 frequency).
-
class cudaq_pulse.quantum_systems.DispersiveReadout(
)[source]#*,frequency_hz=None,dispersive_shift_hz=None,linewidth_hz=None,efficiency=0.5,error_1to0=0.0,error_0to1=0.0,depletion_ns=None,
Bases:
ReadoutA dispersive readout through a resonator: the physics of the qudit’s readout. Every field may be left out.
frequency_hzis the resonator’s frequency, where the readout line plays by default; on a system whose qudits give their frequencies as offsets from a shared reference it is anOffsetfrom the same reference, and a system whose qudits give no frequencies takes none. The readout model in simulation and emulation (IQModel) pulls the resonator by(2k - 1) dispersive_shift_hzfor levelk, with linewidthlinewidth_hz(kappa / 2 pi), and needs both.error_1to0anderror_0to1are the probabilities of reporting 0 for|1>and 1 for|0>. The resonator empties indepletion_ns(else ln(100) / kappa) at measurement efficiencyefficiency.The readout pulse the quantum system is tuned for is the qudit’s
READOUTcalibration, aReadoutPulse.- Parameters:
frequency_hz (float | None)
dispersive_shift_hz (float | None)
linewidth_hz (float | None)
efficiency (float)
error_1to0 (float)
error_0to1 (float)
depletion_ns (float | None)
Couplings#
- class cudaq_pulse.quantum_systems.Coupling(qudits, strength_hz, calibrations={})[source]#
Bases:
objectA coupling of the qudits
quditsof a quantum system: two in this release, by the system’s qudit index, in the order the coupling names them (transmon_surface17’s are (auxiliary, data)).The system’s
modeldecides the operator; aTransmonModelcoupling is the exchange g (a^dagger b + a b^dagger), in the rotating-wave approximation, andstrength_hzis g / 2 pi. Astrength_hzofNoneis one not measured yet: the system compiles, schedules and exports, andsimulaterefuses it.calibrations=gives the gates it is tuned for,{pulse.gates.CZ: FluxCZ(...)}, whichcalibrationsgives back andget_calibrationreads. A coupling is read-only:replacemakes a changed copy.A plain slotted class, as
PhysicalQuditis: its calibrations are private storage, which a dataclass field could not be and still be the constructor’scalibrations=.- Parameters:
qudits (tuple[int, ...])
strength_hz (float | None)
calibrations (Mapping[Any, FluxCZ])
- qudits: tuple[int, ...]#
- strength_hz: float | None#
- replace(**changes)[source]#
A copy with the fields changes names set to their values.
- Parameters:
changes (Any)
- Return type:
Self
- property calibrations: Mapping[Gate | tuple[Gate, tuple[int, int]], FluxCZ]#
The calibrations the coupling publishes, as
calibrations=gives them: bypulse.gates.Gate(CZ), or by(gate, (lower, upper))for a transition other than (0, 1); read-only.
- get_calibration(gate, transition=(0, 1))[source]#
The calibration of gate (
pulse.gates.CZ) on the coupling; aNotFoundErrorif it publishes none.- Parameters:
gate (Any)
transition (tuple[int, int])
- Return type:
- class cudaq_pulse.quantum_systems.ResidualZZ(qudits, rate_hz)[source]#
Bases:
objectResidual ZZ between the qudits
qudits(two, by the system’s qudit index), in addition to what the couplings produce.rate_hzis the ZZ rate zeta / 2 pi, zeta = E11 - E10 - E01 + E00, modeled as zeta n_a n_b.- Parameters:
qudits (tuple[int, ...])
rate_hz (float)
- qudits: tuple[int, ...]#
- rate_hz: float#
- class cudaq_pulse.quantum_systems.ReadoutCrosstalk(resonator_of, qudit, chi_hz)[source]#
Bases:
objectThe shift a readout of qudit
resonator_ofgives quditqudit(each by the system’s qudit index) through the photons in its resonator.chi_hzis the shift in Hz per photon: while the resonator holds n photons, level j ofquditmoves by j timeschi_hztimes n. A tuple gives it by the level ofresonator_of, a higher level taking the last value, as(-20e3, -26e3)for its levels 0 and 1; values for levels a simulation does not keep are not used. The photons follow the readout as played, its tone, amplitude, ring-up and ring-down, from the qudit’sDispersiveReadout.- Parameters:
resonator_of (int)
qudit (int)
chi_hz (float | tuple[float, ...])
- resonator_of: int#
- qudit: int#
- chi_hz: float | tuple[float, ...]#
Gate calibrations#
The pulses a quantum system is tuned for are calibrations, by gate
(pulse.gates): a qudit’s calibrations= give its X (and, if
published, X90, Y, Y90) as a DragPulse, its READOUT as
a ReadoutPulse and, if published, its Z, S and T as a
VirtualZ; a coupling’s calibrations= give its CZ as a FluxCZ. A key
(gate, (lower, upper)) holds another transition’s. get_calibration
reads them, deriving what is not published; neither a qudit nor a coupling
has another read of them:
import cudaq_pulse as pulse
from cudaq_pulse.quantum_systems import DragPulse, PhysicalQudit, ReadoutPulse
qubit = PhysicalQudit(
0, 5.0e9, 50.0, 30.0, anharmonicity_hz=-2.0e8,
calibrations={
pulse.gates.X: DragPulse(duration_ns=40.0, sigma_ns=10.0),
pulse.gates.READOUT: ReadoutPulse(duration_ns=300.0, integration_ns=400.0),
},
)
qubit.get_calibration(pulse.gates.X90) # X at half the amplitude of a pi rotation
In a system file a qudit’s or coupling’s calibrations is a list of
entries, each its gate, its transition if not [0, 1], and its
fields. A qudit’s metadata is the user’s own data (JSON values): the
library never reads it, it does not make two quantum systems differ, and system
files keep it.
The gates a quantum system is calibrated for, which get_calibration takes.
In a kernel, a line gives the calibrated pulse of its qudit’s gates, ready to play:
d = get_drive_line(q)
drive(d, d.get_calibration(pulse.gates.X)) # a DragPulse
drive(d, d.get_calibration(pulse.gates.T)) # a VirtualZ: a frame change
r = get_readout_line(q)
readout(r, r.get_calibration(pulse.gates.READOUT)) # a ReadoutPulse
Outside one, a qudit handle and a coupling give the same values:
qs.qudits[i].get_calibration(pulse.gates.X) and
qs.coupling(a, b).get_calibration(pulse.gates.CZ) (a FluxCZ).
X, X90, Y, Y90, Z, S and T are the gates of a
drive line, READOUT of a readout line and CZ of a coupling. What a
quantum system does not publish is derived: an X without an amplitude
gets the one that makes its area a pi rotation, X90 is X at half the
amplitude, and Y and Y90 are X and X90 at +90 degrees.
Z, S and T are virtual Z rotations by pi, pi / 2 and pi / 4
(VirtualZ): played, each shifts the phase of the tone’s frame, which
takes no time and plays no pulse. An unpublished CZ or READOUT is a
NotFoundError naming the coupling or qudit. transition=(1, 2) asks
for the calibration of another transition: its pulses must be published,
and its virtual Zs are derived as on (0, 1).
There are no inverse gates, as there is no -90 degree pulse: a
calibration’s replace gives one, t.replace(phase_rad=-t.phase_rad)
for the inverse of T.
- class cudaq_pulse.gates.Gate(*values)[source]#
Bases:
StrEnumA gate a quantum system is calibrated for; see the module docstring.
- X = 'x'#
A drive line’s pi rotation. An
Xwithout a published amplitude gets the one that makes its area a pi rotation.
- X90 = 'x90'#
A drive line’s pi / 2 rotation, derived as
Xat half the amplitude unless the quantum system publishes it.
- Y = 'y'#
A drive line’s Y gate, derived as
Xat +90 degrees unless the quantum system publishes it.
- Y90 = 'y90'#
A drive line’s Y90 gate, derived as
X90at +90 degrees unless the quantum system publishes it.
- Z = 'z'#
A drive line’s virtual Z rotation by pi: a frame change that takes no time and plays no pulse.
- S = 's'#
A drive line’s virtual Z rotation by pi / 2.
- T = 't'#
A drive line’s virtual Z rotation by pi / 4.
- CZ = 'cz'#
A coupling’s CZ gate; an unpublished one is a
NotFoundError.
- READOUT = 'readout'#
A readout line’s readout pulse; an unpublished one is a
NotFoundError.
-
class cudaq_pulse.quantum_systems.DragPulse(
)[source]#*,duration_ns,sigma_ns,amplitude=None,beta_ns=0.0,phase_rad=0.0,
Bases:
_ComponentThe calibrated pulse of a drive-line gate (
X,X90,Y,Y90): a DRAG pulse, a Gaussian of widthsigma_nsoverduration_nswith peakamplitudeand DRAG coefficientbeta_ns, at phasephase_rad(YisXat pi / 2).In a kernel,
drive(line, pulse)plays it:drag(duration_ns * ns, amplitude, sigma_ns * ns, beta_ns * ns), timesexp(i phase_rad)when the phase is not 0. AnamplitudeofNoneis one not published:get_calibrationgives the pulse the amplitude that makes its rotation, at the qudit’s drive scale.- Parameters:
duration_ns (float)
sigma_ns (float)
amplitude (float | None)
beta_ns (float)
phase_rad (float)
- class cudaq_pulse.quantum_systems.VirtualZ(*, phase_rad)[source]#
Bases:
_ComponentThe calibration of a phase gate (
Z,S,T): a virtual Z rotation byphase_rad, which takes no time and plays no pulse.In a kernel,
drive(line, z)plays it asshift_phase(line.tone, z.phase_rad)(attone=if given): the frame of the tone advances, and every later pulse at that tone turns about an axis rotated by-phase_rad, so that the qudit’s state, read in the frame, isRz(phase_rad)applied to the state the pulses alone make. The state a simulation returns is in the frame: a virtual Z after the last pulse does not change it (see Phase frames and virtual Z gates in the operations guide).- Parameters:
phase_rad (float)
-
class cudaq_pulse.quantum_systems.ReadoutPulse(
)[source]#*,duration_ns=None,amplitude=None,sigma_ns=None,integration_ns=None,photon_number=4.0,
Bases:
_ComponentThe calibrated readout pulse of a qudit (
READOUT): of peakamplitudeit holdsphoton_numberphotons in the resonator (with noamplitude, any amplitude played does), lastsduration_ns, has edges of widthsigma_nsand is integrated overintegration_ns(else the readout’s length).In a kernel,
readout(line, pulse)plays it:gaussian_squarewith edges of 2sigma_nsgiven asigma_ns, elsesquare, atamplitude(1.0 when not published).- Parameters:
duration_ns (float | None)
amplitude (float | None)
sigma_ns (float | None)
integration_ns (float | None)
photon_number (float)
- class cudaq_pulse.quantum_systems.FluxCZ(*, duration_ns, buffer_ns=None, interaction_frequency_hz=None)[source]#
Bases:
_ComponentThe calibrated CZ of a coupling (
CZ), made by a flux pulse: it takesduration_nswithbuffer_nsof idle time around it, and its qudits interact atinteraction_frequency_hz;Nonewhere not given. Flux lines are not modeled yet: a kernel leaves its qudits idle for itsduration_ns.- Parameters:
duration_ns (float)
buffer_ns (float | None)
interaction_frequency_hz (float | None)
Simulation models#
A quantum system’s model says how the simulator treats its qudits and how many
levels each has. Each model class declares its levels; an instance sets a
qudit’s own, keyed by the system’s qudit index:
from cudaq_pulse.quantum_systems import PhysicalQudit, TransmonModel
qubits = {
i: PhysicalQudit(index=i, frequency_hz=f, anharmonicity_hz=-2.0e8, t1_us=50.0, t2_star_us=30.0)
for i, f in enumerate([5.0e9, 5.2e9])
}
# Qudit 0 has four levels; qudit 1 has the model's default.
chip = pulse.quantum_system(name="chip", qudits=qubits, model=TransmonModel(levels={0: 4}))
The model also gives a drive line its transitions: line.tones has a tone
for each (lower, upper) pair of the qudit’s levels, at the frequency
transitions_hz gives it, and the line’s own tone, line.tone, is the
one of default_transition. A model numbers its levels from 0; one whose
levels have names says in its docstring which number each name has.
- class cudaq_pulse.quantum_systems.SimulationModel(levels=None)[source]#
Bases:
objectA model of a system’s qudits, with
levelslevels each.The base model describes qudits by their 0-1 frequency alone, as evenly spaced levels, and has no simulator: a system with it compiles and exports, and
simulaterefuses it. Subclasses that simulate override_simulate.A model is read-only: its levels by qudit are fixed when it is made. This class and
TransmonModelare immutable, as built-in types are (import cudaq_pulsefreezes them), so what they give a qudit never changes and a step resolved for it stays right (runtime.simulate._STEPS); subclass them to change it.- Parameters:
levels (ClassVar[int])
- levels: ClassVar[int] = 2#
Levels per qudit, unless the instance sets a qudit’s own.
- default_transition: ClassVar[tuple[int, int]] = (0, 1)#
The transition, as
(lower, upper)levels, that a line’s own tone (line.tone, at the qudit’sfrequency_hz) drives.
- levels_of(qudit)[source]#
The levels of qudit qudit: its own, else the model’s.
- Parameters:
qudit (int)
- Return type:
int
- energies_hz(qudit, levels)[source]#
The energies of qudit’s first levels levels, in Hz from its ground level: evenly spaced by its 0-1 frequency.
- Parameters:
qudit (PhysicalQudit)
levels (int)
- Return type:
list[float]
- transitions_hz(qudit, levels)[source]#
The frequency in Hz of each transition between qudit’s first levels levels, by
(lower, upper)level, ordered by level.- Parameters:
qudit (PhysicalQudit)
levels (int)
- Return type:
dict[tuple[int, int], float]
- class cudaq_pulse.quantum_systems.TransmonModel(levels=None)[source]#
Bases:
SimulationModelTransmons: anharmonic oscillators, each level
katk f01 + k (k - 1) / 2 alphawithalphathe qubit’s anharmonicity, coupled by exchange.- Parameters:
levels (ClassVar[int])
- levels: ClassVar[int] = 3#
Levels per qudit, unless the instance sets a qudit’s own.
- energies_hz(qudit, levels)[source]#
The energies of qudit’s first levels levels, in Hz from its ground level: evenly spaced by its 0-1 frequency.
- Parameters:
qudit (PhysicalQudit)
levels (int)
- Return type:
list[float]
Shipped quantum systems#
- cudaq_pulse.quantum_systems.transmon_surface17(calibration='transmon_surface17')[source]#
17-qubit surface-code quantum system of Krinner et al., Nature 605, 669 (2022).
Qudits 0-16 are D1-D9, X1-X4, Z1-Z4, the column order of the paper’s Tab. I;
PhysicalQudit.labelcarries the name. The 24 couplings are the auxiliary-data pairs of the stabilizers of Tab. II:Z1: D1 D4 X1: D2 D3 Z2: D4 D5 D7 D8 X2: D1 D2 D4 D5 Z3: D2 D3 D5 D6 X3: D5 D6 D8 D9 Z4: D6 D9 X4: D7 D8
Data qubits idle at 3.74-4.14 GHz (their lower sweet spot) and auxiliary qubits at 5.89-6.33 GHz (their upper one), with idle frequencies, anharmonicities, T1 and Ramsey T2* from Tab. I.
The paper’s device-wide J / 2 pi ~ 7 MHz (Methods A) is the
|11> <-> |20>coupling of the CZ at each pair’s interaction point (7.4 MHz measured on X2-D4 at 4.4 GHz, Hellings et al., arXiv:2503.04610). calibration (aCalibration, the name of a shipped one, or None) supplies the system-wide charge coupling g_c (fitted to the X2-D4 measurement, 3.12 MHz intransmon_surface17), and each coupling is the exchange J_qq = g_c<0|n_a|1> <0|n_d|1>at the qubits’ idle points: 5.67-6.08 MHz with the shippedtransmon_surface17. Withcalibration=Noneit is the published value over sqrt(2), 4.95 MHz. Each coupling’sCZcalibration is aFluxCZ: 98 ns on average, with 15 ns buffers, at the pair’s interaction frequency of Fig. 6c.CZ_LAYERSgives the time steps the CZs run in. Each qudit’sXis the published 40 ns DRAG pulse with sigma = 10 ns; its amplitude is not published, so amplitudes are angular rates in rad/ns andget_calibrationgives the pi pulse’s. Readout physics is that of Tab. I, and theREADOUTpulse that of App. F1. The shippedtransmon_surface17calibration fits what the paper does not publish: eachX’s DRAG coefficient (0.51-0.58 ns), anXof each qudit’s 1-2 transition (transition=(1, 2), 20 ns) and readout assignment errors with whichreadout="model"reproduces Tab. I’s two-state readout errors.calibration=Noneleaves them out.No residual ZZ is listed: the paper gives no per-pair values, only that the calculated idle ZZ is below about 8 kHz. Simulated with three or more levels, the couplings produce it;
transmon_surface17_idle_zz_hzgives the charge model’s value, -4.5 to -7.3 kHz withtransmon_surface17.- Parameters:
calibration (Any)
- Return type:
- cudaq_pulse.quantum_systems.transmon.CZ_LAYERS: tuple[tuple[tuple[int, int], ...], ...]#
The CZs of one error correction cycle of
transmon_surface17, layer by layer (Fig. 3a and the edge labels of Fig. 6c): each layer is three CZs on disjoint pairs, each pair the (auxiliary, data) qudit indices of a coupling. Layers 1-4 measure the Z stabilizers, 5-8 the X stabilizers.
-
cudaq_pulse.quantum_systems.transmon_lattice(
)[source]#qudit_count,*,base_frequency_hz=5000000000.0,frequency_range_hz=100000000.0,anharmonicity_hz=-330000000.0,coupling_strength_hz=3000000.0,t1_us=25.0,t2_star_us=15.0,topology='linear',
A transmon quantum system of qudit_count uniform qudits on a chain, ring or grid, named
"transmon_lattice:N"("transmon_lattice:N:ring"or":grid"for the other topologies), as the registry names it.- Parameters:
qudit_count (int) – Number of qudits.
base_frequency_hz (float) – Frequency of qudit 0.
frequency_range_hz (float) – Total frequency range, from qudit 0 to qudit N-1: qudit i is at
base_frequency_hz + i * frequency_range_hz / (N - 1).anharmonicity_hz (float) – Uniform anharmonicity (negative for transmon).
coupling_strength_hz (float) – Uniform nearest-neighbor coupling.
t1_us (float) – Uniform decoherence times.
t2_star_us (float) – Uniform decoherence times.
topology (str) –
"linear"(chain),"ring", or"grid"(square lattice with side length = ceil(sqrt(qudit_count))).
- Return type:
Registering quantum systems#
- cudaq_pulse.quantum_systems.register_quantum_system(name, factory)[source]#
Make factory available as
quantum_system("name[:arg]")andCUDAQ_PULSE_QUANTUM_SYSTEM=name[:arg].factory receives the text after the colon, or
None, and returns aQuantumSystem(or an object withto_quantum_system()), aspulse.quantum_system(name=..., qudits=...)builds one; the name gives its qudits, couplings and model. Registering only adds a name: which quantum system a process uses is still chosen by the environment.- Parameters:
name (str)
factory (Callable[[str | None], Any])
- Return type:
None
- cudaq_pulse.quantum_systems.available_quantum_systems()[source]#
Names that
quantum_system()andCUDAQ_PULSE_QUANTUM_SYSTEMaccept.The list is sorted, and it includes names added with
register_quantum_system. Some names take an argument after a colon:"transmon_lattice"on its own is an error — a lattice needs a qudit count, so pass"transmon_lattice:4"(or"transmon_lattice:4:ring"for a ring topology).Example:
available_quantum_systems() ['transmon_lattice', 'transmon_surface17']
- Return type:
list[str]