Jet is a cross-platform C++ and Python library for simulating quantum circuits using tensor network contractions.
Features
Runs on a variety of systems, from single-board machines to massively parallel supercomputers.
Accelerates tensor contractions using a novel task-based parallelism approach.
Models quantum systems with an arbitrary number of basis states.
To get started with Jet, read one of our tutorial walkthroughs or browse the full API documentation.
Installation
C++
The Jet C++ library requires Taskflow, a BLAS library with a CBLAS interface, and a C++ compiler with C++17 support. To use Jet, add #include <Jet.hpp> to the top of your header file and link your program with the CBLAS library.
For example, assuming that the Taskflow headers can be found in your g++ include path and OpenBLAS is installed on your system, you can compile the hellojet.cpp program below
#include <array>
#include <complex>
#include <iostream>
#include <Jet.hpp>
int main(){
using Tensor = Jet::Tensor<std::complex<float>>;
Tensor lhs({"i", "j", "k"}, {2, 2, 2});
Tensor rhs({"j", "k", "l"}, {2, 2, 2});
lhs.FillRandom();
rhs.FillRandom();
Tensor res = Tensor::ContractTensors(lhs, rhs);
for (const auto &datum : res.GetData()) {
std::cout << datum << std::endl;
}
std::cout << "You have successfully used Jet version " << Jet::Version() << std::endl;
return 0;
}
by running
git clone https://github.com/XanaduAI/jet
g++ --std=c++17 -O3 -Ijet/include hellojet.cpp -lopenblas
The output of this program should resemble
$ ./hellojet
(-0.936549,0.0678852)
(-0.0786964,-0.771624)
(2.98721,-0.657124)
(-1.90032,1.58051)
You have successfully used Jet version 0.2.1
For more detailed instructions, see the development guide.
Python
The Jet Python package requires Python version 3.7 and above. Installation of Jet, as well as all dependencies, can be done using pip:
pip install quantum-jet
To build the Jet Python distribution locally, a BLAS library with a CBLAS interface and a C++ compiler with C++17 support is required. Simply run
make dist
pip install dist/*.whl
To verify that Jet is installed, you can run the hellojet.py program below
import jet
lhs = jet.Tensor(["i", "j", "k"], [2, 2, 2])
rhs = jet.Tensor(["j", "k", "l"], [2, 2, 2])
lhs.fill_random()
rhs.fill_random()
res = jet.contract_tensors(lhs, rhs)
for datum in res.data:
print(f"{datum:.5f}")
print("You have successfully used Jet version", jet.version())
The output of this program should resemble
$ python hellojet.py
1.96289+0.25257j
-0.16588-1.44652j
-1.43005+0.49516j
1.66881-1.67099j
You have successfully used Jet version 0.2.1
Contributing to Jet
We welcome new contributions - simply fork the Jet repository and make a pull request containing your contribution. All contributers to Jet will be listed as authors on the releases. See our changelog for more details.
We also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects or applications built using Jet. Visit the contributions page to learn more about sharing your ideas with the Jet team.
Support
Source Code: https://github.com/XanaduAI/jet
Issue Tracker: https://github.com/XanaduAI/jet/issues
If you are having issues, please let us know by posting the issue on our GitHub issue tracker.
License
Jet is free and open source, released under the Apache License, Version 2.0.
Jet contains a copy of JSON for Modern C++ from Niels Lohmann which is licenced under the MIT License.
Metadata
Release files for quantum-jet 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quantum-jet-0.2.2.tar.gz | 223.3 kB | Without provenance | Details for quantum-jet-0.2.2.tar.gz |
Built distributions (wheels)
Total release size: 33.4 MB
Release files / quantum-jet-0.2.2.tar.gz
| Download URL | quantum-jet-0.2.2.tar.gz |
|---|---|
| Size | 223.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7de01abe63cff38eaf116785fad8df2fbd0eb16e0401c5ba22bba080792dc53
|
|
BLAKE2b-256 checksum How to use checksums |
d827c26a394fed71ab9dc11afd71c6609cf74e6de2547a07cbde7561eccdd807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Release files / quantum_jet-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | quantum_jet-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
67516f8e792e173dfd8e7fac33965377d6cdfd3895fd6c1791226c9b19cd37a9
|
|
BLAKE2b-256 checksum How to use checksums |
52e7c2f56d29884fd306710d6c7cfd20731640876a2432effe4997314b3c640b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Release files / quantum_jet-0.2.2-cp39-cp39-macosx_10_14_x86_64.whl
| Download URL | quantum_jet-0.2.2-cp39-cp39-macosx_10_14_x86_64.whl |
|---|---|
| Size | 356.7 kB |
| Tags | CPython 3.9 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
7ff26fb6fc26b5428628ed14acb8cf0fcc06183e8ef0974a2d392c8568bd90ea
|
|
BLAKE2b-256 checksum How to use checksums |
c0a8c9e409517036670f136ecde6b614fff5850d4bbdd5225ce9c3864424d460
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Release files / quantum_jet-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | quantum_jet-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
56d2bbff81a85ac5467fbf21776735031f75d29a166eb25097faeb66a02381eb
|
|
BLAKE2b-256 checksum How to use checksums |
c8f8f494bbc8fb1d5bc57265b2eb9bb6d457d282f479ebb8dfa573eca4f9bf11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Release files / quantum_jet-0.2.2-cp38-cp38-macosx_10_14_x86_64.whl
| Download URL | quantum_jet-0.2.2-cp38-cp38-macosx_10_14_x86_64.whl |
|---|---|
| Size | 356.7 kB |
| Tags | CPython 3.8 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
285ba3a9d4b0095584d24a8ac4b28f2ab6b1c6ff6c5ee9193e71094d40876df0
|
|
BLAKE2b-256 checksum How to use checksums |
86114fab43a3c3462aeb9416c049b7874d654e628c1cae575505224e7a264214
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Release files / quantum_jet-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | quantum_jet-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2943d8519ec1a6e6bb7f6401706bbbe65281f54e4c35cca091207d299742c35b
|
|
BLAKE2b-256 checksum How to use checksums |
ab5dbac1021b1be5271159b895d24f1ce2f9daaa29444cabdd7e87c01ee522ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Release files / quantum_jet-0.2.2-cp37-cp37m-macosx_10_14_x86_64.whl
| Download URL | quantum_jet-0.2.2-cp37-cp37m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 350.9 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c3c14c712c4874a2d6bafa4798960a28f15cd72df4e42ca3169ac3700dcfcb7
|
|
BLAKE2b-256 checksum How to use checksums |
d40a900df53810aff8fbfb4fd0e5bc051ab5586d141e9bb33299328305f9faaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Security for quantum-jet 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.