noisyiqp
Science Score: 44.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
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.8%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: jz-lu
- Language: Python
- Default Branch: main
- Size: 9.77 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
NoisyIQP (v1.0.0)
This is NoisyIQP, a tiny Python repository dedicated to the study of sparse instantaneous quantum polytime (IQP) circuits and their output distributions. Following the theoretical work by Bremner, Montanaro, and Shepherd, we provide an implementation of both the quantum algorithm (circuit sampling) and classical algorithm (Fourier analysis) for sampling from a sparse IQP circuit with noise.
Running the script
To compare the quantum and classical algorithm's output distributions <k> times on <n> qubits, run python general.py <n> -r <k>. For example, for
3 qubits and 5 runs, do python general.py 3 -r 5.
There are a number of parameters that may be adjusted to your liking.
DELTA: accuracy of approximation.
EPSILON: noise rate of quantum circuit.
ALPHA: a "spread" parameter of the distribution. We have set this to 1 for convenience.
GAMMA: a probability rate coefficient for CS gates. Refrain from changing this.
The smaller DELTA and EPSILON are and the larger ALPHA is, the faster the scaling of the classical algorithm. The exponent scales as 3 + 3*log(ALPHA / DELTA) / EPSILON, so exercise caution increasing ALPHA and decreasing DELTA and exercise extreme caution decreasing EPSILON. As of now, the parameters are
set so that the sampling algorithm scalings like O(n^3). But the overhead is very large, and will take around 30 seconds even for 3 qubits (compare 0.01s for the quantum algorithm). The easiest thing to do would be to increase ALPHA by an order of magnitude if you want better accuracy.
Caution: The quantum algorithm has a low overhead but is exponential time. The classical algorithm has a high overhead but is polynomial time to generate one sample. However, since we are plotting the whole (exponentially large) distribution, the specific work we are doing is actually exponential time, so the classical algorithm to generate te distribution plot is basically exponential time with high overhead. Hence, try not to run this script for more than 5 qubits (or do so at your, and your computer's, own risk!).
Organization
general.py: Callsquantum.pyandclassical.pyto run the two algorithms, then compares their performance visually.quantum.py: Given a parameterization of a IQP circuit, usesqiskitbackend simulations to calculate the output distributions approximately.classical.py: Given a parameterization of a IQP circuit, uses Fourier analysis to calculate the output distributions approximately.generator.py: Randomly generates a parameterization for the IQP circuit.
Dependencies
qiskitv1.0.2 or later +qiskit-aerv0.14.1 or later.numpyv1.26.3 or later.matplotlibv3.8.0 or later.
Future work
The current repository is meant to get a visual comparison between the circuit distribution and the classical approximation. There is an implementation in classical.py which can do the sampling if the -s flag is turned on. However, it runs extremely slowly and can burn your computer up with just 3 qubits. There are probably some optimizations one can do to speed it up, by avoiding repeated work on the cumulative_sum() function. There is no quantum implementation since that is the trivial part, but if one wishes to do this it can be done on qiskit Aer via the measure() function in a couple of lines.
Notes
This repository was created as part of my work in the MIT 8.371 (Quantum Information Science II) final project for Spring 2024.
Owner
- Login: jz-lu
- Kind: user
- Repositories: 2
- Profile: https://github.com/jz-lu
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: Sparse IQP sampling with depolarizing noise
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Jonathan Zhang
name-particle: Lu
email: lujz@mit.edu
affiliation: MIT Department of Mathematics
orcid: 'https://orcid.org/0000-0002-2806-8248'
repository-code: 'https://github.com/jz-lu/noisyiqp'