QuantumComputer may have zero to many Registers, but at least one is required to perform quantum computations. Register consist of qubits, which are targets for quantum gates. To apply a quantum gate, use methods of Register class (for computation on its qubits) or extension methods of QuantumComputer class (for computation on qubits in different registers; see Quantum.Operations).
Register is not an independent class. It could be created and deleted only by QuantumComputer.
Assembly: Quantum (in Quantum.dll) Version: 126.96.36.199 (188.8.131.52)
Thetype exposes the following members.
Performs a controlled not operation (C-NOT Gate). The target bit gets inverted if the control bit is enabled. The operation can be written as the unitary operation matrix:
Performs a conditional phase kick (or phase shift) on the register's state by the angle PI / 2 ^ dist. The operation is represented by the unitary matrix:
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Performs any arbitrary unitary operation on target qubit. The operation is described by unitary matrix of complex numbers, as follows:
Returns amplitudes of each possible state of register. Amplitude is a complex number, which squared magnitude is the probability of the state.
If register is entangled, the amplitudes cannot be computed. Thus, the method GetAmplitudes() returns null for such registers. The method returns meaningful value, if register is RootRegister, or if it was not a part of multi-register operations (see Quantum.Operations). Even if the register is not entangled with any other, but was used in multi-register operation, the returned value is null because such operation connect participating registers into one RootRegister.
Serves as a hash function for a particular type.(Inherited from Object.)
Returns probabilities of each possible state of register. It means that after measurement register remains in particular state with corresponding probability.
Gets the Type of the current instance.(Inherited from Object.)
Returns the integer value stored in register, if there is only one possibility. If the register is a superposition of multiple states, the method returns null.
Returns a vector of amplitudes of each possible state. If register is a part of other register, this method returns null (see).
Applies the Hadamard gate to the target qubit. The unitary matrix for this operation is:
Performs a inversed conditional phase kick (or phase shift) on the register's state by the angle PI / 2 ^ dist. The operation is represented by the unitary matrix:
Performs measurement of whole register.
Performs measurement of single qubit in register. After measurement, the width of the register remains the same.
Creates a shallow copy of the current Object.(Inherited from Object.)
Performs a phase kick (or phase shift) on the the register's state. The operation is represented by the unitary matrix:
Adds a global phase on the register's state. The operation is represented by the unitary matrix:
Performs a rotation of the target qubit about the x-axis of the Bloch sphere. The angle of rotation is given in first argument (double gamma). The unitary matrix of this operation is:
Performs a rotation of the target qubit about the y-axis of the Bloch sphere. The angle of rotation is given in first argument (double gamma). The operation is represented by the unitary matrix:
Performs a rotation of the target qubit about the z-axis of the Bloch sphere. The angle of rotation is given in first argument (double gamma). The operation is represented by the unitary matrix:
Performs a Sigma X Pauli's Gate on target qubit. Actually, it is a simple Not. The unitary operation matrix is:
Performs a Sigma Y Pauli's Gate on target qubit. The operation is represented by unitary matrix:
Performs a Sigma Z Pauli's Gate on target qubit. The operation is represented by unitary matrix:
Performs the Square Root of Not on the target qubit. The Square Root of Not Gate is such a gate, that applied twice, performs Not operation. The operation can be represented as the unitary matrix:
Applies Toffoli gate. If all of the control bits are enabled, the target bit gets inverted. This gate with more than two control bits is not considered elementary and is not available on all physical realizations of a quantum computer. Toffoli gate with two control bits can be represented by unitary matrix:
Overrides native ToString() method, for friendly printing Register's content.(Overrides Object ToString .)
|(Register to RegisterRef)|
For completeness. The Register could be implicitly casted to the reference to its first qubit. Like in arrays, where an address of an array is also the address of its first element.
Returns reference to single qubit in register.
|Item Int32, Int32|
Returns a sub-register, which begins at given offset and has given width.
Right after creation, register is independent and its OffsetToRoot equals 0. But after operations on many registers, included this, Register could be entangled with others and is no longer independent. The group of entangled registers has its RootRegister. Each register in such group is de facto a part of the Root. OffsetToRoot describes offset (from Least Significant Bit, which offset is 0) of the part in RootRegister.
The number of qubits contained in Register.