Register MethodsA Sandcastle Documented Class Library

The Register type exposes the following members.

Methods

  NameDescription
Public methodCNot

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:

Public methodCPhaseShift

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:

Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGate1

Performs any arbitrary unitary operation on target qubit. The operation is described by unitary matrix of complex numbers, as follows:

Public methodGetAmplitudes

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.

Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetProbabilities
Returns probabilities of each possible state of register. It means that after measurement register remains in particular state with corresponding probability.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
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.
Public methodGetVector
Returns a vector of amplitudes of each possible state. If register is a part of other register, this method returns null (see GetAmplitudes(Register)).
Public methodHadamard

Applies the Hadamard gate to the target qubit. The unitary matrix for this operation is:

Public methodInverseCPhaseShift

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:

Public methodMeasure 
Performs measurement of whole register.
Public methodMeasure(Int32)
Performs measurement of single qubit in register. After measurement, the width of the register remains the same.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPhaseKick

Performs a phase kick (or phase shift) on the the register's state. The operation is represented by the unitary matrix:

Public methodPhaseScale

Adds a global phase on the register's state. The operation is represented by the unitary matrix:

Public methodReset
Public methodRotateX

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:

Public methodRotateY

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:

Public methodRotateZ

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:

Public methodSigmaX

Performs a Sigma X Pauli's Gate on target qubit. Actually, it is a simple Not. The unitary operation matrix is:

Public methodSigmaY

Performs a Sigma Y Pauli's Gate on target qubit. The operation is represented by unitary matrix:

Public methodSigmaZ

Performs a Sigma Z Pauli's Gate on target qubit. The operation is represented by unitary matrix:

Public methodSqrtX

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:

Public methodToffoli

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:

Public methodToString
Overrides native ToString() method, for friendly printing Register's content.
(Overrides Object ToString .)
Top
See Also