A high-performance library for quantum information science built on top of JAX
Project description
Quax
A high-performance quantum information science library built on top of JAX.
Data Representation
Quax stores all quantum objects in tensor format, preserving the structure of individual qudits for efficient tensor network operations. The .matrix property provides the flattened matrix representation when needed.
| Type | Tensor Shape | Matrix Shape |
|---|---|---|
| StateVector | (*ensemble, d0, d1, ...) |
(*ensemble, prod(dims)) |
| DensityMatrix | (*ensemble, d0_out, ..., d0_in, ...) |
(*ensemble, prod(dims), prod(dims)) |
| Unitary/Operator | (*ensemble, d0_out, ..., d0_in, ...) |
(*ensemble, prod(dims_out), prod(dims_in)) |
| KrausMap | (*ensemble, num_kraus, d0_out, ..., d0_in, ...) |
(*ensemble, num_kraus, d_out, d_in) |
| SuperOp/Choi/PauliLiouville | (*ensemble, d_out_bra..., d_out_ket..., d_in_bra..., d_in_ket...) |
(*ensemble, prod(dims_out)², prod(dims_in)²) |
Supported Operations on Quantum Objects
Unary Operations
| Operation | StateVector | DensityMatrix | Unitary | Kraus | SuperOp | KrausMap | Choi | Chi | PauliLiouville |
|---|---|---|---|---|---|---|---|---|---|
-x (negation) |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
x * scalar |
✓ | ✓ | ✓¹ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
x.conj() |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
x.T (transpose) |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
x.h (hermitian) |
✓³ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
x ** n (power) |
✗ | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✗ | ✓ |
¹ Returns Unitary if |scalar| = 1, otherwise Kraus
² Returns self (no-op for vectors)
³ Returns conj() for vectors
Binary Operations: Composition (@)
| Operation | Supported | Output Type |
|---|---|---|
StateVector @ StateVector |
✓ | scalar |
StateVector @ DensityMatrix |
✓ | StateVector |
StateVector @ Unitary |
✗ | — |
StateVector @ SuperOp |
✗ | — |
StateVector @ KrausMap |
✗ | — |
StateVector @ Choi |
✗ | — |
StateVector @ PauliLiouville |
✗ | — |
DensityMatrix @ StateVector |
✓ | StateVector |
DensityMatrix @ DensityMatrix |
✓ | DensityMatrix |
DensityMatrix @ Unitary |
✗ | — |
DensityMatrix @ SuperOp |
✗ | — |
DensityMatrix @ KrausMap |
✗ | — |
DensityMatrix @ Choi |
✗ | — |
DensityMatrix @ PauliLiouville |
✗ | — |
Unitary @ StateVector |
✓ | StateVector |
Unitary @ DensityMatrix |
✓ | DensityMatrix |
Unitary @ Unitary |
✓ | Unitary |
Unitary @ SuperOp |
✓ | SuperOp |
Unitary @ KrausMap |
✓ | KrausMap |
Unitary @ Choi |
✓ | Choi |
Unitary @ PauliLiouville |
✓ | PauliLiouville |
SuperOp @ StateVector |
✓ | DensityMatrix |
SuperOp @ DensityMatrix |
✓ | DensityMatrix |
SuperOp @ Unitary |
✓ | SuperOp |
SuperOp @ SuperOp |
✓ | SuperOp |
SuperOp @ KrausMap |
✓ | KrausMap |
SuperOp @ Choi |
✓ | Choi |
SuperOp @ PauliLiouville |
✓ | PauliLiouville |
KrausMap @ StateVector |
✓ | DensityMatrix |
KrausMap @ DensityMatrix |
✓ | DensityMatrix |
KrausMap @ Unitary |
✓ | KrausMap |
KrausMap @ SuperOp |
✓ | SuperOp |
KrausMap @ KrausMap |
✓ | KrausMap |
KrausMap @ Choi |
✓ | Choi |
KrausMap @ PauliLiouville |
✓ | PauliLiouville |
Choi @ StateVector |
✓ | DensityMatrix |
Choi @ DensityMatrix |
✓ | DensityMatrix |
Choi @ Unitary |
✓ | Choi |
Choi @ SuperOp |
✓ | SuperOp |
Choi @ KrausMap |
✓ | KrausMap |
Choi @ Choi |
✓ | Choi |
Choi @ PauliLiouville |
✓ | PauliLiouville |
PauliLiouville @ StateVector |
✓ | DensityMatrix |
PauliLiouville @ DensityMatrix |
✓ | DensityMatrix |
PauliLiouville @ Unitary |
✓ | PauliLiouville |
PauliLiouville @ SuperOp |
✓ | SuperOp |
PauliLiouville @ KrausMap |
✓ | KrausMap |
PauliLiouville @ Choi |
✓ | Choi |
PauliLiouville @ PauliLiouville |
✓ | PauliLiouville |
Binary Operations: Tensor Product (|)
| Operation | Supported | Output Type |
|---|---|---|
StateVector | StateVector |
✓ | StateVector |
StateVector | DensityMatrix |
✓ | DensityMatrix |
StateVector | Unitary |
✗ | — |
StateVector | SuperOp |
✗ | — |
StateVector | KrausMap |
✗ | — |
StateVector | Choi |
✗ | — |
StateVector | PauliLiouville |
✗ | — |
DensityMatrix | StateVector |
✓ | DensityMatrix |
DensityMatrix | DensityMatrix |
✓ | DensityMatrix |
DensityMatrix | Unitary |
✗ | — |
DensityMatrix | SuperOp |
✗ | — |
DensityMatrix | KrausMap |
✗ | — |
DensityMatrix | Choi |
✗ | — |
DensityMatrix | PauliLiouville |
✗ | — |
Unitary | StateVector |
✗ | — |
Unitary | DensityMatrix |
✗ | — |
Unitary | Unitary |
✓ | Unitary |
Unitary | SuperOp |
✓ | SuperOp |
Unitary | KrausMap |
✓ | KrausMap |
Unitary | Choi |
✓ | Choi |
Unitary | PauliLiouville |
✓ | PauliLiouville |
SuperOp | StateVector |
✗ | — |
SuperOp | DensityMatrix |
✗ | — |
SuperOp | Unitary |
✓ | SuperOp |
SuperOp | SuperOp |
✓ | SuperOp |
SuperOp | KrausMap |
✓ | KrausMap |
SuperOp | Choi |
✓ | Choi |
SuperOp | PauliLiouville |
✓ | PauliLiouville |
KrausMap | StateVector |
✗ | — |
KrausMap | DensityMatrix |
✗ | — |
KrausMap | Unitary |
✓ | KrausMap |
KrausMap | SuperOp |
✓ | SuperOp |
KrausMap | KrausMap |
✓ | KrausMap |
KrausMap | Choi |
✓ | Choi |
KrausMap | PauliLiouville |
✓ | PauliLiouville |
Choi | StateVector |
✗ | — |
Choi | DensityMatrix |
✗ | — |
Choi | Unitary |
✓ | Choi |
Choi | SuperOp |
✓ | SuperOp |
Choi | KrausMap |
✓ | KrausMap |
Choi | Choi |
✓ | Choi |
Choi | PauliLiouville |
✓ | PauliLiouville |
PauliLiouville | StateVector |
✗ | — |
PauliLiouville | DensityMatrix |
✗ | — |
PauliLiouville | Unitary |
✓ | PauliLiouville |
PauliLiouville | SuperOp |
✓ | SuperOp |
PauliLiouville | KrausMap |
✓ | KrausMap |
PauliLiouville | Choi |
✓ | Choi |
PauliLiouville | PauliLiouville |
✓ | PauliLiouville |
Notes
- Chi is not included in binary operations because it has no implemented transformations to/from other representations
- The composition rules follow the principle that when mixing representations, the result uses the "right" operand's representation type
- State-Operator tensor products (
State | Operator) returnNotImplemented - Operator-State tensor products (
Operator | State) returnNotImplemented
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 rigetti_quax-0.2.1.tar.gz.
File metadata
- Download URL: rigetti_quax-0.2.1.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.12.12 Linux/5.10.245-245.983.amzn2.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ffc92dc37096246ab93be94ea89e92466865bc4c3884e011a6ecb166b06be5
|
|
| MD5 |
e1282a16114f50cf06d03224ff730cac
|
|
| BLAKE2b-256 |
1968d65e5cfa81b433ddd51d0f8b14db2cc27d2a6c44b1b6cb309459777dc2f9
|
File details
Details for the file rigetti_quax-0.2.1-py3-none-any.whl.
File metadata
- Download URL: rigetti_quax-0.2.1-py3-none-any.whl
- Upload date:
- Size: 54.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.12.12 Linux/5.10.245-245.983.amzn2.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4a7ed3f16b56708e8c2c39dd49334b6f645c53a4bea875de62aa275af9b583c
|
|
| MD5 |
1a6cee1a7b58b683a0a41ae9ee863929
|
|
| BLAKE2b-256 |
705ecabe7dbc914d3d6a5e6a03cf1e733d9c793877901fc9af198a6a29245455
|