QCoDeS 0.54.0
QCoDeS 0.54.0 (2025-10-01)
Breaking Changes:
-
Removal of deprecated code
Removed modules:
- Removed the deprecated
qcodes.instrument_drivers.american_magnetics.AMI430module. UseAMIModel4303Dfromqcodes.instrument_drivers.american_magneticsinstead. - Removed the deprecated
qcodes.utils.spyder_utilsmodule containing theadd_to_spyder_UMR_excludelistfunction. This utility was known to not work with latest Spyder versions and was unused in QCoDeS.
Removed classes:
- Removed the deprecated
AMI430_3DandAMI430classes fromqcodes.instrument_drivers.american_magnetics.AMI430. UseAMIModel4303DandAMIModel430fromqcodes.instrument_drivers.american_magneticsinstead. - Removed deprecated methods from
AMI430SwitchHeater - Removed deprecated
AMI430_VISAclass fromip_to_visa.py. - Removed the deprecated
ConnectionPlusclass fromqcodes.dataset.sqlite.connection. UseAtomicConnectionclass instead. - Removed the deprecated
AlazarTech_ATSclass. UseAlazarTechATSinstead. - Removed the deprecated
WaveformGenerator_33XXXclass. UseKeysight33xxxinstead. - Removed the following deprecated Keysight classes:
Keysight_34410A, useKeysight34410AinsteadKeysight_34411A, useKeysight34411AinsteadKeysight_34460A, useKeysight34460AinsteadKeysight_34461A, useKeysight344xxAinsteadKeysight_34465A, useKeysight34465AinsteadKeysight_34470A, useKeysight34470AinsteadN51x1, useKeysightN51x1insteadPNABase, useKeysightPNABaseinsteadPNAxBase, useKeysightPNAxBaseinsteadKeysightSubModule, useKeysight34980ASwitchMatrixSubModuleinsteadKeysightSwitchMatrixSubModule, useKeysight34980ASwitchMatrixSubModuleinsteadB1500Module, useKeysightB1500Moduleinstead_Keysight_344xxA, useKeysight344xxAinstead
- Removed the deprecated Keysight submodules:
Trigger, useKeysight344xxATriggerinsteadSample, useKeysight344xxASampleinsteadDisplay, useKeysight344xxADisplayinstead
- Removed the deprecated MiniCircuits classes:
SwitchChannelBase, useMiniCircuitsSPDTSwitchChannelBaseinsteadSPDT_Base, useMiniCircuitsSPDTBaseinstead
- Removed the deprecated
USBHIDMixinclass
Removed functions:
- Removed from
qcodes.utils.deprecate:deprecation_messageissue_deprecation_warningdeprecatedecorator (usetyping_extensions.deprecatedinstead)_catch_deprecation_warningsassert_not_deprecatedassert_deprecated
- Removed
make_connection_plus_fromfunction fromqcodes.dataset.sqlite.connection(:pr:7122)
- Removed the deprecated
-
The following modules have been deprecated in this release and will be removed in a future version:
qcodes.instrument.delegate.grouped_parameterqcodes.instrument.functionqcodes.instrument.group_parameterqcodes.instrument.specialized_parametersqcodes.instrument.sweep_valuesqcodes.instrument.baseqcodes.instrument.parameterqcodes.utils.commandqcodes.utils.datasetqcodes.utils.installationqcodes.utils.helpersqcodes.utils.metadataqcodes.utils.plottingqcodes.utils.threadingqcodes.utils.validators
Please consult the API documentation at :ref:
Apifor alternatives and migration paths. (:pr:7262) -
The methods
InstrumentBase.__getitem__,InstrumentBase.get,InstrumentBase.set,InstrumentBase.callare now deprecated
with a PendingDeprecationWarning rather than a QCoDeSDeprecationWarning. This better reflects the state where there is no plan to remove
them but usage is discouraged. The PendingDeprecationWarning is not printed to console by default. (:pr:7318) -
Registration and Unpacking interfaces created in ParameterBse
ParameterBasenow implements new `depends_on,is_controlled_by``, and ``has_control_of``properties that allow subclasses to define ``InterDependencies_`` relationships directly
``ParameterBase.unpack_self`` allows subclasses to unpack themselves during ``DataSaver.add_result``, which removes the requirement for users to add pre-defined ``InterDependencies_`` results explicitly
``Measurement.register_parameter`` has been refactored to follow the relationship links defined in parameter subclasses and automatically register related parameters with the appropriate relationships
``DataSaver.add_result`` has been refactored to take advantage of the new ``unpack_self`` methodBreaking Changes
- A dependent parameter registered with an independent parameter as its
setpointsno longer requires that the independent parameter be registered first, if the independent parameter is ParameterBase subclass and not a str - Previously, a ParameterWithSetpoints whose setpoints values were explicitly added in add_result would use the explicit version. Now, an error is raised if the explicit values are not within some tolerance of the internal values (as with other duplication).
DataSaver.add_resultsignature has changed from*res_tupleto*result_tuples(:pr:7346)
- A dependent parameter registered with an independent parameter as its
-
The method
to_xarray_dataarray_dicton the classesDataSetandDataSetInMem
have been deprecated and replaced byto_xarray_dataset_dict. This new method allows
export of datasets that still only contain one measured parameter but can contain
related coordinates such as these given by an inferred relationship. (:pr:7432) -
ChannelTuple/ChannelList.get_channel_by_namesupport for getting more than one channel has been deprecated. To get more than one channel useget_channels_by_name.
get_channels_by_nameis guaranteed to always return an instance of the class it was called on independently of the number of channels supplied. In the future
get_channel_by_namewill be updated to ensure that it always returns a single channel. The Exception raised when
no argument is given toget_channel_by_namehas changed fromExceptiontoTypeErrorin line with how functions behave when an argument is missing. (:pr:7486)
Improved:
-
Add a read-only option to sqlite connection (:pr:
4783) -
Fix
load_from_netcdffailing for non-completed datasets due to missingcompleted_timestamp_raworrun_timestamp_rawattribute. (:pr:7221) -
The QCoDeS dataset now correctly captures data for inferred parameters when added via
datasaver.add_result. Previously these were discarded due to an oversight.
Any parameters added in this way are available viaDataSetProtocol.get_parameter_databut not exported to xarray or pandas.
Future improvements to these parameters are planned and trackedhere <https://github.com/microsoft/Qcodes/issues/7060>_.The property
InterDependencies_.non_dependencieshas been deprecated and replaced byInterDependencies_.top_level_parametersthat correctly includes inferred parameters.
TheInterDependencies_object has gained two additional methodsfind_all_parameters_in_treeandall_parameters_in_tree_by_group.The not documented but publicly importable functions
qcodes.dataset.exporters.export_to_pandas.load_to_concatenated_dataframeandqcodes.dataset.exporters.export_to_pandas.load_to_dataframe_dict
now require an extra argument in the form of anInterDependencies_object. Users are discouraged from using anything not documented inthe QCoDeS API documentation <https://microsoft.github.io/Qcodes/api/index.html>_ outside QCoDeS. (:pr:7240) -
Fix NetCDF export for datasets with None timestamp_raw values by using sentinel values (-1) during export and converting them back to None on import. This ensures NetCDF compatibility while preserving the original None values through round-trip export/import operations. (:pr:
7333) -
When exporting Datasets to xarray where the shape is known, either by the use
of utilities such asdondor manually specified, inferred parameters related
to the setpoints and measured parameters are now included in the XArray Dataset. (:pr:7432) -
Exporting datasets to XArray no longer warns if two or more variables are exported with different setpoint names and/or values.
No functionality of the export has changed.
If the setpoints for different measured parameters have the same name, missing values will be replaced by NaN such that the
measured parameters have the same coordinates in XArray. If different setpoint names
are used, the exporter will automatically handle merging coordinates so each data variable is assigned its own coordinates. (:pr:7442) -
Fixed a bug where omitting data for one or more variables could result in an inconsistent dataset cache. Missing data is now filled with appropriate empty values (0, "" or NaN depending on the data type) (:pr:
7502) -
ChannelListandAutoLoadableChannelListcan now correctly infer the type of channels in the list
when indexed using__get_iteme.g.mychannellist[0]For consistency with the base classes the parent type
inAutoLoadableChannelListhas changed fromInstrumenttoInstrumentBasewhich may require downstream
changes for type checking to work correctly. (:pr:7520)
Improved Drivers:
-
Added operation mode in the SGS100A instrument to be able to change between NORMal and BBBYpass operation modes. Defaults to NORMal. (:pr:
7344) -
Corrected power range for Keysight P5004B (:pr:
7360) -
Changes to Cryomagnetics 4G Driver
- Added missing initialization of
self._RETRY_WRITE_ASKandself._RETRY_TIMEin thewrite_rawmethod to handle communication retries on VisaIOError. - Updated
set_fieldto correctly recognize Standby as a valid final state when setting the magnetic field to 0 T. - Modified
wait_while_rampingto check the actual magnetic field value viaself._get_field()instead of relying on the status byte, since the instrument may stay in the Ramping state even after reaching the target field. - Fixed unit parsing to handle unexpected trailing characters in the instrument's response. (e.g., "\r").
- Fixed get_parser for
Vmag,Iout, andVoutto remove units and return float. - Added timeout condition to
wait_while_rampingto prevent infinite loop. Will trigger Exception if timeout occurs. - Fixed conversion calculations in
_set_rateand_get_rate. - Added function
get_ratesto return rates for all ranges in Tesla/min as a dictionary. - Modified
_set_rateto update all ranges (0-4) on the instrument (picks min value between set rate and maximum current limit for each range) - Add small sleep (0.1 seconds) between write calls during
max_current_limitinitialization. - Fixed/added unit tests to accurately reflect code changes.
- Modified
set_field()to allow users to control the strictness ofwait_while_ramping()timeout condition (1e-4 was too precise and was triggering false timeouts). (:pr:7405)
- Added missing initialization of
-
Keysight 33xxx drivers now have statically assigned channels. This improves documentation
and makes it possible for type checkers and IDEs to detect class member variables without
instantiating the driver. (:pr:7521)
New:
- Added :func:
qcodes.dataset.export_datasets_and_create_metadata_dbfunction to export all datasets from a database to NetCDF files and create a new metadata-only database. This enables users to maintain lightweight databases for metadata while relying on NetCDF files for data analysis, significantly reducing storage requirements for large experimental datasets. (:pr:7212)
New Drivers:
- Added Keysight P5002B driver (:pr:
7360) - Added Cryomagnetics TM-620 driver (:pr:
7398) - Added Copper Mountain Technologies M5065 driver
Added Copper Mountain Technologies M5180 driver (:pr:7497)
Under the hood:
-
Refactors the
InterDependencies_class to simplify reasoning about and query of the ParamSpecBase
relationships by embedding them in a NetworkX Directional Graph (DiGraph)Resolves #7079 (:pr:
7256) -
In dond, only process get_after_set in the loop instances where the parameter is actually being set (:pr:
7307) -
DataSetProtocol.to_xarray_datasetandDataSetProtocol.to_xarray_dataarray_dictnow avoids creating a Pandas MultiIndex to infer the
correct dataset shape if the shape is already known. This will resolve issues where datasets are exported with incorrect array shapes due to
round off errors in the setpoints (coordinates). (:pr:7413)