Crates.io | qcgpu |
lib.rs | qcgpu |
version | 0.1.0 |
source | src |
created_at | 2018-04-04 01:13:12.241958 |
updated_at | 2018-04-04 01:13:12.241958 |
description | Open Source, High Performance & Hardware Accelerated, Quantum Computer Simulation in Rust |
homepage | https://github.com/qcgpu/qcgpu-rust |
repository | |
max_upload_size | |
id | 58878 |
size | 63,451 |
Features:
clinfo
or some other diagnostic command will run).If you wish to run the benchmarks, you must also install libquantum and qiskit.
brew install libquantum --devel
) or apt (sudo apt-get install libquantum-dev
). You should get the development version 1.1.1pip3 install qiskit
.First, add the crate to cargo.toml
[dependencies]
qcgpu = { git = "https://github.com/QCGPU/QCGPU-rust" }
Then just use the crate!
extern crate qcgpu;
fn main() {
let mut state = qcgpu::State::new(2, 0);
state.apply_gate(0, qcgpu::gates::x());
println!("Measured: {}", state.measure());
// 1
}
Running on an amazon EC2 p3.2xlarge instance, with a 25GB General Purpose SSD (GP2)
5 Qubits Single Gate Application/GPU
time: [204.39 us 214.76 us 225.98 us]
5 Qubits Single Gate Application/CPU
time: [157.85 us 160.23 us 162.47 us]
25 Qubits Single Gate Application/GPU
time: [103.50 ms 105.64 ms 108.39 ms]
25 Qubits Single Gate Application/CPU
time: [248.81 ms 249.93 ms 250.53 ms]
5 Qubits Controlled Gate Application/GPU
time: [205.55 us 209.50 us 214.34 us]
5 Qubits Controlled Gate Application/CPU
time: [158.28 us 159.56 us 161.78 us]
25 Qubits Controlled Gate Application/GPU
time: [106.13 ms 108.15 ms 110.50 ms]
25 Qubits Controlled Gate Application/CPU
time: [246.37 ms 247.91 ms 248.89 ms]
This software is licensed under the MIT licence (see LICENSE.md
)
Copyright (c) 2018 Adam Kelly