Perform the TargetOperation on the qubits at TargetIndexes if ControlIndex is |1>.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public IQuantumRegister OperationControlledU( IQubitOperation TargetOperation, int ControlIndex, int[] TargetIndexes )
Public Function OperationControlledU ( _ TargetOperation As IQubitOperation, _ ControlIndex As Integer, _ TargetIndexes As Integer() _ ) As IQuantumRegister
public: virtual IQuantumRegister^ OperationControlledU( IQubitOperation^ TargetOperation, int ControlIndex, array<int>^ TargetIndexes ) sealed
Parameters
- TargetOperation (IQubitOperation)
- The operation to apply to the target qubits.
- ControlIndex (Int32)
- Index of the control qubit.
- TargetIndexes (array< Int32 >[]()[])
- Indexes of the target qubits
Return Value
A reference to this register after the operation has been applied.
Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | Thrown if any of the indexes are
out of range. |
DuplicateIndexesException | Thrown if the same qubit
is specified as control and target. |
NotImplementedException | This method is not yet
implemented. |