quantum Build Status License

Advanced Rust quantum computer simulator.

Motivation

Quantum is a quantum computer simulator written with the following design goals in mind:

1) Utility: we can simulate a 5-qubit register, enough to run interesting algorithms.

2) Efficiency: we implement all important operations from scratch using primitives

3) Educational Value: the documentation is a prose description of how to implement a quantum computer in Rust.

4) Correctness: it's entirely written in safe Rust with well-defined states.

A good place to start reading the theory behind this is the Wikipedia article, and you can follow the documentation for our implementations of

gates kets

.

Usage

Add quantum dependency to Cargo.toml.

```rust use computer::QuantumComputer; use gates;

let mut c = QuantumComputer::new(3); c.initialize(5); c.apply(gates::identity(3)); c.collapse();

assert_eq!(5, c.value()); ```

Contributing