Class | Gates::Not |
In: |
rquantum.rb
|
Parent: | Object |
Reverse amplitudes of qubit.
q = Qubit.new q.reset g = Gates::Not.new q.to_vector # -> Vector[Complex(1, 0), Complex(0, 0)] g.compute q.to_vector # -> Vector[Complex(0, 0), Complex(1, 0)]
Takes vector with two complex numbers (amplitudes), perform Not operation and returns new vector.