All Projects → quantumlib → Qsim

quantumlib / Qsim

Licence: apache-2.0
Schrödinger and Schrödinger-Feynman simulators for quantum circuits.

Projects that are alternatives of or similar to Qsim

Recirq
Research using Cirq!
Stars: ✭ 119 (-37.37%)
Mutual labels:  quantum-computing
Learnquantum
Repo of resources to help learn about quantum computing.
Stars: ✭ 143 (-24.74%)
Mutual labels:  quantum-computing
Quantum Circuit
Quantum Circuit Simulator implemented in JavaScript
Stars: ✭ 157 (-17.37%)
Mutual labels:  quantum-computing
Qpanda 2
QPanda 2 is an open source quantum computing framework developed by OriginQC that can be used to build, run, and optimize quantum algorithms.
Stars: ✭ 128 (-32.63%)
Mutual labels:  quantum-computing
Solutionqcqinielsenchuang
Solution for Quantum Computation and Quantum Information by Nielsen and Chuang
Stars: ✭ 141 (-25.79%)
Mutual labels:  quantum-computing
Qiskit
Qiskit is an open-source SDK for working with quantum computers at the level of circuits, algorithms, and application modules.
Stars: ✭ 2,332 (+1127.37%)
Mutual labels:  quantum-computing
Teach Me Quantum
⚛ 10 week Practical Course on Quantum Information Science and Quantum Computing - with Qiskit and IBMQX
Stars: ✭ 118 (-37.89%)
Mutual labels:  quantum-computing
Quimb
A python library for quantum information and many-body calculations including tensor networks.
Stars: ✭ 170 (-10.53%)
Mutual labels:  quantum-computing
Awesome Quantum Machine Learning
Here you can get all the Quantum Machine learning Basics, Algorithms ,Study Materials ,Projects and the descriptions of the projects around the web
Stars: ✭ 1,940 (+921.05%)
Mutual labels:  quantum-computing
Pyzx
Python library for quantum circuit rewriting and optimisation using the ZX-calculus
Stars: ✭ 154 (-18.95%)
Mutual labels:  quantum-computing
Scaffcc
Compilation, analysis and optimization framework for the Scaffold quantum programming language.
Stars: ✭ 133 (-30%)
Mutual labels:  quantum-computing
Monthly Challenges
Repository containing monthly challenges about quantum computing.
Stars: ✭ 126 (-33.68%)
Mutual labels:  quantum-computing
Qucumber
Neural Network Many-Body Wavefunction Reconstruction
Stars: ✭ 152 (-20%)
Mutual labels:  quantum-computing
Quantum Nc
Microsoft Quantum Computing Libraries for noncommercial use
Stars: ✭ 126 (-33.68%)
Mutual labels:  quantum-computing
Q.js
Quantum computing in your browser.
Stars: ✭ 158 (-16.84%)
Mutual labels:  quantum-computing
Qiskit Tutorials
A collection of Jupyter notebooks showing how to use the Qiskit SDK
Stars: ✭ 1,777 (+835.26%)
Mutual labels:  quantum-computing
Discopy
a toolbox for computing with monoidal categories
Stars: ✭ 148 (-22.11%)
Mutual labels:  quantum-computing
Qml
Introductions to key concepts in quantum machine learning, as well as tutorials and implementations from cutting-edge QML research.
Stars: ✭ 174 (-8.42%)
Mutual labels:  quantum-computing
Pytket
Python module for interfacing with the CQC t|ket> library of quantum software
Stars: ✭ 162 (-14.74%)
Mutual labels:  quantum-computing
Ibmq Device Information
Information about the different remote backends available for qiskit users with a IBMQ account
Stars: ✭ 153 (-19.47%)
Mutual labels:  quantum-computing

qsim and qsimh

Quantum circuit simulators qsim and qsimh. These simulators were used for cross entropy benchmarking in [1].

[1], F. Arute et al, "Quantum Supremacy Using a Programmable Superconducting Processor", Nature 574, 505, (2019).

qsim

qsim is a Schrödinger full state-vector simulator. It computes all the 2n amplitudes of the state vector, where n is the number of qubits. Essentially, the simulator performs matrix-vector multiplications repeatedly. One matrix-vector multiplication corresponds to applying one gate. The total runtime is proportional to g2n, where g is the number of 2-qubit gates. To speed up the simulator, we use gate fusion [2] [3], single precision arithmetic, AVX/FMA instructions for vectorization and OpenMP for multi-threading.

[2] M. Smelyanskiy, N. P. Sawaya, A. Aspuru-Guzik, "qHiPSTER: The Quantum High Performance Software Testing Environment", arXiv:1601.07195 (2016).

[3] T. Häner, D. S. Steiger, "0.5 Petabyte Simulation of a 45-Qubit Quantum Circuit", arXiv:1704.01127 (2017).

qsimh

qsimh is a hybrid Schrödinger-Feynman simulator [4]. The lattice is split into two parts and the Schmidt decomposition is used to decompose 2-qubit gates on the cut. If the Schmidt rank of each gate is m and the number of gates on the cut is k then there are mk paths. To simulate a circuit with fidelity one, one needs to simulate all the mk paths and sum the results. The total runtime is proportional to (2n1 + 2n2)mk, where n1 and n2 are the qubit numbers in the first and second parts. Path simulations are independent of each other and can be trivially parallelized to run on supercomputers or in data centers. Note that one can run simulations with fidelity F < 1 just by summing over a fraction F of all the paths.

A two level checkpointing scheme is used to improve performance. Say, there are k gates on the cut. We split those into three parts: p+r+s=k, where p is the number of "prefix" gates, r is the number of "root" gates and s is the number of "suffix" gates. The first checkpoint is executed after applying all the gates up to and including the prefix gates and the second checkpoint is executed after applying all the gates up to and including the root gates. The full summation over all the paths for the root and suffix gates is performed.

If p>0 then one such simulation gives F ≈ m-p (for all the prefix gates having the same Schmidt rank m). One needs to run mp simulations with different prefix paths and sum the results to get F = 1.

[4] I. L. Markov, A. Fatima, S. V. Isakov, S. Boixo, "Quantum Supremacy Is Both Closer and Farther than It Appears", arXiv:1807.10749 (2018).

C++ Usage

The code is basically designed as a library. The user can modify sample aplications in apps to meet their own needs. The usage of sample applications is described in the docs.

Input format

The circuit input format is described in the docs.

NOTE: This format is deprecated, and no longer actively maintained.

Sample Circuits

A number of sample circuits are provided in circuits.

Unit tests

Unit tests for C++ libraries use the Google test framework, and are located in tests. Python tests use pytest, and are located in qsimcirq_tests.

To build and run all tests, navigate to the test directory and run:

make run-all

This will compile all test binaries to files with .x extensions, and run each test in series. Testing will stop early if a test fails.

To clean up generated test files, run make clean from the test directory.

Cirq Usage

Cirq is a framework for modeling and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.

To get started simulating Google Cirq circuits with qsim, see the tutorial.

More detailed information about the qsim-Cirq API can be found in the docs.

Disclaimer

This is not an officially supported Google product.

How to cite qsim

Qsim is uploaded to Zenodo automatically. Click on this badge DOI to see all the citation formats for all versions.

An equivalent BibTex format reference is below for all the versions:

@software{quantum_ai_team_and_collaborators_2020_4023103,
  author       = {Quantum AI team and collaborators},
  title        = {qsim},
  month        = Sep,
  year         = 2020,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.4023103},
  url          = {https://doi.org/10.5281/zenodo.4023103}
}
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].