Perform the swap operation on the qubits specified.
| C# | Visual Basic | Visual C++ |
public IQuantumRegister OperationSwap( int[] Indexes )
Public Function OperationSwap ( _ Indexes As Integer() _ ) As IQuantumRegister
public: virtual IQuantumRegister^ OperationSwap( array<int>^ Indexes ) sealed
- Indexes (array< Int32 >[]()[])
- Indexes of the qubits to swap.
A reference to this register after the operation has been applied.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown if the parameter is null. |
| IndexOutOfRangeException | Thrown if the indexes are
out of range. |
| SizeMismatchException | Thrown if 2 indexes are not
specified in the array. |
| DuplicateIndexesException | Thrown if the indexes specified
refer to the same qubit. |