# Changelog Starting from version 2.2.0, the `presto` package follows [Semantic Versioning][semver] as closely as possible. This changelog adopts the [Keep a Changelog][keepcl] format. Each version officially supports only versions of Python that are [actively supported][pyver] at the time of release. At a minimum, we follow the scientific Python ecosystem coordination (SPEC) guideline [SPEC 0][spec0] to support Python versions for 3 years after their initial release, and core dependencies (e.g. NumPy) for 2 years after their initial release. [semver]: https://semver.org/ [keepcl]: https://keepachangelog.com/ [pyver]: https://devguide.python.org/versions/ [spec0]: https://scientific-python.org/specs/spec-0000/ ## Version 2.12.2 -- 2024-03-26 ### Added - Improve functionality of the {func}`~.utils.plot_sequence` utility and iron out some bugs, see [dedicated documentation](special/plot_sequences.md). ### Changed - Improved internal representation of very long, very sparse pulsed sequences. ### Fixed - Fixed bug in {mod}`.pulsed` experiments with frequency or amplitude sweeps that caused some of the sweep entries to be duplicated or corrupt. The bug was introduced in version 2.12.0. --- ## Version 2.12.1 -- 2024-03-14 ### Fixed - Fixed bug that caused {class}`.Lockin` and {class}`.SymmetricLockin` to download the wrong data at the end of a measurement when using `summed=True`. Measurements with `summed=False` were not affected by the bug. --- ## Version 2.12.0 -- 2024-02-28 ### Added - *Autoconfiguration* feature: ability to automatically choose DAC configuration ({class}`.DacMode` and {class}`.DacFSample`) based on signal frequencies. See [Direct and Mixed mode](special/direct_mixed.md) for more information and how to (optionally) migrate your old code to use the new feature. - The {func}`~.utils.plot_sequence` utility now shows operations on IF generators. - Ability to trigger signal generation and acquisition in {mod}`.lockin` mode on an external trigger, likely generated by Metronomo. See `auto_sync` optional argument to {meth}`~.Lockin.apply_settings` and {meth}`~.Lockin.get_pixels`. ### Changed - Default parameter values for {class}`.Pulsed` and {class}`.Lockin` now use automatic DAC configuration. ### Fixed - Fixed `ConnectionRefusedError` when trying to reconnect to Presto too quickly after closing a previous connection. - Fixed bug that cause some very-long sequences in pulsed mode to be rejected due to the repetition period being too short. --- ## Version 2.11.0 -- 2023-11-27 ### Added - Historical version information in the documentation of the {mod}`.version` module. - Option to download measurement data using the lz4 lossless compression. It can improve download times over slow networks. See `use_compression` keyword argument in {meth}`.Pulsed.get_store_data` and {meth}`~.Pulsed.get_template_matching_data`. - Option to download template-matching results as they become available during an experiment, rather than at the end of the experiment. Can reduce communication overhead for sequences with lots of single-shot readouts. See `prefetch_matches` keyword argument in {meth}`.Pulsed.run`. - Ability to configure low-noise mode on an output port: {meth}`.Hardware.set_dac_lownoise`. - It is now possible to compute real-time histograms on template-matching results on board. See methods {meth}`.Pulsed.setup_histogram`, {meth}`~.Pulsed.setup_histogram_2d` and {meth}`~.Pulsed.get_histogram_data`. - Utility to plot the programmed experimental sequence in Pulsed mode. See {func}`.utils.plot_sequence`. ### Changed - Minimum supported versions: Python 3.8, NumPy 1.22.0. ### Fixed - Optimize internal data transfers, yielding improved download speed over the network and processing of commands during pulsed sequences. --- ## Version 2.10.0 -- 2023-06-27 :::{note} `presto` v2.10.0 is the last version supporting Python 3.7, which reached [end of life][pyver] on 2023-06-27. Starting from next version, the `presto` package will require Python 3.8 or above. ::: ### Added - Methods to program a digital delay on output and input ports, useful for compensating delay mismatches in your experimental setup: {meth}`.Hardware.set_output_delay` and {meth}`~.Hardware.set_input_delay`. - Helper function to select optimal DAC configuration for a given signal output frequency: {func}`.utils.recommended_dac_config` --- ## Version 2.9.0 -- 2023-03-30 ### Added - Method to ramp the DC bias to a new value with a controlled rate of change: {meth}`.Hardware.ramp_dc_bias`. - Optional argument `get_range` to {meth}`.Hardware.get_dc_bias` to also get the current range. ### Fixed - Improve handling of abrupt interruption of a measurement. - Fix error message when rebooting Presto/Vivace via {func}`~.utils.ssh_reboot`. --- ## Version 2.8.1 -- 2023-02-14 ### Changed - Allow for a list of ports in {meth}`.Pulsed.output_dc_bias` to change DC bias during a pulsed sequence simultaneously on many ports. --- ## Version 2.8.0 -- 2023-02-03 ### Added - Method to get the DC bias currently programmed: {meth}`.Hardware.get_dc_bias`. - Methods to configure multiband mode on input/output: {meth}`.Hardware.set_input_multiband` and {meth}`.Hardware.set_output_multiband`. ### Changed - Enable positive-only DC-bias ranges in {meth}`.Hardware.set_dc_bias` (`range_i` settings 0 and 1) for higher resolution on small positive voltages. --- ## Version 2.7.1 -- 2023-01-20 ### Fixed - Fixed Python 3.7 compatibility issue in pulsed module. --- ## Version 2.7.0 -- 2023-01-18 ### Added - Multi-dimensional parameter sweeps in {mod}`.pulsed` mode are now available *experimentally*. See new `axis` optional parameter in {meth}`.Pulsed.setup_scale_lut` and {meth}`.Pulsed.setup_freq_lut`, and new options of the `repeat_count` parameter in {meth}`.Pulsed.run`. Experimentally means that the API might be fine tuned in a future release. ### Changed - A DC bias set with {meth}`.Hardware.set_dc_bias` is now persistent across a firmware reload, e.g. when switching between {mod}`.pulsed` and {mod}`.lockin` mode, unless the hardware is initialized with `force_reload=True`. ### Fixed - Documentation for {meth}`.Lockin.set_phase_reset`. - Fix bug causing spurious {meth}`.Pulsed.next_scale` events that could happen when the repetition period of an experiment was longer that half a millisecond. - Fix erroneous error message that would warn of an error when using template matching even though everything was good. --- ## Version 2.6.0 -- 2022-12-07 ### Added - Abort a pulsed measurement early if data corruption is detected. ### Changed - Improve handling of pulsed-mode commands at run time to enable longer two-qubit randomized benchmarking. - Update all internal libraries. - Speed up reconnecting to Presto if no settings are changed. ### Removed - Remove experimental feature `enable_compression` in {meth}`.Pulsed.run`: this feature is now covered by the improved handling of pulse-mode commands. ### Fixed - Fix attenuation values in documentation for {meth}`.Hardware.set_adc_attenuation`. --- ## Version 2.5.1 -- 2022-11-05 ### Fixed - Bug in {class}`.Lockin` and {class}`.SymmetricLockin` when setting a negative phase on the output *I* quadrature. - Fix bug on Vivace hardware when changing output range with {meth}`.Hardware.set_dac_current`. --- ## Version 2.5.0 -- 2022-09-20 ### Added - A pulsed measurement can now be triggered internally, by a SYSREF signal, or (new) by a signal on any of the digital inputs. See method {meth}`.Pulsed.run`. ### Changed - Replace the sliding-window low-pass filter for Lockin introduced in 2.3.0 with a customizable 43-tap FIR filter. For the occasion, the new optional argument `fir_coeffs` replaces the previous `nbox` in methods {meth}`.Lockin.get_pixels` and {meth}`.SymmetricLockin.get_pixels`. ### Fixed - Fixed an issue that could result in a {meth}`DC bias <.Hardware.set_dc_bias>` not being set reliably on some units. --- ## Version 2.4.1 -- 2022-07-08 ### Fixed - Fix documentation for DAC current settings in {meth}`.Hardware.set_dac_current`. - Restore compatibility with Python 3.7+. --- ## Version 2.4.0 -- 2022-06-23 ### Added - You can now choose whether a long drive is an envelope or a template. See new optional parameter `envelope` in {meth}`.Pulsed.setup_long_drive`. To maintain backwards compatibility, the default setting is `envelope=True`. Note that this is different from {meth}`.Pulsed.setup_template` where the default is `envelope=False`. - New interface to asynchronous measurements: {meth}`.Pulsed.run_async` returns a {class}`.MeasurementHandle` that allows interaction with a running measurement. ### Changed - Methods {meth}`.Lockin.get_pixels` and {meth}`.SymmetricLockin.get_pixels` now return the standard deviation as a complex number, where the real and imaginary parts encode the standard deviation of the real and imaginary parts of the demodulated signals. Taking the absolute value of the complex number results in the total standard deviation that was previously returned. - Many methods in {class}`.Pulsed` raise a {class}`RuntimeError` exception if called after a measurement has already been {meth}`~.Pulsed.run`. The previous behavior was not supported, see the warning in the documentation for the {class}`.Pulsed` class. - The `output_port` argument to {meth}`.Pulsed.setup_long_drive` now accepts a list to output the same pulse on multiple ports, much like {meth}`.Pulsed.setup_template` already did. ### Fixed - Fix inconsistencies in the documentation regarding maximum length of templates. - Improve error messages when running out of template slots. --- ## Version 2.3.2 -- 2022-06-06 ### Fixed - Improve resilience to rounding errors in {meth}`.Hardware.configure_mixer` --- ## Version 2.3.1 -- 2022-04-25 ### Fixed - Restore compatibility with Python 3.7+ --- ## Version 2.3.0 -- 2022-04-21 ### Added - New class {class}`.SymmetricLockin`: a special-purpose version of {class}`.Lockin` with same frequencies on input and output (symmetric). The new class inherits from the previous one, so most of the `Lockin` functionality is available in `SymmetricLockin` as well. - New features for the lock-in: Presto can now low-pass filter the measured lock-in packets in real time with a sliding-window average, and also compute mean and standard deviation of the measured lock-in packets in real time over chunks with configurable width. Check out the `summed`, `nbox` and `nsum` optional parameters to {meth}`.Lockin.get_pixels`. - The lock-in can output a trigger signal at the start of each integration window: {meth}`.Lockin.set_trigger_out`. - {func}`.utils.sin2` can now create DRAG-corrected pulses. - It is now possible to modify the DC bias output during a pulsed measurement sequence: {meth}`.Pulsed.output_dc_bias`. - Print a warning if the signal on any of the input ports is out of range. ### Changed - Change the way errors from the hardware are reported to the user. It should help when the API is used through third-party software, such as Labber. - Improve handling of NCO frequencies when the same frequency is set on multiple ports. This can avoid long-term drift, see documentation for the `tune` parameter in {meth}`.Hardware.configure_mixer` - Increase length of command buffers: you can now send more pulses closer together! Useful for randomized benchmarking. ### Fixed - Fix bug in {meth}`.Lockin.get_pixels` where the data in first lock-in packet would often be corrupt. - The pulsed mode of operation is now more resilient to aborting measurements with `Ctrl+C`. --- ## Version 2.2.1 -- 2022-02-10 ### Fixed - Fix bug in compression algorithm in {meth}`.Pulsed.run`. --- ## Version 2.2.0 -- 2022-02-09 ### Added - Method {meth}`.Hardware.set_dc_bias` now handles the DC bias outputs on Presto hardware. - Check that all programmed times in a pulsed sequence are nonnegative. - Method {meth}`.Pulsed.run` will now check for more inconsistencies and report errors: - if the programmed sequence contains overlapping calls to {meth}`~.Pulsed.store`. Overlapping stores are not supported and could cause the experimental sequence to terminate abnormally, or not terminate at all. - if some {meth}`~.Pulsed.select_frequency` or {meth}`~.Pulsed.select_scale` event is trying to access indexes beyond what was programmed in the look-up tables with {meth}`~.Pulsed.setup_freq_lut` and {meth}`~.Pulsed.setup_scale_lut`. - Method {meth}`.Pulsed.run` can now compress some pulse sequences so that they consume fewer commands. Compression is useful when there's a long list of small templates output in quick repetition, such as in randomized benchmarking with thousands of Cliffords. To opt in to compression, pass `enable_compression=True`. ### Changed - Refactor calibration of ADC and DAC alignment. A calibration routine will be run when a new combination of {ref}`converter modes` and {ref}`converter rates` is requested. This will delay the start of a measurement by a few seconds, but only the first time a configuration is requested: the calibration will be stored on Vivace/Presto and will be available for all subsequent measurements without delay! - Method {meth}`.Pulsed.get_store_data` returns data in real form when `adc_mode=AdcMode.Direct` and in complex form when `adc_mode=AdcMode.Mixed` (when using digital downconversion). - Method {meth}`.Pulsed.setup_template_matching_pair` now accept complex-valued arguments when `adc_mode=AdcMode.Mixed` (when using digital downconversion). - Methods {meth}`.Pulsed.setup_long_drive` and {meth}`.Pulsed.setup_template` now accept complex-valued arguments when `dac_mode=DacMode.Mixedxx` (when using digital upconversion). ### Fixed - Fix error message in {meth}`.OutputGroup.set_frequencies` and {meth}`.InputGroup.set_frequencies`: while it's certainly good practice to set IF frequencies smaller than 1 EHz (10{superscript}`18` Hz), we meant to write just 1 GHz. - Fix a bug in {meth}`.Pulsed.setup_condition` when specifying templates to be output when the condition is False. - Fix a bug that prevented {meth}`.Pulsed.match` events from being scheduled at times smaller than 6 ns. --- ## Version 2.1.0 -- 2021-12-01 - Ability to choose frequency of external reference clock: see the optional argument `ext_ref_clk` to {class}`.Pulsed` and {class}`.Lockin` - Improvement to calibration routine during update. ### {mod}`.pulsed` module - Fix a bug that caused the experiment to terminate too early or to never terminate when running long sequences with lots of averages. - A single sequence (without accounting for repetitions and averages) can now run for ≈6.5 days, up from ≈8.6 seconds. #### {class}`.Pulsed` class - Fix printing of estimated time left in a measurement when running from within some Python IDEs, e.g. Spyder. - Set tolerance for event times to 1% of {meth}`~.Pulsed.get_clk_T`, rather than fixed at 1 ps. - Method {meth}`~.Pulsed.run`: - Better handling of startup time for a sequence: fixes an inconsistency with requirements on the `period` argument. - Raise an error if the user runs a sequence without setting up the scale look-up table on an output port and group used by some template, or if the frequency/phase look-up table was non set up when some templates are used as envelopes. - The parameter `output_port` to {meth}`~.Pulsed.setup_template` can now be set to a list to more conveniently output the same pulse on multiple output ports. - Improve error messages when using not supported combinations of `adc_mode`, `adc_fsample`, `dac_mode` and `dac_fsample` - Fix error when running with `dry_run` set to True. #### {class}`.LongDrive` class - New method {meth}`~.LongDrive.get_duration` for compatibility with {class}`.Template` class. ### {mod}`.lockin` module #### {class}`.Lockin` class - Fix bug in {meth}`~.Lockin.tune_perfect` - Improve error messages when using not supported combinations of `adc_mode`, `adc_fsample`, `dac_mode` and `dac_fsample` --- ## Version 2.0.0 -- 2021-05-21 This is the first major-version change since the [previous Vivace API][vivace]. This new API is compatible with both Vivace and Presto microwave platforms, and follows the same overall programming interface. There are, however, many differences that break backwards compatibility. See below for a summary of such changes. [vivace]: https://intermod.pro/manuals/vivace_manual/ ### {mod}`.hardware` module New module to control configurations common to all modes of operation. Accessible as the `hardware` attribute of any instance of {class}`.Pulsed` and {class}`.Lockin`. ### {mod}`.pulsed` module #### {class}`.Pulsed` class - The class constructor takes 4 new optional arguments: `adc_mode`, `adc_fsample`, `dac_mode` and `dac_fsample`. These configure the {ref}`converter modes` and {ref}`converter rates` for the input analog-to-digital (ADC) and output digital-to-analog (DAC) converters. With these options it is possible to enable digital up- and downconversion using the built-in digital IQ mixers. - The methods {meth}`~.Pulsed.next_frequency`, {meth}`~.Pulsed.next_scale`, {meth}`~.Pulsed.select_frequency` and {meth}`~.Pulsed.select_scale` take a new optional argument `group`. If not specified, both output groups on `output_ports` are affected. - The method {meth}`~.Pulsed.run` (previously `perform_measurement`) does not return the result of {meth}`~.Pulsed.store` events: use {meth}`~.Pulsed.get_store_data` after running the experiment. To get the result of {meth}`~.Pulsed.match` events, use {meth}`~.Pulsed.get_template_matching_data` (same as before). - Method {meth}`~.Pulsed.setup_freq_lut`: - the old `carrier` argument (1 or 2) is replaced by the new `group` argument (0 or 1) - new argument `phases_q` must be specified when using the built-in digital IQ mixers for digital upconversion - the optional argument `repeat_count` is removed - Method {meth}`~.Pulsed.setup_long_drive`: - the old `carrier` argument (1 or 2) is replaced by the new `group` argument (0 or 1) - the optional argument `use_scale` is removed: all output templates are subject to the output scaler for the appropriate port and group - Method {meth}`~.Pulsed.setup_scale_lut`: - new mandatory argument `group` (0 or 1) - the optional argument `repeat_count` is removed - Method {meth}`~.Pulsed.setup_template`: - new mandatory argument `group` (0 or 1) - new argument `template_q` must be specified when using the built-in digital IQ mixers for digital upconversion - the optional argument `use_scale` is removed: all output templates are subject to the output scaler for the appropriate port and group - the optional argument `envelope` is now a boolean. To specify which signal generator to use when `envelope=True`, use the `group` argument (0 or 1) - New methods: - {meth}`~.Pulsed.get_clk_T` - {meth}`~.Pulsed.get_clk_f` - {meth}`~.Pulsed.get_fs` - {meth}`~.Pulsed.get_nr_ports` - {meth}`~.Pulsed.get_store_data` - {meth}`~.Pulsed.reset_phase` - {meth}`~.Pulsed.round_time` - {meth}`~.Pulsed.time_to_clk` - Deprecated methods: - `perform_measurement`: use {meth}`~.Pulsed.run` instead - Some methods are moved to the new {class}`.Hardware` class, which is available as the `hardware` attribute to any instance of {class}`.Pulsed`: - `blank_output`: now {meth}`hardware.blank_output <.Hardware.blank_output>` (function signature changed!) - `set_output_bias`: now {meth}`hardware.set_dc_bias <.Hardware.set_dc_bias>` (function signature changed!) #### {class}`.LongDrive` class - Renamed methods: - `update_flat_duration`: now {meth}`~.LongDrive.set_flat_duration` - `update_total_duration`: now {meth}`~.LongDrive.set_total_duration` - New methods: - {meth}`~.LongDrive.get_flat_duration` - {meth}`~.LongDrive.get_total_duration` #### Other - All classes basing {class}`.Event` have a new {meth}`~.Event.get_duration` method: - {class}`.Match` - {class}`.Template` ### {mod}`.utils` module - New function {func}`~.utils.rotate_opt` - The function {func}`~.utils.untwist_downconversion` now follows a different convention. The new convention is consistent with the built-in digital IQ mixers. It might or might not be consistent with the convention used by an external analog IQ mixer. ### {mod}`.version` module - New attributes: - {const}`~.version.version_api`: the only one of interest to the user. It is also exported as the `__version__` attribute to the {mod}`presto` module - {const}`~.version.version_conductor` - {const}`~.version.version_fpga` - {const}`~.version.version_rpu` - Removed functions: - `get_variant_firmware` - `get_version_all` - `get_version_api` - `get_version_clock` - `get_version_firmware` - `get_version_server`