Installation
Python
pip install metatron-qso
One abi3 wheel covers CPython 3.9 and newer. Prebuilt wheels exist for
these platforms:
- Linux x86_64 and aarch64, glibc and musl;
- macOS on Intel and Apple silicon;
- Windows x86_64 and arm64.
The only runtime dependency is NumPy. On other platforms pip builds the package from source, which needs Rust 1.89 or newer.
import metatron_qso as q
print(q.__version__, q.MAX_QUBITS)
Rust
cargo add metatron-qso-rs
The crate is imported as metatron_qso. It has two features:
| Feature | Default | Effect |
|---|---|---|
parallel | yes | Multi-threaded kernels and reductions (rayon) |
cli | no | Builds the qso command-line tool |
Without parallel, everything runs on one thread. The results are
bit-for-bit identical either way: parallel sums use a fixed chunking that
does not depend on the number of threads.
Command-line tool
cargo install metatron-qso-rs --features cli
qso graph metatron
From source
No C or C++ toolchain is needed, only Rust, plus maturin for the Python package:
git clone https://github.com/LashSesh/qso && cd qso
cargo test -p metatron-qso-rs
pip install maturin
maturin develop --release -m metatron_qso_py/Cargo.toml