Finite Width Dynamical Decoupling (FWDD) implements Dynamical Decoupling considering the effects of Finite Pulse Widths.
Project description
FWDD
FWDD (Finite Width Dynamical Decoupling) implements Dynamical Decoupling considering the effects of FInite Pulse Widths. All times in the tutorials use microseconds $(\mu s)$.
The code presented here is used in the paper Quantum sensing with a spin ensemble in a two-dimensional material to predict noise spectra.
Installation
You can install fwdd via pip or conda (from Conda-forge).
Via pip
pip install fwdd
Via conda (Conda-forge)
conda install -c conda-forge fwdd
Local Development & Tutorials
If you are running the tutorial notebooks locally and want to make live changes, run an editable installation:
git clone https://github.com/nonohuff/FWDD.git
cd FWDD
pip install -e .
Quick Start
Here is how you can import the core modules of fwdd in your python code:
from fwdd import filter_function as ff
from fwdd import noise_spectra as ns
from fwdd import coherence_profile as cp
from fwdd import noise_learning_fitting as nlf
from fwdd import fitting_utils as fu
Coherence-Noise Relationship
A given dynamical decoupling pulse sequence of $N$ pulses (e.g. CPMG, XY8) yields a corresponding filter function, $F_N(\omega, t)$, which is related to the coherence decay as follows:
$$ \begin{align} C_N(t) = e^{-\chi_N(t)}, \quad \chi(t) = (t/T_{2})^\beta, \ \chi_N(t) = \frac{1}{\pi} \int _{0}^{\infty} d\omega S(\omega) \frac{F_N(\omega,t)}{\omega^2} \end{align} $$
Here, $C_N(t)$ is the coherence decay as a function of time characterized by two important parameters: $T_2$ - coherence time and $\beta$ - stretch factor. $F_N(\omega,t)$ is a filer function defined by the dynamical decoupling pulse sequence, and $S(\omega)$ is the power spectral density of the underlying noise (standard units $\frac{Hz^2}{Hz}$).
Delta Function Approximation
If $F_N(\omega,t)$ is approximated as a $\delta$ function peaked at $\omega_0 =\pi N/T$, where the total experiment time, $T=2N\tau+Nt_{\pi}$, $2\tau$ being the wait time between the pulses and $t_{\pi}$ is the pulse width. Then, the integral above is trival to invert and we have:
$$ \begin{equation} S(\omega) = -\pi \frac{ln(C_N(T))}{T}. \end{equation} $$
This approximation holds true when the $\pi$-pulses are themselves much shorter compared to the delay between them and as a consequence the coherence time, $T_2$.
Finite-width Pulses
When the length of the $\pi$-pulse becomes a sizable fraction of the delay (or $T_2$), such a $\delta$ approximation cannot be made. In that case, the filter function needs to be modified to accommodate for the finite pulse duration and can be expressed as:
$$ F_{N}(\omega,T)=\left|1+(-1)^{N+1}e^{i\omega T} +2\sum_{k=1}^N(-1)^ke^{i\omega t_{k}}\cos\left(\frac{\omega t_{\pi}}{2}\right)\right|^{2} $$
Where $t_k$ is the time corresponding to the center of the $k^{th}$ pulse, and $t_{\pi}$ is the pulse width.
Tutorial Notebooks
We have included several tutorial notebooks to make adapting this code to your purposes easier. They cover how we implement noise spectral densities, $S(\omega)$, the finite-width filter function, coherence profile, $C_N(t)$, and finally, how we go about fitting noise profiles to observed $C_N(t)$ data (and how to do it for you own data/noise models!). The reccomended viewwing of these notebooks are.
noise_tutorial.ipynb -> filter_function_tutorial.ipynb -> coherence_profile_tutorial.ipynb -> noise_learning_fitting.ipynb
Conventions
- $\omega = 2 \pi f$
- $t = \frac{1}{f}$
- Time varibles assume microseconds, so
tau_p = 0.024means $0.024 \mu s$ or $24 ns$
Citation
If you use fwdd in your research, please cite our work:
@misc{biswas2025quantum,
title = {Quantum sensing with a spin ensemble in a two-dimensional material},
author = {Souvik Biswas, Giovanni Scuri, Noah Huffman, and et al.},
year = {2025},
eprint = {2509.08984},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2509.08984}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fwdd-0.1.1.tar.gz.
File metadata
- Download URL: fwdd-0.1.1.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdbf8348d9176fec256baf41514a4220af4a1607545a10bd68fd26b792f99100
|
|
| MD5 |
df7ae5b89bea56e77d51d758a1c20f21
|
|
| BLAKE2b-256 |
25bb459156b59362a6a70bed0c87637ba3365ef4b8c1d802677c9aadec9fa5d9
|
Provenance
The following attestation bundles were made for fwdd-0.1.1.tar.gz:
Publisher:
publish.yml on nonohuff/FWDD
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fwdd-0.1.1.tar.gz -
Subject digest:
bdbf8348d9176fec256baf41514a4220af4a1607545a10bd68fd26b792f99100 - Sigstore transparency entry: 2171304673
- Sigstore integration time:
-
Permalink:
nonohuff/FWDD@20d1eece93f4fa2e742020feb6dc2373f196e0c8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/nonohuff
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20d1eece93f4fa2e742020feb6dc2373f196e0c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fwdd-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fwdd-0.1.1-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2838c86a9004f2a600c6bd9a6485451b21c68b895afce73b8ca6939efe54600
|
|
| MD5 |
1a0948d24547ab046b87e53609bb1fd4
|
|
| BLAKE2b-256 |
eb3ce05f47326dfb197fa8000a28fd25d872be3d699c4ea7309c361f5d5ba55e
|
Provenance
The following attestation bundles were made for fwdd-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on nonohuff/FWDD
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fwdd-0.1.1-py3-none-any.whl -
Subject digest:
d2838c86a9004f2a600c6bd9a6485451b21c68b895afce73b8ca6939efe54600 - Sigstore transparency entry: 2171304682
- Sigstore integration time:
-
Permalink:
nonohuff/FWDD@20d1eece93f4fa2e742020feb6dc2373f196e0c8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/nonohuff
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20d1eece93f4fa2e742020feb6dc2373f196e0c8 -
Trigger Event:
release
-
Statement type: