From ae8abfa8335edf856f423e7a60c5bb830a79d5a7 Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 22 Sep 2024 14:24:27 +0200 Subject: Refactor and implement other gates --- libpsi-tester/src/main.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'libpsi-tester') diff --git a/libpsi-tester/src/main.rs b/libpsi-tester/src/main.rs index 5ecc2f0..f328e4d 100644 --- a/libpsi-tester/src/main.rs +++ b/libpsi-tester/src/main.rs @@ -1,10 +1 @@ -use libpsi::*; - -fn main() { - let mut register = quantum_register![qubit![(1.0, 0.0), (0.0, 0.0)]]; - let hadamard = matrix!([Complex::one(), Complex::one()]; [Complex::one(), -Complex::one()]) - .scale(complex!(1.0 / f64::sqrt(2.0), 0.0)); - println!("Before:\n{}", register[0]); - register.apply(&hadamard, 0); - println!("\nAfter H Gate:\n{}", register[0]); -} +fn main() {} -- cgit v1.3