| Crates.io | quantsim |
| lib.rs | quantsim |
| version | 0.2.0 |
| created_at | 2025-09-21 21:32:00.948568+00 |
| updated_at | 2025-09-21 22:34:37.587957+00 |
| description | A quantum circuit simulator ecosystem |
| homepage | |
| repository | https://github.com/benschneider/quantum_algorithm_simulator |
| max_upload_size | |
| id | 1849221 |
| size | 123,247 |
A quantum circuit simulator ecosystem providing both a core simulation library and a web-based graphical user interface.
Install and run the interactive simulator:
cargo install quantsim_ui
quantsim_ui
Or try the live web demo!
This crate serves as the main entry point for the quantsim ecosystem, which consists of three components:
eguicargo install quantsim
This installs the interactive simulator that you can run with:
quantsim
Add to your Cargo.toml:
[dependencies]
quantsim = "0.1.0"
cargo install quantsim
quantsim
This launches a web-based interface where you can:
use quantsim::core::*;
// Create and simulate a quantum circuit
let mut circuit = Circuit::new(2);
circuit.add_gate("H", &[0]).unwrap();
circuit.add_gate("CX", &[0, 1]).unwrap();
let engine = Engine::new();
let result = engine.run(&circuit, None).unwrap();
println!("Final state: {:?}", result.final_state);
When targeting WASM, you can also access the UI components:
#[cfg(target_arch = "wasm32")]
use quantsim::ui;
// UI components available for custom web applications
use quantsim::core::*;
let mut circuit = Circuit::new(2);
circuit.add_gate("H", &[0])?; // Hadamard on qubit 0
circuit.add_gate("CX", &[0, 1])?; // CNOT gate
let result = Engine::new().run(&circuit, None)?;
println!("Entangled state: {:?}", result.final_state);
use quantsim::core::circuits;
let grover_circuit = circuits::load_template("grover")?;
let result = Engine::new().run(&grover_circuit, None)?;
See the main repository for contribution guidelines.
Licensed under either of
at your option.