Features:
- Uses OpenCL kernels
- Runs cross platform
- Simulation of arbitrary quantum algorithms
- Optional simulation of decoherence
- Optimized for maximally entangled states
- Accelerated with GPUs
- Includes Example Implementations of Grover's algorithm, the Deutsch-Jozsa algorithm, the Bernstein-Vazirani algorithm and Shors algorithm
- Implements Hadamard, Pauli and phase gates, with support for arbitrary single qubit gate creation
- Support for controlled gates along with the toffoli and swap gate
- Support for measuring a state many times quickly
Prerequisites:
- OpenCL (Ensure that an OpenCL library is installed for your platform and that
clinfo
or some other diagnostic command will run). - Rust (install here). Please use a nightly build.
If you wish to run the benchmarks, you must also install libquantum and qiskit.
- Libquantum can be installed from source, or from a package manager such as brew (
brew install libquantum --devel
) or apt (sudo apt-get install libquantum-dev
). You should get the development version 1.1.1 - Qiskit can be installed through pip
pip3 install qiskit
.
Usage
First, add the crate to cargo.toml
[]
= { = "https://github.com/QCGPU/QCGPU-rust" }
Then just use the crate!
extern crate qcgpu;
Initial Benchmarks
Running on an amazon EC2 p3.2xlarge instance, with a 25GB General Purpose SSD (GP2)
5 Qubits Single Gate Application/GPU
time:
5 Qubits Single Gate Application/CPU
time:
25 Qubits Single Gate Application/GPU
time:
25 Qubits Single Gate Application/CPU
time:
5 Qubits Controlled Gate Application/GPU
time:
5 Qubits Controlled Gate Application/CPU
time:
25 Qubits Controlled Gate Application/GPU
time:
25 Qubits Controlled Gate Application/CPU
time:
License
This software is licensed under the MIT licence (see LICENSE.md
)
Copyright (c) 2018 Adam Kelly