Perform the Toffoli (controlled controlled not) operation to the register.
Declaration Syntax
C# | Visual Basic | Visual C++ |
IQuantumRegister OperationToffoli( int[] Indexes )
Function OperationToffoli ( _ Indexes As Integer() _ ) As IQuantumRegister
IQuantumRegister^ OperationToffoli( array<int>^ Indexes )
Parameters
- Indexes (array< Int32 >[]()[])
- The indexes of the qubits that the operation applies to. The first two indexes are the control and the third is the target.
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. |
SizeMismatchException | Thrown if there are not three
elements in the Indexes array. |
DuplicateIndexesException | Thrown if the indexes specified
refer to the same qubit. |