Files
quantum-bridge-mcp/vendor/spinoza/examples/unitaries.rs
T
Vincent Bourdon 9af114e391 Initial import
2026-06-09 16:14:55 +02:00

17 lines
400 B
Rust

use spinoza::{
core::State,
gates::Gate,
unitaries::{apply_unitary, Unitary},
};
fn main() {
let n = 16;
let state = State::new(n);
let u = Unitary::from_single_qubit_gate(&state, Gate::U(1.0, 2.0, 3.0), 0);
let now = std::time::Instant::now();
let _s = apply_unitary(&state, &u);
let elapsed = now.elapsed().as_micros();
println!("{elapsed} us elapsed");
}