Apply the CNot operation to the register. (Must be a 2 qubit register.)
The first qubit is the control and the second is the target.
Declaration Syntax
C# | Visual Basic | Visual C++ |
IQuantumRegister OperationCNot( int[] Indexes )
Function OperationCNot ( _ Indexes As Integer() _ ) As IQuantumRegister
IQuantumRegister^ OperationCNot( array<int>^ Indexes )
Parameters
- Indexes (array< Int32 >[]()[])
[Missing <param> documentation for "Indexes"]
Return Value
A reference to this register after the operation has been applied.
Exceptions
Exception | Condition |
---|---|
SizeMismatchException | Thrown if the number of qubits
the operation applies to does not match the number of qubits in the
register. |
IndexOutOfRangeException | Thrown if the indexes
are invalid for this register. |
DuplicateIndexesException | Thrown if the control and
target qubits are the same. |