Releases: microsoft/Qcodes
QCoDeS 0.45.0
QCoDeS 0.45.0 (2024-05-03)
Breaking Changes:
-
The AMI drivers in
qcodes.instrument_drivers.american_magnetics.AMI430
and their submodules has been deprecated. Use theAMIModel430
and
AMIModel4303D
drivers fromqcodes.instrument_drivers.american_magnetics
instead. (#5712) -
QCoDeS is now type checked to ensure that subclasses are implemented in a way consistent with the parent class.
This has resulted in a number of changes to the API. The following is a list of the changes that have been made
to the API to make subclasses match their parent class. These changes are not expected to break any existing code, since they are
primarily in positional arguments or unused arguments.- The first argument to
NumpyJSONEncoder.default
has changed fromobj
too
to match the naming in the std libraryjson.JSONEncoder.default
. - Unused args
idn_part
andbeing_time
toQDevQDac.connect_message
have been changed toidn_param
andbegin_time
respectively to match the parent class. - Unused arguments to stub methods
DSOTraceParam.setpoints
,DSOTraceParam.unit
andFormattedSweep.setpoints
have been changed to match the parent class. - Alazar
DemodulationAcquisitionController.handle_buffer
the first argument has been renamed fromdata
tobuffer
to match the parent class. (#5721)
- The first argument to
-
The
qcodes.tests
module has been deprecated and will be removed in a future release. Please import mock instruments from
qcodes.instrument_drivers.mock_instruments
andDriverTestCase
fromqcodes.extensions
instead. If you make use of
any other part of the tests module please open an issue on GitHub. (#5732) -
Fix spelling of the 2 incorrectly spelled classes
qcodes.instrument_drivers.tektronix.TekronixDPOTrigger
and
qcodes.instrument_drivers.tektronix.TekronixDPOWaveform
to
qcodes.instrument_drivers.tektronix.TektronixDPOTrigger
andqcodes.instrument_drivers.tektronix.TektronixDPOWaveform
.
The old names have been deprecated and will be removed in a future release. (#5932) -
QCoDeS no longer installs opencensus and opencensus-ext-azure are no longer installed by default and opencensus integration is deprecated.
This means that the optionqcodes.config.telemetry.enabled
toTrue
is deprecated. For the time being opencensus and opencensus-ext-azure
can be installed by installing QCoDeS with the opencensus option e.g.pip install qcodes[opencensus]
. We however, recommend that any use
of this telemetry integration is replaced by the use of OpenTelemetry. QCoDeS will not include any telemetry integration but the codebase
has been instrumented using OpenTelemetry spans and python log messages enabling any user to collect telemetry if they should so wish. (#5991)
Improved:
- An issue where simulated instruments powered by pyvisa-sim could raise an error during the teardown has been resolved. (#5737)
- Add support for integer indexing in parameter paths in Station Files,
e.gchannel[0].voltage
orsigouts[0].enables[1].value
. (#5887) - Station.get_component and Instrument.get_component has gained the ability to lookup a component
on an instrument that is only added as a member of a chanellist/tuple and not added as an individual component. (#6009)
Improved Drivers:
-
Improved Stahl BS Voltage Source driver:
- accepts more floating-point formats in response from instrument
- allows connection to serial instrument over TCP/IP connection (#5888)
-
The driver for
Rohde&Schwarz SG100A
has been extendend with parameters
controlling the optional pulse modulation and trigger modules. (#5889) -
The drivers for
TektronixAWG5208
,TektronixAWG70001A
,TektronixAWG70001B
,TektronixAWG70002A
andTektronixAWG70002B
have gained the parameterall_output_off
to disable / enable all outputs as well as the methodchannel.clear_asset
to clear all asserts on a channel. (#5900) -
A number of new parameters are added to the Keysight N9030B Spectrum Analyzer to allow for Noise Spectral Density measurements.
In particular we add various parameters for switching the detectors into the appropriate modes, as well as allowing for
instrument parameters required for unit conversions to be saved in the snapshot.In addition, we use binary readout of the data and the ability to read data from the instrument buffer
(without taking a new trace), and to read averaged data. (#5963) -
Adds trace manipulation commands to the Keysight PNA driver. (#6035)
New:
-
Add a do2d_retrace function (#5780)
-
Added a new QCoDeS driver for the Cryomagnetics Model 4G superconducting magnet power supply.
The
CryomagneticsModel4G
driver provides an interface to control and communicate with the Cryomagnetics Model 4G
superconducting magnet power supply using the VISA protocol. It allows setting and reading the magnetic field, ramp rate,
and various other parameters of the instrument.Key features of the driver include:
-
Setting and reading the magnetic field in Tesla, considering the coil constant and current limits.
-
Controlling the ramp rate in Tesla per minute.
-
Checking the operating state of the magnet and handling quench conditions and power module failures.
-
Blocking and non-blocking ramping of the magnetic field.
-
Handling communication errors and retrying failed operations.
The driver is located in
qcodes/instrument_drivers/cryomagnetics/_cryomagnetics_4g.py
.For more details and usage examples, please refer to the driver's documentation:
https://microsoft.github.io/Qcodes/examples/driver_examples/Qcodes_example_with_cryomagnetics4g.html (#5968) -
-
Add methods to recursively search a chain of DelegateParameters and return either all the parameters in the chain or the 'root' parameter
These methods may also be used with custom Parameters which link to other parameters via different attribute namesAlso add infer_channel and infer_instrument methods to find the InstrumentModule or Instrument of the root parameter (#5998)
QCoDeS 0.44.1
QCoDeS 0.44.0
QCoDeS 0.44.0 (2024-01-24)
Breaking Changes:
-
The deprecated method
DataSetProtocol.cache.to_pandas
has been removed. Use the to_pandas_dataframe or to_pandas_dataframe_dict methods as an alternative. (#5626) -
The following long deprecated functions and methods and functionalities have been removed.
Here ordered by top level module for clarity.-
qcodes.dataset
-
flatten_1D_data_for_plot
-
get_shaped_data_by_runid
-
get_guids_from_run_spec
-
dataset.get_data_as_pandas_dataframe
-
dataset.export_path
-
_conditional_parameter_set
-
_make_nested_setpoints
-
_select_active_actions_delays
-
_create_measurements
-
_extract_paramters_by_type_and_group
-
_build_data_query
-
get_data
-
get_interdeps_from_result_table_name
-
get_values
-
get_setpoints
-
get_guids_from_run_spec
-
data_sets
-
modify_values
-
modify_many_values
-
-
qcodes.instrument_drivers.devices
/codes.parameters
VoltageDivider
-
qcodes.station
-
Support for driver kwarg in yaml config
-
Support for limits as a string.
-
-
qcodes.utils
get_qcodes_version
(#5651)
-
-
The following deprecated instrument drivers have been removed:
-
QDevil.QDac
Use driver from qcodes_contrib_drivers instead. -
Agilent_34400A
Use Keysight 344xxA drivers or Agilent34401A, Agilent34410A, Agilent34411A instead. -
E8267
useAgilentE8267C
instead. -
Agilent_E8527D
use AgilentE8257D instead.
The following deprecated instrument driver methods have been removed:
-
KeysightInfiniium
DSOTimeAxisParam.prepare_curvedata
-
KeysightB1517A.measure_config
replaced byv_measure_range_config
andi_measure_range_config
-
RohdeSchwarz ZNB
RohdeSchwarzZNBChannel.update_traces
useupdate_lin_traces
qcodes.utils.deprecate
decorator has been soft deprecated. In the future qcodes will use thedeprecated
decorator from
thetyping_extensions
package (to be part of the std library warnings module from Python 3.13). We recommend anyone else to
do the same. (#5655) -
Improved:
load_by_run_spec
andload_by_id
may now optionally load the dataset as a DataSetInMem from an exported netcdf file. This avoids reading
from the database potentially resulting in better performance. This option is off by default at the moment but can be turned on by setting
qcodes.config.dataset.load_from_exported_file
to True. (:pr:5320
)- When loading a QCoDeS dataset from a netcdf file using load_from_netcdf and converted to a Xarray dataset using
to_xarray_dataset
orcache.to_xarray_dataset
we avoid converting the data to QCoDeS format and back to Xarray format.
This should save time and avoid any potential corner cases when roundtripping the data. (:pr:5627
) - Fixed an issue where datasets with categorical setpoints could fail to correctly export to Pandas dataframes or Xarray dataset. (#5641)
Improved Drivers:
- Lakeshore 335: Add parameter mapping for thermocouple input when using 3060-H option (#5652)
QCoDeS 0.43.0
QCoDeS 0.43.0 (2024-01-04)
Improved:
- qcodes.Monitor now runs as a daemon thread, resolving issues with closing python or ipython with a running qcodes.Monitor. (#5565)
- The use of multi index when exporting to xarray (and netcdf files) has been made smarter
such that any dataset with a known shape (such as those measured by doNd etc) will
never be automatically exported using multi index even in the case of incomplete datasets (i.e. due to an interrupted measurement).
Furthermoreto_xarray_dataset
andto_xarray_dataarray_dict
have gained a key word argumentuse_multi_index
to allow the user
to control the use of multi indexes. (#5589) - The feature of exporting large DataSets to netcdf by writing individual small files and combining them, introduced in QCoDeS 0.41.0 has been made configurable
and turned off by default due to a number of corner cases where the export did not work correctly. The
feature can be enabled when required by setting the config variableqcodes.config.dataset.export_chunked_export_of_large_files_enabled
to True and the threshold controlled usingqcodes.config.dataset.export_chunked_threshold
(#5618)
Improved Drivers:
- Keithley 2450s by default don't block when setting their output level, differing in behavior from the keithley 2400.
I added a manual boolian parameter 'block_during_ramp' which forces a check that the ramp command has been completed when True. (#5547) - Previously, the keithley 2450 driver had an initial value for the output. This is particularly dangerous when reinitializing/recovering from a kernal crash.
Initializing the instrument should leave all parameters unchanged. This PR removes the initial value for the output. (#5572)
Under the hood:
- Fix typo: instrument_drivers.mock_instruments.DummyInstrument::get_idn() now returns dict containing key "serial" instead of "seral" (#5579)
QCoDeS 0.42.1
Improved:
- Avoid warning from OpenTelemetry when exporting datasets to netcdf. (#5529)
v0.42.0: Merge pull request #5525 from jenshnielsen/changelog_042
QCoDeS 0.42.0 (2023-11-16)
Breaking Changes:
- Tests are no longer shipped as part of the qcodes package. The
qcodes.tests
namespace still exists but will be deprecated in QCoDeS 0.43.0.
qcodes.test
is deprecated and will be removed in a future release.
To run the tests against an installed version clone git repo to matching tag and
runpytest tests
from the root of the repo. (#5452)
Improved:
- Fixed a bug in the Agilent 8257D where on and off would call a non existing parameter. The methods have been updated to call
output_enabled
. (#5496) - QCoDeS in memory datasets exported to netcdf with MultiIndexes are now
correctly decompressed when reloaded with load_by_id and friends. (#5517) - Lakeshore 335 Output: Add parameter mapping for input=None (#5520)
- The size calculation used to estimate when a dataset should be exported in chuncks has been improved.
This will prevent "small" dataset with many rows from being exported in chuncks when not required. (#5523)
New:
- Mark python 3.12 as supported and fix deprecation warnings with python 3.12 (#5408)
- Mock instruments have been moved from
qcodes.tests.instrument_mocks
toqcodes.instrument_drivers.mock_instruments
andDriverTestCase
from
qcodes.tests.driver_test_case
toqcodes.extensions
. This is in preparation for no longer shippingqcodes.tests
as part of the
public api. The previous locations remain functional but will be deprecated after one release. (#5486)
QCoDeS 0.41.1
QCoDeS 0.41.1 (2023-10-19)
Improved:
- Corrected a bug where non integer step sizes were incorrectly rejected
from parameters without integer validators. (:pr:5446
)
QCoDeS 0.41.0
QCoDeS 0.41.0 (2023-10-18)
Breaking Changes:
- The deprecated modules
qcodes.data
,qcodes.loop
,qcodes.actions
,qcodes.plots
,
qcodes.measure
,qcodes.extensions.slack
,qcodes.utils.magic
,qcodes.utils.qt_helpers
qcodes.utils.slack
has been removed.
The modules can be found inqcodes_loop <https://github.com/qcodes/qcodes_loop>
_ (#5367) - Update QCoDeS to work with the upcoming release of numpy 2.0.
The unused attributesqcodes.utils.types.numpy_non_concrete_floats_instantiable
and
qcodes.utils.types.numpy_non_concrete_complex_instantiable
have been removed from QCoDeS. (#5399) - The extra install targets qcodes[slack] and qcodes[qtplot] have been removed.
All dependencies on slack and pyqtgraph have moved to qcodes_loop. (#5425)
New:
- QCoDeS now exports data that isn't measured on a grid to a XArray using
MultiIndex
.
Support for exporting these datasets to NetCDF has also been implemented.
Seethis notebook <../examples/DataSet/Working-With-Pandas-and-XArray.ipynb>
__ for additional details. (#5334) - Add a register_name keyword to the ParameterBase constructor. If supplied, this value
will be used to register parameters in datasets instead of the default full_name.
Note that the MultiParameter and ArrayParameter classes do not currently support use
of the register_name. (#5381) - Large datasets are now exported to NetCDF4 using Dask delayed writer.
This avoids allocating a large amount of memory to process the whole dataset at the same time.
Size threshold at the moment is set to approximately 1 GB. (#5391) - The QCoDeS Parameters have now gained the ability to use multiple validators.
Seehere <../examples/Parameters/Parameters.ipynb>
__ for examples of how to use this. (#5426)
What's Changed
- remove deprecated scrict_concatenate flag from mypy by @jenshnielsen in #5366
- Update traitlets requirement from ~=5.9.0 to ~=5.10.0 by @dependabot in #5370
- remove deprecated loop moved to qcodes loop. by @jenshnielsen in #5367
- Update matplotlib requirement from ~=3.7.0 to ~=3.8.0 by @dependabot in #5371
- Update numpy requirement from ~=1.25.0 to ~=1.26.0 by @dependabot in #5373
- Update typing-extensions requirement from ~=4.7.0 to ~=4.8.0 by @dependabot in #5375
- Update portalocker requirement from ~=2.7.0 to ~=2.8.2 by @dependabot in #5372
- Bump opencensus from 0.11.2 to 0.11.3 by @dependabot in #5376
- Update zipp requirement from ~=3.16.2 to ~=3.17.0 by @dependabot in #5377
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #5378
- Update hypothesis requirement from ~=6.84.0 to ~=6.86.2 by @dependabot in #5382
- Stop using file outside tests by @jenshnielsen in #4797
- Update hypothesis requirement from ~=6.86.2 to ~=6.87.0 by @dependabot in #5383
- Remove deprecated compare_dictionaries by @jenshnielsen in #5385
- Bump actions/checkout from 4.0.0 to 4.1.0 by @dependabot in #5384
- Instrument tests: Avoid leaking state between tests by @jenshnielsen in #5360
- Update google-api-core requirement from ~=2.11.0 to ~=2.12.0 by @dependabot in #5386
- Export non gridded data to MultiIndex Xarray and compressed netcdf file by @jenshnielsen in #5334
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #5387
- Update xarray requirement from ~=2023.8.0 to ~=2023.9.0 by @dependabot in #5388
- Update CONTRIBUTING.rst by @DCEM in #5389
- Update index.rst (Add instructions about fetching tags) by @DCEM in #5390
- Fix pandas type check by @jenshnielsen in #5398
- Update cffi requirement from ~=1.15.1 to ~=1.16.0 by @dependabot in #5396
- Bump wcwidth from 0.2.6 to 0.2.7 by @dependabot in #5397
- Bump cycler from 0.11.0 to 0.12.0 by @dependabot in #5395
- Bump ruamel-yaml from 0.17.32 to 0.17.33 by @dependabot in #5394
- Create Coord before passing it to xarray by @jenshnielsen in #5392
- Bump wcwidth from 0.2.7 to 0.2.8 by @dependabot in #5400
- Update ipython requirement from ~=8.15.0 to ~=8.16.0 by @dependabot in #5401
- Bump packaging from 23.1 to 23.2 by @dependabot in #5404
- Update fonttools requirement from ~=4.42.0 to ~=4.43.0 by @dependabot in #5405
- Update charset-normalizer requirement from ~=3.2.0 to ~=3.3.0 by @dependabot in #5406
- Rework config fixtures by @jenshnielsen in #4906
- Update executing requirement from ~=1.2.0 to ~=2.0.0 by @dependabot in #5402
- Bump stack-data from 0.6.2 to 0.6.3 by @dependabot in #5403
- remove non local CI job by @jenshnielsen in #5407
- Update urllib3 requirement from ~=1.26.15 to ~=2.0.5 by @dependabot in #5379
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #5409
- upgrade type stubs by @jenshnielsen in #5410
- Remove main example by @jenshnielsen in #5411
- Bump ruamel-yaml from 0.17.33 to 0.17.34 by @dependabot in #5413
- Update babel requirement from ~=2.12.1 to ~=2.13.0 by @dependabot in #5414
- Update traitlets requirement from ~=5.10.0 to ~=5.11.2 by @dependabot in #5417
- Update nbconvert requirement from ~=7.8.0 to ~=7.9.0 by @dependabot in #5415
- Bump ruamel-yaml-clib from 0.2.7 to 0.2.8 by @dependabot in #5416
- Improve logger test by @jenshnielsen in #5419
- Use Dask delayed to export large datasets to NetCDF by @jenshnielsen in #5391
- Update quantify doc links by @ereehuis in #5421
- Bump ruamel-yaml from 0.17.34 to 0.17.35 by @dependabot in #5424
- Update slack-sdk requirement from ~=3.22.0 to ~=3.23.0 by @dependabot in #5423
- Update deepdiff requirement from ~=6.5.0 to ~=6.6.0 by @dependabot in #5422
- remove slack and qtplot extra install targets by @jenshnielsen in #5425
- Add register_name to register parameters by in datasets by @samantha-ho in #5381
- Bump cycler from 0.12.0 to 0.12.1 by @dependabot in #5428
- Update bleach requirement from ~=6.0.0 to ~=6.1.0 by @dependabot in #5429
- Update qcodes to support numpy 2.0 by @peendebak in #5399
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #5430
- Update h5py requirement from ~=3.9.0 to ~=3.10.0 by @dependabot in #5431
- Update jupyter-core requirement from ~=5.3.0 to ~=5.4.0 by @dependabot in #5432
- Update mypy requirement from ~=1.5.0 to ~=1.6.0 by @dependabot in #5433
- Allow additional validators on parameter at runtime by @jenshnielsen in #5426
- Update jupyter-client requirement from ~=8.3.0 to ~=8.4.0 by @dependabot in #5434
- Update googleapis-common-protos requirement from ~=1.60.0 to ~=1.61.0 by @dependabot in #5435
- Update hypothesis requirement from ~=6.87.0 to ~=6.88.0 by @dependabot in #5437
- Update pillow requirement from ~=10.0.0 to ~=10.1.0 by @dependabot in #5438
- Update pyqt5-sip requirement from ~=12.12.0 to ~=12.13.0 by @dependabot in #5436
- Bump actions/checkout from 4.1.0 to 4.1.1 by @dependabot in #5439
- add changelog for 0.41.0 by @jenshnielsen in #5440
New Contributors
Full Changelog: v0.40.0...v0.41.0
QCoDeS 0.40.0
QCoDeS 0.40.0 (2023-09-14)
Improved:
- The InstrumentLoggerAdapter has been updated to store the
instrument_name
andinstrument_type
as fields on log records rather than the instrument it self. This enables opentelemetry to attache
the fields to a transmitted LogRecord for better filtering. (#5297) - In the QCoDeS DataSetProtocol newly created dataset now always have a captured_run_id / captured_counter
that matches the run_id / result_counter that they are assigned on creation. Previously these could be
out of sync if datasets measured elsewhere had been inserted into the database. (#5329) - The
pyvisa.ResourceManager
of a VISA instrument is now exposed
asinstr.resource_manager
. All VISA instruments will now useweakref.finalize
to close the visa resource on shutdown of the instrument. This should reduce the
chance that an instrument resource is not cleanup correctly on exit. (#5341)
Improved Drivers:
- Parameters controlling the pid-values, pumps and state of the temperature channels have been added to OxfordTriton.
This allows temperature sweeps from base temperature to several Kelvin to be fully automatic. Code to create such sweeps can be found at https://github.com/qdev-dk/MeasFunc/blob/main/measfunc/temperature_sweep.py. (#5316)
New:
-
The QCoDeS Measurement Context manager, DataSaverBuilder and DoND functions have been instrumented as OpenTelemetry traces.
This enables users to correlate log messages with the the measurement that they were performed within.
See theOpenTelemetry <https://opentelemetry.io/>
_ documentation for examples of how this can be used.The log exporting using OpenCensus within QCoDeS is expected to be deprecated and eventually removed in line
with OpenCensus being discontinued. Users that are interested in gathering telemetry of their setups are encouraged
to provide their own solution based on OpenTelemetry. (#5289) -
New features: datasaver_builder and dond_into are intermediate measurement extensions designed to fill a gap between
the low-level Measurement object and the high-level doNd functions. They allow convenient specification of parameter
dependencies for registration and doNd-like syntax while also allowing direct access to the underlying datasaver objects. (#5294)