GatesExtension Gate1 Method A Sandcastle Documented Class Library

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

Namespace: Quantum.Operations
Assembly: Quantum (in Quantum.dll) Version: (

public static void Gate1(
	this QuantumComputer comp,
	Complex[,] matrix,
	RegisterRef target,
	Nullable<RegisterRef> control = null


Type: Quantum QuantumComputer
The QuantumComputer instance.
Type:  Complex 
The 2x2 matrix of complex numbers, which describes the unitary operation.
Type: Quantum RegisterRef
The reference to target qubit.
control (Optional)
Type: System Nullable RegisterRef 
Optional argument. If given, the method performs controlled gate operation. Destribes the reference to control qubit.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type QuantumComputer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also