extern crate qcgpu; use qcgpu::State; fn main() { // Create a 2 qubit register on the OpenCL Device #1 let mut state = State::new(2, 1); // Apply a Hadamard Gate to the 1st qubit state.h(0); // Zero Indexed // Apply a CNOT gate, with the control as the 1st qubit, and target as the 2nd state.cx(0, 1); // Measure 1000 times and print the results println!("Measured: {:?}", state.measure_many(1000)); }