Skip to content

Commit

Permalink
fix + bump version (#208)
Browse files Browse the repository at this point in the history
Added to __init__
  • Loading branch information
yomach authored May 6, 2024
1 parent 6346760 commit 15d0b6d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
2 changes: 2 additions & 0 deletions qualang_tools/digital_filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
exponential_decay,
high_pass_exponential,
single_exponential_correction,
multi_exponential_decay,
highpass_correction,
bounce_and_delay_correction,
)
Expand All @@ -14,6 +15,7 @@
"exponential_decay",
"high_pass_exponential",
"single_exponential_correction",
"multi_exponential_decay",
"highpass_correction",
"bounce_and_delay_correction",
]
6 changes: 4 additions & 2 deletions qualang_tools/digital_filters/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down

0 comments on commit 15d0b6d

Please sign in to comment.