Quantum Computing, Quantum Computer, Simulator, From Scratch.
puts it into a superposition state. Let’s see examples of both. ;; X |0> == |1> (gX q0) ; ==> (array #[#[0] #[1]]) ;; X |1> == |0> (gX (qubit 0 1)) ; ==> (array #[#[1] #[0]]) ;; X X |0> == |0> (gX (gX q0)) ; ==> (array #[#[1] #[0]]) ;; H |0> == equally likely superposition (gH q0) ; ==> (array