All Projects → Krastanov → QuantumClifford.jl

Krastanov / QuantumClifford.jl

Licence: GPL-3.0 license
Clifford circuits, graph states, and other quantum Stabilizer formalism tools.

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to QuantumClifford.jl

launchpad
Resources to get started in Quantum Computing!
Stars: ✭ 21 (-56.25%)
Mutual labels:  quantum-computing, qubits
qsel
Quantum programming language putting entanglement and superposition front and center
Stars: ✭ 37 (-22.92%)
Mutual labels:  quantum-computing, qubits
Quantum-Computer-Simulator-with-Algorithms
C++ simulator of quantum registers and quantum algorithms
Stars: ✭ 15 (-68.75%)
Mutual labels:  quantum-computing, qubits
qcec
MQT QCEC - A tool for Quantum Circuit Equivalence Checking
Stars: ✭ 64 (+33.33%)
Mutual labels:  quantum-computing, quantum-circuits
Cirq
A python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Stars: ✭ 3,115 (+6389.58%)
Mutual labels:  quantum-computing, quantum-circuits
miniqubit
Quantum emulator of the IBM Quantum experience
Stars: ✭ 24 (-50%)
Mutual labels:  quantum-computing, entanglement
ddsim
MQT DDSIM - A quantum circuit simulator based on decision diagrams written in C++
Stars: ✭ 45 (-6.25%)
Mutual labels:  quantum-computing, quantum-circuits
Quantum-Computing-Collection-Of-Resources
A Well Maintained Repository On Quantum Computing Resources [Code+Theory] Updated Regularly During My Time At IBM, Qubit x Qubit And The Coding School's Introduction To Quantum Computing Course '21
Stars: ✭ 183 (+281.25%)
Mutual labels:  quantum-computing, qubits
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 (+3941.67%)
Mutual labels:  quantum-computing, qubits
UniversalQCompiler
Synthesizing arbitrary quantum computations
Stars: ✭ 53 (+10.42%)
Mutual labels:  quantum-computing, quantum-circuits
cirq-on-iqm
Cirq adapter for IQM's quantum computers
Stars: ✭ 21 (-56.25%)
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 (-41.67%)
Mutual labels:  quantum-computing
qubovert
The one-stop package for formulating, simulating, and solving problems in boolean and spin form
Stars: ✭ 19 (-60.42%)
Mutual labels:  quantum-computing
quantumjava
Samples related to "Quantum Computing for Java Developers"
Stars: ✭ 86 (+79.17%)
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 (-62.5%)
Mutual labels:  quantum-computing
cusp cirq demo
Demonstration of CUSP algorithm using Cirq
Stars: ✭ 35 (-27.08%)
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 (-60.42%)
Mutual labels:  quantum-computing
qcl
Quantum Computation Language port from http://tph.tuwien.ac.at/~oemer/qcl.html
Stars: ✭ 29 (-39.58%)
Mutual labels:  quantum-computing
qram
Library for Q# implementing various qRAM proposals
Stars: ✭ 46 (-4.17%)
Mutual labels:  quantum-computing
Quantum-Computing-Resources
This repository contains the best resources for learning practical quantum computing. This repository will be updated frequently.
Stars: ✭ 60 (+25%)
Mutual labels:  quantum-computing

QuantumClifford.jl

Documentation Documentation of latest stable version Documentation of dev version
Continuous integration GitHub Workflow Status PkgEval status
Code coverage Test coverage from codecov
Static analysis with JET static analysis Aqua QA

A Julia package for working with quantum stabilizer states and Clifford circuits that act on them. Graphs states are also supported. The package is already very fast for the majority of common operations, but there are still many low-hanging fruits performance-wise. See the detailed suggested readings & references page for background on the various algorithms.

To install it use:

] add QuantumClifford

Works efficiently with pure and mixed stabilizer states of thousands of qubits as well as sparse or dense Clifford operations acting upon them.

Provides canonicalization, projection, and generation operations, as well as partial traces.

julia> P"X" * P"Z"
-iY

julia> P"X" ⊗ P"Z"
+ XZ

julia> S"-XX
         +ZZ"
- XX
+ ZZ

julia> tCNOT * S"-XX
                 +ZZ"
- X_
+ _Z

The code is vectorized and multithreaded.

Fast, in-place, allocation free implementations.

Quick Benchmarks (click to expand)

Comparison against other Clifford simulators

The only other simulator of similar performance I know of is Stim. In particular, Stim implements convenient tracking of Pauli frames, that makes simulating the performance of error correcting codes blazingly fast (which are possible in QuantumClifford.jl, but no convenient interface is provided for that yet).

The "low level" functionality is of similar performance in Stim and QuantumClifford but different tradeoffs are made at the higher levels: to multiply in-place 1M-qubit Pauli operators Stim needs 16μs while QuantumClifford.jl needs 14μs. The difference is inconsequential and depends on compilers and hardware.

Of note is that Stim achieved this performance through high-quality C++ SIMD code of significant sophistication, while QuantumClifford.jl is implemented in pure Julia.

Multiplying two 1 gigaqubit Paulis in 32 ms

julia> a = random_pauli(1_000_000_000);
julia> b = random_pauli(1_000_000_000);
julia> @benchmark QuantumClifford.mul_left!(a,b)
BenchmarkTools.Trial: 155 samples with 1 evaluation.
 Range (min … max):  32.074 ms … 32.425 ms  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     32.246 ms              ┊ GC (median):    0.00%
 Time  (mean ± σ):   32.247 ms ± 63.427 μs  ┊ GC (mean ± σ):  0.00% ± 0.00%

                  ▃  ▃▃ ▄ ▆▄▄▄██▃ ▃▄▁▆█▃▃ ▃      ▁             
  ▄▁▁▄▁▁▄▆▁▁▄▆▄▆▇▇█▄▄██▄█▆███████▇███████▆█▆▄▄▄▁▄█▁▄▄▁▄▁▁▁▁▁▄ ▄
  32.1 ms         Histogram: frequency by time        32.4 ms <

 Memory estimate: 0 bytes, allocs estimate: 0.

Canonicalization of a random 1000-qubit stabilizer in 22 ms

julia> @benchmark canonicalize!(s) setup=(s=random_stabilizer(1000))
BenchmarkTools.Trial: 226 samples with 1 evaluation.
 Range (min … max):  21.938 ms …  22.680 ms  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     22.025 ms               ┊ GC (median):    0.00%
 Time  (mean ± σ):   22.057 ms ± 115.247 μs  ┊ GC (mean ± σ):  0.00% ± 0.00%

    ▂▂ █▃▃▂                                                     
  ▄▇███████▆▇▆█▆▄▄▄▄▄▅▄▃▃▁▄▃▃▃▃▃▃▁▁▁▁▁▃▁▁▁▁▁▃▁▃▁▁▁▁▃▁▁▁▁▁▁▁▁▃▃ ▃
  21.9 ms         Histogram: frequency by time         22.6 ms <

 Memory estimate: 32 bytes, allocs estimate: 1.

Gate application (500 CNOT gates on 1000 qubits) in 7 ms

julia> @benchmark apply!(s, gate) setup=(s=random_stabilizer(1000); gate=tensor_pow(tCNOT,500))
BenchmarkTools.Trial: 564 samples with 1 evaluation.
 Range (min … max):  6.602 ms … 17.719 ms  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     8.411 ms              ┊ GC (median):    0.00%
 Time  (mean ± σ):   8.865 ms ±  1.836 ms  ┊ GC (mean ± σ):  0.00% ± 0.00%

  ▂             ▁                    █                        
  ██▆▆▆▄▅▃▄▄▄▄▅▇█▇▆▄▅▃▄▃▃▃▃▃▃▁▂▂▃▁▃▃██▃▂▃▂▂▂▂▂▂▂▂▁▃▃▃▁▂▂▂▂▂▂ ▃
  6.6 ms         Histogram: frequency by time        13.7 ms <

 Memory estimate: 13.84 KiB, allocs estimate: 111.

Sparse gate application to only specified qubits in a 1000 qubit tableau in 4 μs

julia> @benchmark apply!(s, sCNOT(32,504)) setup=(s=random_stabilizer(1000))
BenchmarkTools.Trial: 10000 samples with 9 evaluations.
 Range (min … max):  3.373 μs … 252.630 μs  ┊ GC (min … max): 0.00% … 53.27%
 Time  (median):     3.766 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   3.892 μs ±   2.525 μs  ┊ GC (mean ± σ):  0.35% ±  0.53%

        ▃▆█▅▁                                                  
  ▁▁▁▂▃▇█████▅▃▂▂▃▃▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  3.37 μs         Histogram: frequency by time        6.07 μs <

 Memory estimate: 96 bytes, allocs estimate: 2.

Measuring a dense 1000 qubit Pauli operator in 74 μs

julia> s=random_destabilizer(1000); p=random_pauli(1000);

julia> @benchmark project!(_s,_p) setup=(_s=copy(s);_p=copy(p)) evals=1
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  69.030 μs … 144.963 μs  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     73.799 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   73.639 μs ±   4.118 μs  ┊ GC (mean ± σ):  0.00% ± 0.00%

    ▂           ▁█▁                                             
  ▃██▆▄▃▃▃▄▆▅▄▃▃███▃▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
  69 μs           Histogram: frequency by time         92.8 μs <

 Memory estimate: 480 bytes, allocs estimate: 4.

Measuring a single qubit in a 1000 qubit tableau in 50 μs

julia> s=MixedDestabilizer(random_destabilizer(1000));

julia> @benchmark projectY!(_s,42) setup=(_s=copy(s)) evals=1
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  46.928 μs … 88.046 μs  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     49.934 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   49.776 μs ±  2.623 μs  ┊ GC (mean ± σ):  0.00% ± 0.00%

     ▁      ▄█▂                                                
  ▂▂▆██▄▄▄▄▆███▅▃▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▁▂ ▃
  46.9 μs         Histogram: frequency by time        63.8 μs <

 Memory estimate: 464 bytes, allocs estimate: 5.

Benchmarks executed on a Ryzen Zen1 8-core CPU.

More detailed benchmarks can be seen at github.com/Krastanov/QuantumCliffordBenchmarksLog.

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].