A Python package for isotropic error analysis in quantum computing
Project description
isotropic
isotropic is a python library that contains tools for analysis of isotropic errors in QC algorithms. See Executive summary of concepts for a quick run down on isotropic errors and how they are generated and added to the quantum state.
Installation
We recommend installing isotropic within a virtual environment. The repository uses uv for package and project management.
Install from pip
pip install isotropic[all]
The all option installs the necessary libraries for using the qiskit simulator for algorithm analysis and running the example notebooks.
Install from source
Clone the repository
git clone https://github.com/lazyoracle/isotropic-error-analysis
Install library and dependencies
cd isotropic-error-analysis
uv sync
uv pip install -e .\[all\]
NOTE:
It is important to set your environment to enable 64-bit operations in JAX. You can do this:
- At the beginning of your script or notebook using
jax.config.update('jax_enable_x64', True) - While running your script using
JAX_ENABLE_X64=1 python script.py - Within your shell configuration file (e.g.,
~/.zshrc) usingexport JAX_ENABLE_X64=True
Run examples
uv run jupyter notebook notebooks/
Run tests
uv run pytest --cov=src --cov-report=html --cov-report=term -n 4
Documentation
Documentation is available online at https://lazyoracle.github.io/isotropic-error-analysis/
Build local docs
If you want to build and view the documentation locally, follow the steps below:
- Clone the repository using
git clone https://github.com/lazyoracle/isotropic-error-analysis - Install dependencies for docs using
uv pip install -e .\[docs,all\] - Build and serve a live reloading version of the docs using
mkdocs serve
Executive summary of concepts
Isotropic errors [Lacalle2019], are characterized by their rotational symmetry around quantum states in the high-dimensional Hilbert space representation. Unlike conventional error models that typically affect specific components of quantum states in predictable ways, isotropic errors maintain equal probability of occurrence in all directions around the original quantum state. Recent work [Lacalle2021] has demonstrated that quantum codes cannot effectively correct isotropic errors, regardless of the specific code construction or encoding strategy employed.
In order to model the effect of an isotropic error on a quantum state $\Phi$, we follow the steps outlined below:
- Construct an orthonormal basis of $\Pi$ with center at $\Phi$.
- Generate a vector $e_2$ in $S_{d−1}$ with uniform distribution.
- Generate an angle $\theta_0$ in $[0,\pi]$ with density function $f(\theta_0)$.
- Generate the final perturbed state $\Psi$ as a rotation of $e_1 = \Phi$ by angle $\theta_0$ in the subspace spanned by the orthonormal basis $[e_1,e_2]$ using the expression $\Psi = \Phi \cos(\theta_0) + e_2 \sin(\theta_0)$
Once we have a recipe for adding an isotropic error to a quantum state, we can study the effect of such an error on the complexity of algorithms such as Grover's or Shor's that involve repeated executions until success.
FAQs
-
What system sizes can be analysed?
Currently this is tested for systems with up to 7 qubits. There are some open issues with calculation of the error for higher system sizes.
-
What algorithms can be analysed?
As of now, only Grover's algorithm is implemented (using Qiskit) and analysed here. However, the library accepts an arbitrary quantum state and returns the perturbed quantum state, both as a standard complex array. Which means it can be integrated with any quantum programming library such as Pennylane or Qiskit or Cirq that has its own routines for statevector simulation of different quantum algorithms.
-
Why does this not work on Python 3.13?
You likely ran into an issue with the build from source of the
qiskit-aerdependency. Try installing the library without the optional[all]or[algo]flags, and then separately installqiskit<2.0,>1.2andqiskit-aer<0.18,>0.15.
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 isotropic-0.7.0a0.tar.gz.
File metadata
- Download URL: isotropic-0.7.0a0.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b80d5ffd1d6671da7c2a0870a063a5016dbb978b3e73a090b26f2f1f4219a8d
|
|
| MD5 |
0ffaebac7b560550c841a3a679e7ce50
|
|
| BLAKE2b-256 |
786aca115e7991ede418172bb023d7ae01b3192ac2cefaf0c81c17b334692d5c
|
Provenance
The following attestation bundles were made for isotropic-0.7.0a0.tar.gz:
Publisher:
ci.yml on lazyoracle/isotropic-error-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
isotropic-0.7.0a0.tar.gz -
Subject digest:
0b80d5ffd1d6671da7c2a0870a063a5016dbb978b3e73a090b26f2f1f4219a8d - Sigstore transparency entry: 953605164
- Sigstore integration time:
-
Permalink:
lazyoracle/isotropic-error-analysis@6182d3ed85176c13badced58bae555d6d65d1995 -
Branch / Tag:
refs/tags/0.7.0-a0 - Owner: https://github.com/lazyoracle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@6182d3ed85176c13badced58bae555d6d65d1995 -
Trigger Event:
push
-
Statement type:
File details
Details for the file isotropic-0.7.0a0-py3-none-any.whl.
File metadata
- Download URL: isotropic-0.7.0a0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfaa0d6c4275c1dabb32c27a3b583b79ff405d4abf7cc71ffe1bf9dd74f1cd27
|
|
| MD5 |
cdc989bccaba8ce9af8df819882b03a2
|
|
| BLAKE2b-256 |
3bbd5bb2d5bcb6b0f3ff96d86f944d68904def18b3e0e730b71c9065f0d04ac0
|
Provenance
The following attestation bundles were made for isotropic-0.7.0a0-py3-none-any.whl:
Publisher:
ci.yml on lazyoracle/isotropic-error-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
isotropic-0.7.0a0-py3-none-any.whl -
Subject digest:
cfaa0d6c4275c1dabb32c27a3b583b79ff405d4abf7cc71ffe1bf9dd74f1cd27 - Sigstore transparency entry: 953605165
- Sigstore integration time:
-
Permalink:
lazyoracle/isotropic-error-analysis@6182d3ed85176c13badced58bae555d6d65d1995 -
Branch / Tag:
refs/tags/0.7.0-a0 - Owner: https://github.com/lazyoracle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@6182d3ed85176c13badced58bae555d6d65d1995 -
Trigger Event:
push
-
Statement type: