a numpy-based quantum information toolbox
Project description
numqi: a numpy-based quantum information package
WARNING: no backward compatibility guarantee until version 1.0.0
keyword: quantum information, numpy, pytorch, manifold optimization, trivialization
Quickstart
more detailed installation instructions see docs/installation
pip install numqi
A simple example to detect whether Bell state wiki is entangle or not using positive partial transpose (PPT) criteria.
import numqi
bell_state = numqi.state.Werner(d=2, alpha=1)
print(bell_state) #a numpy array
# [[ 0. 0. 0. 0. ]
# [ 0. 0.5 -0.5 0. ]
# [ 0. -0.5 0.5 0. ]
# [ 0. 0. 0. 0. ]]
print(numqi.entangle.is_ppt(bell_state, (2,2))) #True if seperable, False if entangled
# False
Module structure
mindmap
root((numqi))
core
manifold
random
optimize
state
gate
pauli
sim
QCircuit simulator
Clifford simulator
dicke
gellmann
channel
matrix space
geometric measure
hierarchical method
group
application
entangle
PureB ext
irrep symext
PPT
CHA
qec
VarQEC
maximum entropy
unique determine
UDA
UDP
query
VarQQA
optimal control
GRAPE
core modules
numqi.sim
: numpy based quantum simulator wiki/quantum-simulator, support gradient back-propagation and variational quantum circuits, Clifford circuit simulatornumqi.dicke
: Dicke basis, bosonic statesnumqi.random
: sample random quantum states, matrices, channels, etc.numqi.state
: various quantum states, like Werner state, Bell state, etc. and their properties like entanglement measure, etc.numqi.gate
: various quantum gate wiki/quantum-logic-gate, like Pauli gate (various representation), Clifford gate, etc.numqi.gellmann
: convert matrix into gellmann basis and reversally wiki/gellmann wiki/generalized-gellmannnumqi.channel
: utilities related to quantum channel, like conversion between different representations of a quantum channel (Kraus operator, super-operator, Choi state, etc.) wiki/quantum-channelnumqi.manifold
: trivialzation of various smooth manifolds and quantum objects- smooth manifold: sphere, positive semi-definite matrix, special orthogonal / unitary group, Stiefel manifold etc.
- quantum object: denotes quantum state, quantum gate, Hamiltonian, quantum channel etc.
numqi.group
: some basic utility for group theory wiki/group, like irreducible representation, symmetric group, Symplectic group over finite fieldSp(2n, F2)
, etc.numqi.optimize
: wrapper ofscipy.optimize
andSGD/Adam
optimizers for manifold optimizationnumqi.matrix_space
: Numerical range, linear space of matrices, geometric measure, hierarchical method, etc.- Quantifying Subspace Entanglement with Geometric Measures arxiv-link
numqi.utils
: some utility functions, like, calculate fidelity, purity, entropy etc.
application modules
numqi.entangle
: detect entanglement wiki/quantum-entanglement- PPT (positive partial transpose)
- convex hull approximation
- Pure Bosonic extension arxiv-link
- irreducible representation of symmetric extension doi-link
- unextendible product state, bound extangled state, etc.
numqi.maximum_entropy
: relation between Hamiltonian, groud state, and marginal problem- Maximum entropy methods for quantum state compatibility problems arxiv-link
numqi.qec
: quantum error correction code (QECC) wiki- Variational learning for quantum error-correcting codes doi-link
- circuits to encode some well-known QECC, like
((5,2,3))
,((8,8,3))
numqi.unique_determine
: unique determinedness in quantum state tomography- Variational Approach to Unique Determinedness in Pure-state Tomography arxiv-link
numqi.query
: quantum query- Variational learning algorithms for quantum query complexity arxiv-link
numqi.optimal_control
: optimal control for quantum system, e.g. finding the optimal control pulse to implement a quantum gate- Gradient ascent pulse engineering algorithm (GRAPE) (gradient ascent pulse engineering)
Folder structure
python/numqi/
: source codedocs/
: kinds of markdown files for generating websitetests/
: unit testsexamples/
: single file scripts to demonstrate how to usenumqi
project/
: some projects based onnumqi
, whether finished or not- misc
README.md
: this filepyproject.toml
: to make a pip-installable packagemkdocs.yml
: to generate websiteLICENSE
.gitignore
How to contribute
see docs/installation "Guide-for-contributors" section
mermaid diagram
Since mkdocs-material not supported the mermaid-10.x mkdocs-material/issue, while github web support it, let's put all these mermaid diagram here and make a screenshot on the mermaid-live-editor
mmdc -i numqi-module.mmd -o numqi-module.png
module structure
flowchart TD
id1(density matrix)
id2(((SEP)))
id3(((ENT)))
id4(PPT?)
id5(CHA?)
id6(bosonic extension SDP?)
id7(larger k PureB-ext?)
id8{{dotted line: not guaranteed, probably}}
id1 --> id4
id4 -->|no| id3
id4 -->|yes| id5
id5 -.->|large loss| id3
id5 -->|large loss| id6
id6 -->|no| id3
id6 -->|yes| id7
id7 -.->|zero loss| id2
id7 -.->|large loss| id3
id5 -->|zero loss| id2
Recommended courses
- point-set topology
- youtube-link Marius Furter
- smooth manifold
- youtube-link The Bright Side of Mathematics
- youtube-link qncubed3
- Riemannian manifold
- Differential geometry
- algebraic topology
- youtube-link Presented by Dr. Anthony Bosman.
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
File details
Details for the file numqi-0.4.0.tar.gz
.
File metadata
- Download URL: numqi-0.4.0.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6b7376db12257c82a14774790de708de35f1e3fbe53e51eb5a9303b932dbf59 |
|
MD5 | 9f718bc3eb7ca21d0141b5d13bb7a947 |
|
BLAKE2b-256 | 0d4a09f75b63b5b3db24a4098e36b3b37844dd85ff44a84249d4e68171887a32 |
File details
Details for the file numqi-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: numqi-0.4.0-py3-none-any.whl
- Upload date:
- Size: 339.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d1e8b67165dfb7655984c4846c0e3525b754e5699e55889d77976379ed45c87 |
|
MD5 | aaa86a732c815456314a8552a73889b9 |
|
BLAKE2b-256 | 9d0b891ff491e37e6e9727e26e1db018c030d4b2c60197baf83e66849716e5ab |