| Crates.io | quantsim_core |
| lib.rs | quantsim_core |
| version | 0.2.0 |
| created_at | 2025-09-21 20:51:28.52933+00 |
| updated_at | 2025-09-21 22:30:35.532628+00 |
| description | A quantum circuit simulator |
| homepage | |
| repository | https://github.com/benschneider/quantum_algorithm_simulator |
| max_upload_size | |
| id | 1849184 |
| size | 140,114 |
A pure Rust library for quantum circuit simulation. This crate provides the core simulation engine for quantum computing, designed to be portable and reusable without any UI dependencies.
Add this to your Cargo.toml:
[dependencies]
quantsim_core = "0.1.0"
use quantsim_core::{Circuit, Engine, GateRegistry};
let mut registry = GateRegistry::new();
registry.register_standard_gates();
// Create a Bell state circuit
let mut circuit = Circuit::new(2);
circuit.add_gate("H", &[0]).unwrap();
circuit.add_gate("CX", &[0, 1]).unwrap();
// Simulate
let mut engine = Engine::new();
let result = engine.run(&circuit, None).unwrap();
println!("Final state: {:?}", result.final_state);
use quantsim_core::circuits;
let bell_circuit = circuits::load_template("bell").unwrap();
The library is organized into several key modules:
circuit: Quantum circuit representation and manipulationengine: Simulation execution enginegates: Gate definitions and registry systemtypes: Core data types and representationscircuits: Built-in circuit templatesLicensed under either of
at your option.