Qvass is a Rust library for building and running quantum circuit simulations, designed to be fast and simple. To ensure correctness, its results are tested against Qiskit.
Example
This example creates a 3-qubit GHZ state ((|000⟩ + |111⟩)/√2), a famous example of quantum entanglement.
use ;
use ;
More examples can be found in the examples folder in the root of this repository.
To run a specific example, use the command: cargo run --example <example_name>.
Features
- Build Complex Gates and Circuits: Easily combine simple gates and circuits to create complex ones. This lets you create reusable components, like the included Quantum Fourier Transform (QFT).
- Fast Simulation: The simulator is optimized for speed, especially for circuits with many controlled gates.
- Correctness First: All gate operations are tested against Qiskit.
- no_std Compatible: Usable in environments without the standard library, like embedded systems and WebAssembly.
Project Folders Structure
- 📁
src: The core Rust library code. - 📁
scripts: Python scripts used to test the simulator against Qiskit. - 📁
examples: Standalone example programs showing how to use the library.
License
Licensed under either of Apache License, Version 2.0 (LICENSE-APACHE) or MIT license (LICENSE-MIT) at your option.