filter-functions

Efficient numerical calculation of generalized filter functions

https://github.com/qutech/filter_functions

Science Score: 85.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 21 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Committers with academic emails
    4 of 5 committers (80.0%) from academic institutions
  • Institutional organization owner
    Organization qutech has institutional domain (www.quantuminfo.physik.rwth-aachen.de)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords

filter-functions physics python quantum-computing quantum-control quantum-information qutip
Last synced: 6 months ago · JSON representation ·

Repository

Efficient numerical calculation of generalized filter functions

Basic Info
Statistics
  • Stars: 17
  • Watchers: 2
  • Forks: 8
  • Open Issues: 7
  • Releases: 15
Topics
filter-functions physics python quantum-computing quantum-control quantum-information qutip
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

filter_functions: A package for efficient numerical calculation of generalized filter functions to describe the effect of noise on quantum gate operations

codecov Build status Documentation Status PyPI version DOI

Introduction

Simply put, filter functions characterize a quantum system's susceptibility to noise at a given frequency during a control operation and can thus be used to gain insight into its decoherence. The formalism allows for efficient calculation of several quantities of interest such as average gate fidelity and even the entire quantum process up to a unitary rotation. Moreover, the filter function of a composite pulse can be easily derived from those of the constituent pulses, allowing for efficient assembly and characterization of pulse sequences.

Initially, filter functions have been introduced to model dynamical decoupling sequences [5, 6]. With this project we aim to provide a toolkit for calculating and inspecting filter functions for arbitrary pulses including pulses without analytic form such as one might get from numerical pulse optimization algorithms. These filter functions can be used to compute process descriptions, fidelities and other quantities of interest from arbitrary classical noise spectral densities. For the efficient and convenient treatment of gate sequences, concatenation rules that allow the filter function of a sequence to be computed from those of its constituents are implemented.

The filter_functions package is built to interface with QuTiP, a widely-used quantum toolbox for Python, as well as qopt and comes with extensive documentation and a test suite.

As a very brief introduction, consider a Hadamard gate implemented by a pi/2 Y-gate followed by a NOT-gate using simple square pulses. We can calculate and plot the dephasing filter function of the gate with the following code:

```python import filter_functions as ff import qutip as qt from math import pi

Hc = [[qt.sigmax()/2, [0, pi], 'X'], [qt.sigmay()/2, [pi/2, 0], 'Y']] # control Hamiltonian Hn = [[qt.sigmaz()/2, [1, 1], 'Z']] # constant coupling to z noise dt = [1, 1] # time steps

hadamard = ff.PulseSequence(Hc, Hn, dt) # Central object representing a control pulse omega = ff.util.getsamplefrequencies(hadamard) F = hadamard.getfilterfunction(omega)

from filterfunctions import plotting plotting.plotfilter_function(hadamard) # Filter function cached from before ```

Hadamard dephasing filter function

An alternative way of obtaining the Hadamard PulseSequence is by concatenating the composing pulses:

```python Y2 = ff.PulseSequence([[qt.sigmay()/2, [pi/2], 'Y']], [[qt.sigmaz()/2, [1], 'Z']], [1]) X = ff.PulseSequence([[qt.sigmax()/2, [pi], 'X']], [[qt.sigmaz()/2, [1], 'Z']], [1])

Y2.cachefilterfunction(omega) X.cachefilterfunction(omega)

hadamard = Y2 @ X # equivalent: ff.concatenate((Y2, X)) hadamard.is_cached('filter function')

True (filter function cached during concatenation)

```

To compute, for example, the infidelity of the gate in the presence of an arbitrary classical noise spectrum, we can simply call infidelity():

```python spectrum = 1e-2/omega infidelity = ff.infidelity(hadamard, spectrum, omega)

array([0.0025]) (one contribution per noise operator)

```

Installation

To install the package from PyPI, run pip install filter_functions. If you require the optional features provided by QuTiP (visualizing Bloch sphere trajectories), it is recommended to install QuTiP before by following the instructions on their website rather than installing it through pip. To install the package from source run python setup.py develop to install using symlinks or python setup.py install without.

To install dependencies of optional extras (matplotlib for plotting, QuTiP for Bloch sphere visualization), run pip install -e .[extra] where extra is one or more of plotting, bloch_sphere_visualization from the root directory. To install all dependencies, including those needed to build the documentation and run the tests, use the extra all.

Documentation

You can find the documentation on Readthedocs. It is built from Jupyter notebooks that can also be run interactively and are located here. The notebooks explain how to use the package and thus make sense to follow chronologically as a first step. Furthermore, there are also a few example scripts in the examples folder.

The documentation including the example notebooks and an automatically generated API documentation can be built by running make <format> inside the doc directory where <format> is for example html.

Interactively using the documentation requires jupyter, and building a static version additionally requires nbsphinx, numpydoc, sphinx_rtd_theme, as well as pandoc. The last can be installed via conda (conda install pandoc) or downloaded from Github and the rest automatically by running pip install -e .[doc].

Citing

If this software has benefited your research, please consider citing:

Formalism

[1]: T. Hangleiter, P. Cerfontaine, and H. Bluhm. Filter-function formalism and software package to compute quantum processes of gate sequences for classical non-Markovian noise. Phys. Rev. Res. 3, 043047 (2021). 10.1103/PhysRevResearch.3.043047. arXiv:2103.02403.

[2]: P. Cerfontaine, T. Hangleiter, and H. Bluhm. Filter Functions for Quantum Processes under Correlated Noise. Phys. Rev. Lett. 127, 170403 (2021). 10.1103/PhysRevLett.127.170403. arXiv:2103.02385.

Gradients

[3]: I. N. M. Le, J. D. Teske, T. Hangleiter, P. Cerfontaine, and Hendrik Bluhm. Analytic Filter Function Derivatives for Quantum Optimal Control. Phys. Rev. Applied 17, 024006 (2022). 10.1103/PhysRevApplied.17.024006. arXiv:2103.09126.

Software

[4]: T. Hangleiter, I. N. M. Le, and J. D. Teske, "filter_functions: A package for efficient numerical calculation of generalized filter functions to describe the effect of noise on quantum gate operations," (2021). 10.5281/zenodo.4575000.

Additional References

[5]: L. Cywinski, R. M. Lutchyn, C. P. Nave, and S. Das Sarma. How to enhance dephasing time in superconducting qubits. Phys. Rev. B 77, 174509 (2008). 10.1103/PhysRevB.77.174509.

[6]: T. J Green., J. Sastrawan, H. Uys, and M. J. Biercuk. Arbitrary quantum control of qubits in the presence of universal noise. New J. Phys. 15, 095004 (2013). 10.1088/1367-2630/15/9/095004.

Owner

  • Name: Quantum Technology Group
  • Login: qutech
  • Kind: organization
  • Location: Aachen, Germany

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  filter_functions
message: >-
  If this software has benefited your research, please 
  consider citing it as below.
type: software
doi: 10.5281/zenodo.4575000
authors:
  - given-names: Tobias
    family-names: Hangleiter
    email: tobias.hangleiter@rwth-aachen.de
    affiliation: >-
      JARA-FIT Institute for Quantum Information,
      Forschungszentrum Jülich GmbH and RWTH Aachen
      University, 52074 Aachen, Germany
    orcid: 'https://orcid.org/0000-0002-5177-6162'
  - given-names: Isabel
    family-names: Nha Minh Le
    email: isabel.le@rwth-aachen.de
    affiliation: >-
      JARA-FIT Institute for Quantum Information,
      Forschungszentrum Jülich GmbH and RWTH Aachen
      University, 52074 Aachen, Germany
    orcid: 'https://orcid.org/0000-0001-6707-044X'
  - given-names: Julian D.
    family-names: Teske
    email: julian.teske@rwth-aachen.de
    affiliation: >-
      JARA-FIT Institute for Quantum Information,
      Forschungszentrum Jülich GmbH and RWTH Aachen
      University, 52074 Aachen, Germany
    orcid: 'https://orcid.org/0000-0002-7590-7876'
preferred-citation:
  type: article
  authors:
  - given-names: Tobias
    family-names: Hangleiter
    email: tobias.hangleiter@rwth-aachen.de
    affiliation: >-
      JARA-FIT Institute for Quantum Information,
      Forschungszentrum Jülich GmbH and RWTH Aachen
      University, 52074 Aachen, Germany
    orcid: 'https://orcid.org/0000-0002-5177-6162'
  - given-names: Pascal
    family-names: Cerfontaine
    email: pascal.cerfontaine@rwth-aachen.de
    affiliation: >-
      JARA-FIT Institute for Quantum Information,
      Forschungszentrum Jülich GmbH and RWTH Aachen
      University, 52074 Aachen, Germany
    orcid: 'https://orcid.org/0000-0002-8227-4018'
  - given-names: Hendrik
    family-names: Bluhm
    email: bluhm@physik.rwth-aachen.de
    affiliation: >-
      JARA-FIT Institute for Quantum Information,
      Forschungszentrum Jülich GmbH and RWTH Aachen
      University, 52074 Aachen, Germany
    orcid: 'https://orcid.org/0000-0002-5224-7254'
  doi: 10.1103/PhysRevResearch.3.043047
  journal: Physical Review Research
  month: 10
  year: 2021
  start: 043047
  title: >-
    Filter-function formalism and software package 
    to compute quantum processes of gate sequences 
    for classical non-Markovian noise
  issue: 4
  volume: 3
identifiers:
  - type: doi
    value: 10.1103/PhysRevResearch.3.043047
    description: >-
      Article on the formalism and software
      implementation
  - type: doi
    value: 10.5281/zenodo.4575000
    description: Zenodo DOI for the software package
  - type: doi
    value: 10.1103/PhysRevLett.127.170403
    description: Letter introducing parts of the formalism
  - type: doi
    value: 10.1103/PhysRevApplied.17.024006
    description: Article on analytic derivatives
repository-code: 'https://github.com/qutech/filter_functions'
url: >-
  https://www.quantuminfo.physik.rwth-aachen.de/cms/Quantuminfo/Forschung/Quantum-Technology-Group/~zcsx/code/lidx/1/
keywords:
  - python
  - physics
  - quantum computing
  - quantum information
  - qutip
  - filter functions
  - quantum control
license: GPL-3.0

GitHub Events

Total
  • Watch event: 2
  • Delete event: 10
  • Issue comment event: 6
  • Push event: 38
  • Pull request event: 17
  • Create event: 10
Last Year
  • Watch event: 2
  • Delete event: 10
  • Issue comment event: 6
  • Push event: 38
  • Pull request event: 17
  • Create event: 10

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 444
  • Total Committers: 5
  • Avg Commits per committer: 88.8
  • Development Distribution Score (DDS): 0.023
Top Committers
Name Email Commits
Tobias Hangleiter t****r@r****e 434
Tobias Hangleiter 3****r@u****m 5
Julian Teske t****e@i****e 3
INSTITUT2B\teske j****e@r****e 1
Hendrik Bluhm b****m@p****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 17
  • Total pull requests: 93
  • Average time to close issues: 5 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 0.76
  • Average comments per pull request: 1.01
  • Merged pull requests: 91
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 16
  • Average time to close issues: N/A
  • Average time to close pull requests: 24 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.94
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • thangleiter (16)
  • JDTeske (1)
Pull Request Authors
  • thangleiter (105)
  • JDTeske (1)
Top Labels
Issue Labels
enhancement (8) performance (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 273 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 14
  • Total maintainers: 2
pypi.org: filter-functions

Package for efficient calculation of generalized filter functions

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 273 Last month
Rankings
Dependent packages count: 10.0%
Forks count: 11.9%
Stargazers count: 15.2%
Average: 15.7%
Downloads: 19.4%
Dependent repos count: 21.7%
Maintainers (2)
Last synced: 6 months ago

Dependencies

doc/requirements.txt pypi
  • ipykernel *
  • ipython *
  • jupyter_client *
  • nbsphinx *
  • numpydoc *
  • sphinx >=1.4
  • sphinx_rtd_theme *
setup.py pypi
  • numpy *
  • opt_einsum *
  • scipy *
  • sparse *
  • tqdm *
.github/workflows/main.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • codecov/codecov-action v4 composite
environment.yml pypi