Apply the CNot operation to the register.
| C# | Visual Basic | Visual C++ |
IQuantumRegister OperationCNot( int ControlIndex, int TargetIndex )
Function OperationCNot ( _ ControlIndex As Integer, _ TargetIndex As Integer _ ) As IQuantumRegister
IQuantumRegister^ OperationCNot( int ControlIndex, int TargetIndex )
- ControlIndex (Int32)
- Index of the qubit which will be the control.
- TargetIndex (Int32)
- Index of the qubit which will be the target.
A reference to this register after the operation has been applied.
| Exception | Condition |
|---|---|
| IndexOutOfRangeException | Thrown if either of the indexes
are invalid for this register. |
| DuplicateIndexesException | Thrown if the ControlIndex and
TargetIndex specify the same qubit. |