diff options
| author | hachem <im@hachem.wtf> | 2024-10-12 16:56:12 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2024-10-12 16:56:12 +0200 |
| commit | 483e9e6ce9fbb1440992e916ec743ce0eff0ab5a (patch) | |
| tree | e312bd5be2318c2570d7b42550eaf184deb8c965 /examples/simple_gates | |
| parent | c643b1535ffb106cf582763804bce655e3fb116c (diff) | |
Simplify and start rework of gate application
Diffstat (limited to 'examples/simple_gates')
| -rw-r--r-- | examples/simple_gates/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/simple_gates/src/main.rs b/examples/simple_gates/src/main.rs index 5c529a6..f48c935 100644 --- a/examples/simple_gates/src/main.rs +++ b/examples/simple_gates/src/main.rs @@ -2,9 +2,9 @@ use libpsi_core::*; fn main() { let mut circuit = QuantumCircuit::new(2, 2); - circuit.apply(&gates::HADAMARD, &[], &[0]); - circuit.apply(&gates::CNOT, &[0], &[1]); + circuit.apply(&gates::HADAMARD, &[], 0); + circuit.apply(&gates::CNOT, &[0], 1); let runtime = BasicRT::new(&circuit); - runtime.execute(1024); + runtime.execute(1); } |
