Returns the operations to perform the negated CNot. The normal CNot operation flips
the target qubit when the control is 1, otherwise no change is made. This (the negated)
flips the target when the control is 0 instead of 1.
Declaration Syntax
C# | Visual Basic | Visual C++ |
List<IQuantumOperation> NegatedCNot( int ControlIndex, int TargetIndex )
Function NegatedCNot ( _ ControlIndex As Integer, _ TargetIndex As Integer _ ) As List(Of IQuantumOperation)
List<IQuantumOperation^>^ NegatedCNot( int ControlIndex, int TargetIndex )
Parameters
- ControlIndex (Int32)
- Index of the control qubit.
- TargetIndex (Int32)
- Index of the target qubit.
Return Value
The operations to performt he negated CNot.
Exceptions
Exception | Condition |
---|---|
DuplicateIndexesException | Thrown if the control
and target indexes are the same. |
ArgumentOutOfRangeException | Thrown if either parameter
is less than 0. |