From 7cc3c78a24b51a58d44e1baff20b86292662390e Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 13 Oct 2024 15:13:17 +0200 Subject: Mass refactor --- tester/src/main.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tester/src/main.rs (limited to 'tester/src/main.rs') diff --git a/tester/src/main.rs b/tester/src/main.rs new file mode 100644 index 0000000..3840c23 --- /dev/null +++ b/tester/src/main.rs @@ -0,0 +1,15 @@ +use libpsi_core::*; +use libpsi_visualizer::*; + +fn main() { + let mut circuit = QuantumCircuit::new(2, 2); + circuit.execute(Instruction::ApplyGate(&gates::HADAMARD, &[], 0)); + circuit.execute(Instruction::ApplyGate(&gates::CNOT, &[0], 1)); + circuit.execute(Instruction::ApplyGate(&gates::HADAMARD, &[], 0)); + + circuit.execute(Instruction::Measure(0)); + circuit.execute(Instruction::Measure(1)); + + HorizontalCLIVisualizer::new(&circuit).render(); + BasicRT::new(&circuit).execute(1024); +} -- cgit v1.3