Module | Gates |
In: |
rquantum.rb
|
Module contains classes that simulates basic quantum gates and the matrices that representing these gates. Each class which simulate quantum gate has to have compute method which takes one parameter - vector with two complex numbers - two qubit amplitudes. If some gate needs additional parameters, then the initialize method takes them, and PARAMS constant is set to true. Parameters has to been passed in array.
These classes are used to generating methods operating on Qubit class and QuantumReg class - methods have the same names as classes, but underscored (so not PauliY but pauli_y).