Class Gates::PhaseRotation
In: rquantum.rb
Parent: Object

Phase rotation - it‘s phase shifter gate with phase shift = arccos(3/5)

 q = Qubit.new
 q.not
 g = Gates::PhaseRotation
 q.to_vector                # -> Vector[Complex(0, 0), Complex(1, 0)]
 g.compute q.to_vector      # -> Vector[Complex(0, 0), Complex(-0.902685361933071, -0.430301217000092)]

Methods

compute   new  

Public Class methods

Public Instance methods

Takes vector with two complex numbers (amplitudes), perform phase rotation operation and returns new vector.

[Validate]