QCoDeS [UNRELEASED DRAFT] (2026-11-09)¶
Breaking Changes:¶
Several instrument driver parameters now return numbers or booleans instead of the raw string from the instrument, or an integer for an on/off state. Code that compares the returned value to a string, or to
0/1by identity, needs updating:Keithley2450.line_frequencyandKeithley2450Sense.countnow returnint, andKeithley2450Sense.nplcandKeithley2450Source.delayreturnfloat.Keithley7510Sense.user_delaynow returnsfloat, andKeithley7510Sense.average_count,Keithley7510DigitizeSense.acq_rateandKeithley7510DigitizeSense.countreturnint.SR86xBuffer.count_capture_kilobytesnow returnsint.RigolDG1062Burst.ncyclesnow returnsint, andRigolDG1062Burst.phase,RigolDG1062Burst.time_delayandRigolDG1062Channel.duty_cyclereturnfloat.RigolDS1074Z.trigger_levelandTektronixTPS2012.trigger_levelnow returnfloat.TektronixDPOHorizontal.record_lengthnow returnsintinstead offloat, as the record length is a number of samples.AgilentE8267C.pulse_widthnow returnsfloatand its unit issinstead ofns, matching the value sent to and returned by the instrument.RohdeSchwarzRTO1000ScopeChannel.impedanceandKeysightE4980A.rangenow returnfloat.RohdeSchwarzZNBChannel.bandwidthnow returnsfloat, e.g.10000.0instead of10000.The channel
stateanddirect_outputand the instrumentDC_outputofTektronixAWG5014now returnbool. They acceptTrue/False,1/0and"on"/"off".TektronixAWG5014.sequence_posnow returnsint.KeysightB1520A.ac_dc_volt_monitornow returnsbooland also accepts1/0and"on"/"off". (#8658)
The field units of an
AMIModel430can no longer be changed while it is part of anAMIModel4303D, and doing so now raises aRuntimeError. The set point and field limit of the 3D driver are in the field units of the magnets, so changing them silently changed their meaning by a factor of 10. Set the field units before creating the 3D driver, or close the 3D driver first.The coordinate vectors of
AMIModel4303D(cartesian,spherical,cylindricaland their*_measuredversions) now return a named tuple (CartesianVector,SphericalVectororCylindricalVectorfromqcodes.math_utils) instead of a list, so the components can also be accessed by name, e.g.cartesian_measured().z. Code that compares the result to a list, or modifies it, needs updating. Setting these parameters still accepts lists, tuples and numpy arrays. (#8679)The
trigger_countparameter ofKeithley6500, which sets the number of times a scan is repeated (ROUT:SCAN:COUN:SCAN), now accepts the full range documented in the DMM6500 Reference Manual: 0 to 100,000,000, where 0 repeats the scan until it is aborted. It previously only accepted 1 to 9999 or the strings"inf","default","minimum"and"maximum", which were copied from the Keithley 2000 and are not documented for this command. These strings are now rejected; use 0 instead of"inf". Whole-number floats are accepted and sent as integers, and the parameter is annotated asParameter[int, Self]. (#8694)The
auto_zero_onceparameter ofKeithley7510Senseand thetrigger_in_ext_clearparameter ofKeithley7510have been replaced by methods of the same name. Both were command-only parameters, so calling them without an argument, e.g.dmm.sense.auto_zero_once(), only returned the cached value and did not send anything to the instrument. Calling them like this now sends the command. Code that passed a value to them, e.g.dmm.trigger_in_ext_clear(None), must drop the argument, and they are no longer part of the instrument’s parameters or snapshot. (#8694)
Improved:¶
Fixed a rare error on Python 3.12 and 3.13 where closing an instrument could fail with
RuntimeError: dictionary changed size during iterationif the garbage collector cleaned up another instrument at the same time. The instrument then stayed registered, so its name could not be reused. (#8680)The “Creating Instrument Drivers” example notebook now explains how to annotate a parameter with the type of its value, e.g.
Parameter[float, Self], and all of its example drivers are annotated this way. This also fixed bugs in the example code: the Ithaco example passedunitsinstead ofunit, the Keithley 2600 example lacked itsmodelattribute and_display_settextmethod, and the Alazar example used outdatedTraceParameterarguments. (#8694)Dataset preparation now writes startup metadata and the snapshot in one transaction, inserting the snapshot after the other run metadata updates to avoid repeatedly rewriting large snapshots. The complete snapshot is committed before background writers and pending subscribers are started.
Improved Drivers:¶
Add convenience methods to Tektronix DPO7200xx (
single,download_waveforms,get_timebase) and AWG70000A (upload_seqx) drivers for streamlined waveform acquisition and sequence upload workflows. (#7865)Most instrument driver parameters are now annotated with the type of their value, e.g.
Parameter[float, Self], so static type checkers can infer the type returned bygetand accepted byset. As part of this, the mock instruments no longer pass the defaultparameter_class=Parameterexplicitly, andKeysight34980A.moduleis typed as a mapping from slot number to switch matrix submodule.Fixed the following driver bugs found along the way:
RigolDS4000.enable_auto_scalealways read back asTrue, sincebool("0")isTrue, and was set withTrue/Falseinstead of1/0.RohdeSchwarzRTO1000.trigger_modequeried the trigger source instead of the trigger mode.Keithley6500.digitssent a set command with a stray?.MessageBuilder.pch_queryof the Keysight B1500 sentPCHinstead ofPCH?.LakeshoreModel325Heater.output_rangeaccepted the high (25 W) range on loop 2, which is only supported on loop 1.LakeshoreModel325Sensor.curve_indexnow accepts0(no curve), which the instrument also reports when the selected curve does not match the input, and rejects non-integer values. Whole-number floats such as23.0are still accepted and sent as integers.The
LakeshoreModel325curve list now includes user curve 35, soupload_curve(35, ...)no longer raises anIndexError.LakeshoreModel325Curve.get_datanow reads all 200 points of a curve instead of 199.LakeshoreModel325Curve.set_datanow writes curve points with 6 significant digits, the resolution of the instrument, instead of rounding them to 3 decimals.LakeshoreModel325Sensor.curvenow raises aRuntimeErrorwhen no curve is selected for the sensor, instead of returning a curve 0, which the instrument does not have.RohdeSchwarzZNBChannel.bandwidthfailed to read a non-integer bandwidth such as 1.5 Hz, which the instrument supports.The
current_complianceandpower_complianceof theKeysightB1517Asweep could not be set back toNone, which leaves the compliance out of theWVcommand. Since a power compliance can only be sent together with a current compliance, clearing the current compliance also clears the power compliance.Keysight34980A.scan_slotscan now be called again; it skips slots that already have a module instead of failing to register a duplicate submodule.Keithley7510DigitizeSense.aperturewas labelled inusalthough the instrument uses seconds; its unit is nows.averages,pointsandactive_traceof the Keysight PNA (KeysightPNABase) drivers now reject non-integer values. Previouslyaveragesfailed to format a float such as2.5and the others sent it to the instrument. Whole-number floats such as2.0are still accepted and sent as integers. (#8658)
CopperMountainM5xxx.averages,AimTTiChannel.curr_range,RigolDG1062Burst.ncycles,Keithley7510Sense.average_countand thedwell,pause,curve_numberandexcitation_range_numberofLakeshoreModel372Channelnow reject non-integer values. Previously these were sent to the instrument, or forCopperMountainM5xxx.averagessilently truncated. Whole-number floats such as2.0are still accepted and sent as integers. Also removed the incorrect unit ofAimTTiChannel.curr_range, which is a range number, fixed the label ofLakeshoreModel372Channel.temperature_coefficient, and removed incorrect units fromRigolDS1074Z.trigger_mode,waveform_npoints,waveform_yoriginandwaveform_yref. (#8678)The field parameters of
AMIModel4303D, such ascartesian,xandfield_measured, now use the field units of the individual magnets, tesla or kilogauss, instead of always reporting tesla. A warning is logged if the magnets use different field units. Also removed the placeholder unittuple?ofAMIModel4303D.sphericalandcylindrical, whose components have different units, which are now described in their docstrings. Closing anAMIModel4303Dnow detaches its magnets, soset_field,zeroand changing the units of a magnet that is still open no longer fail. (#8679)The parameters of the Basel SP983, SP983a and SP983c, Ithaco 1211, Keithley 2450, DMM7510, S46 and 2600 drivers that were not yet typed are now annotated with the type of their value, e.g.
Parameter[float, Self], so static type checkers can infer the type returned bygetand accepted byset. (#8694)
New:¶
Added the named tuples
CartesianVector(x,y,z),SphericalVector(field,theta,phi) andCylindricalVector(rho,phi,z) toqcodes.math_utils, for the components of a field vector in a given coordinate system. (#8679)Added recording of parameter access: inside a
with qcodes.parameters.record_parameter_accesses() as accesses:block, everygetandsetof a parameter made by the current thread (or asyncio task) is appended toaccessesas aqcodes.parameters.ParameterAccess: the names of the parameter and its instrument, the value and raw value, when the access started, how long it took and the error it raised, if any. A set that ramps in steps is recorded once per step. Accesses are appended to a new list, or to a mutable sequence that is passed in, whoseappendmust only store them.qcodes.parameters.log_parameter_accesseslogs the accesses to theqcodes.parameters.parameter_accesslogger instead. Recording only stores data: it is not a way to react to an access, and a record holds names rather than the parameter or instrument. This makes it possible to see all instrument communication made by a piece of code without changing it. (#8684)
Under the hood:¶
The test suite now runs faster. Tests using the simulated Keysight B220x and B1500 instruments no longer first try to connect to a real instrument, and a number of unneeded sleeps and waits have been removed or shortened. (#8725)
The documentation builds faster: the
InstrumentGroupexample notebook ramps its gate in fewer steps, and theqcodes.sphinx_extensions.parse_parameter_attrSphinx extension now parses the source of each class only once instead of once for every attribute documented on it. (#8742)