Cove - A Practical Quantum Computer Programming Framework
OperationControlledU Method (TargetOperation, ControlIndex)
NamespacesCove.BaseIQuantumRegisterOperationControlledU(IQubitOperation, Int32)
Perform the TargetOperation on all qubits except the qubit at ControlIndex if the qubit at ControlIndex is |1>. Else there is no change in the register. This arbitrary application of a single qubit operator to n qubits in a register based on a control qubit is called ControlU.
Declaration Syntax
C#Visual BasicVisual C++
IQuantumRegister OperationControlledU(
	IQubitOperation TargetOperation,
	int ControlIndex
Function OperationControlledU ( _
	TargetOperation As IQubitOperation, _
	ControlIndex As Integer _
) As IQuantumRegister
IQuantumRegister^ OperationControlledU(
	IQubitOperation^ TargetOperation, 
	int ControlIndex
TargetOperation (IQubitOperation)
The operation to apply to all qubits except the qubit at ControlIndex.
ControlIndex (Int32)
The index of the qubit that will serve as the control. If this is |1> then the TargetOperation is applied to all other qubits.
Return Value
A reference to this register after the operation has been applied.
IndexOutOfRangeExceptionThrown if ControlIndex is out of range.

Assembly: Cove.Base (Module: Cove.Base) Version: (