All Projects → XanaduAI → jet

XanaduAI / jet

Licence: Apache-2.0 license
Jet is a cross-platform library for simulating quantum circuits using tensor network contractions.

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects
Makefile
30231 projects

Projects that are alternatives of or similar to jet

A-quantum-inspired-genetic-algorithm-for-k-means-clustering
Implementation of a Quantum inspired genetic algorithm proposed by A quantum-inspired genetic algorithm for k-means clustering paper.
Stars: ✭ 28 (-17.65%)
Mutual labels:  quantum-computing
Interlin-q
A Quantum Interconnect Simulator for Distributed Quantum Algorithms
Stars: ✭ 32 (-5.88%)
Mutual labels:  quantum-computing
pennylane-lightning
The PennyLane-Lightning plugin provides a fast state-vector simulator written in C++ for use with PennyLane
Stars: ✭ 28 (-17.65%)
Mutual labels:  quantum-computing
avaloni
Interpreter of the Avalon programming language.
Stars: ✭ 14 (-58.82%)
Mutual labels:  quantum-computing
QuantumResources
A collection of resources for Quantum Computing
Stars: ✭ 43 (+26.47%)
Mutual labels:  quantum-computing
qcl
Quantum Computation Language port from http://tph.tuwien.ac.at/~oemer/qcl.html
Stars: ✭ 29 (-14.71%)
Mutual labels:  quantum-computing
Tutorials
This repository contains study material that EPFL, Harvard, MIT Quantum Computing associations and others provide to the students as training and practice.
Stars: ✭ 34 (+0%)
Mutual labels:  quantum-computing
quil
Specification of Quil: A Practical Quantum Instruction Set Architecture
Stars: ✭ 80 (+135.29%)
Mutual labels:  quantum-computing
neural-decoder
Neural Network Decoders for Quantum Error Correcting Codes
Stars: ✭ 19 (-44.12%)
Mutual labels:  quantum-computing
cirq-on-iqm
Cirq adapter for IQM's quantum computers
Stars: ✭ 21 (-38.24%)
Mutual labels:  quantum-computing
UniversalQCompiler
Synthesizing arbitrary quantum computations
Stars: ✭ 53 (+55.88%)
Mutual labels:  quantum-computing
quilc
The optimizing Quil compiler.
Stars: ✭ 413 (+1114.71%)
Mutual labels:  quantum-computing
pulsemaker
A Python widget library for designing pulses and pulse schedules for quantum computing hardware. Can be used in Jupyter notebooks, JupyterLab, and the IPython kernel.
Stars: ✭ 19 (-44.12%)
Mutual labels:  quantum-computing
qiskit.org
The Qiskit official website
Stars: ✭ 85 (+150%)
Mutual labels:  quantum-computing
QI
Quantum information mathematica package
Stars: ✭ 26 (-23.53%)
Mutual labels:  quantum-computing
qcor
C++ compiler for heterogeneous quantum-classical computing built on Clang and XACC
Stars: ✭ 78 (+129.41%)
Mutual labels:  quantum-computing
qram
Library for Q# implementing various qRAM proposals
Stars: ✭ 46 (+35.29%)
Mutual labels:  quantum-computing
QuantumComputing
Collection of Tutorials and other Quantum Computer programming related things.
Stars: ✭ 120 (+252.94%)
Mutual labels:  quantum-computing
pyQuirk
A Python widget for Quirk to be used in Jupyter notebooks, JupyterLab, and the IPython kernel.
Stars: ✭ 18 (-47.06%)
Mutual labels:  quantum-computing
quantumcat
quantumcat is a platform-independent, open-source, high-level quantum computing library, which allows the quantum community to focus on developing platform-independent quantum applications without much effort.
Stars: ✭ 18 (-47.06%)
Mutual labels:  quantum-computing

Jet


GitHub Actions Documentation Standard License

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

If you are having issues, please let us know by posting the issue on our GitHub issue tracker.

Authors

Jet is the work of many contributors.

If you are doing research using Jet, please cite our paper:

Trevor Vincent, Lee J. O'Riordan, Mikhail Andrenkov, Jack Brown, Nathan Killoran, Haoyu Qi, and Ish Dhand. Jet: Fast quantum circuit simulations with parallel task-based tensor-network contraction. 2022. Published in Quantum.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].