From c86fb9d994faef33179b3e381addc1cea66fc3bc Mon Sep 17 00:00:00 2001 From: Yoav Romach Date: Mon, 6 May 2024 16:00:18 +0300 Subject: [PATCH] fix + bump version Added to __init__ --- CHANGELOG.md | 6 ++++-- pyproject.toml | 2 +- qualang_tools/digital_filters/__init__.py | 2 ++ qualang_tools/digital_filters/filters.py | 6 ++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2636070..61dc448b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] +## [0.17.3] - 2024-05-06 +### Fixed +- digital_filters - added `multi_exponential_decay` to `__init__` file. + ## [0.17.2] - 2024-05-06 ### Added - - digital_filters - added `multi_exponential_decay` function which can be used to fit and extract the exponential decay coefficients when there are multiple time constants. It supports any number of exponential decays. ### Changed - - digital_filters - `exponential_decay` function now internally uses the `multi_exponential_decay` function for calculation. The user-facing interface of `exponential_decay` remains unchanged, ensuring backward compatibility. - digital_filters - `multi_exponential_decay` function has the following formula: `s * (1 + a1 * np.exp(-x / t1) + a2 * np.exp(-x / t2) + ... + an * np.exp(-x / tn))`, where `s=1` by default. diff --git a/pyproject.toml b/pyproject.toml index 9a9aeb0e..dbed4b26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "qualang-tools" -version = "v0.17.2" +version = "v0.17.3" description = "The qualang_tools package includes various tools related to QUA programs in Python" license = "BSD-3-Clause" authors = [ diff --git a/qualang_tools/digital_filters/__init__.py b/qualang_tools/digital_filters/__init__.py index 71d0f65e..e25394c5 100644 --- a/qualang_tools/digital_filters/__init__.py +++ b/qualang_tools/digital_filters/__init__.py @@ -4,6 +4,7 @@ exponential_decay, high_pass_exponential, single_exponential_correction, + multi_exponential_decay, highpass_correction, bounce_and_delay_correction, ) @@ -14,6 +15,7 @@ "exponential_decay", "high_pass_exponential", "single_exponential_correction", + "multi_exponential_decay", "highpass_correction", "bounce_and_delay_correction", ] diff --git a/qualang_tools/digital_filters/filters.py b/qualang_tools/digital_filters/filters.py index 937f5432..e5fe0031 100644 --- a/qualang_tools/digital_filters/filters.py +++ b/qualang_tools/digital_filters/filters.py @@ -7,10 +7,12 @@ class QOPVersion(Enum): + """A dictionary with the filter limitations for the QOP versions""" + NONE = { "feedforward_max": np.inf, "feedback_max": np.inf, - "feedforward_length": lambda feedback_len: np.inf - 0 * feedback_len, + "feedforward_length": lambda feedback_len: np.inf, } QOP222 = { "feedforward_max": 2 - 2**-16, @@ -31,7 +33,7 @@ def get_latest(cls): @classmethod def get_options(cls): """Return the list of implemented QOP versions""" - return [cls.NONE.name, cls.QOP220.name, cls.QOP222.name] + return [x.name for x in cls] def calc_filter_taps(