GatesExtension CPhaseShift Method A Sandcastle Documented Class Library

Performs a conditional phase kick (or phase shift) on the registers' state by the angle PI / 2 ^ dist. The operation is represented by the unitary matrix:

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

public static void CPhaseShift(
	this QuantumComputer comp,
	int dist,
	RegisterRef target,
	params RegisterRef[] controls
)

Parameters

comp
Type: Quantum QuantumComputer
The QuantumComputer instance.
dist
Type: System Int32
Value of k in the angle of phase shift. The angle equals: PI / 2 ^ k.
target
Type: Quantum RegisterRef
The reference to target qubit.
controls
Type:  Quantum RegisterRef 
The references to control qubits. If there is no control qubit given, the gate is run unconditionally.

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