Perform the swap operation on the two qubits specified.
| C# | Visual Basic | Visual C++ |
public IQuantumRegister OperationSwap( int FirstSwapIndex, int SecondSwapIndex )
Public Function OperationSwap ( _ FirstSwapIndex As Integer, _ SecondSwapIndex As Integer _ ) As IQuantumRegister
public: virtual IQuantumRegister^ OperationSwap( int FirstSwapIndex, int SecondSwapIndex ) sealed
- FirstSwapIndex (Int32)
- Index of the first qubit to swap.
- SecondSwapIndex (Int32)
- Index of the second qubit to swap.
A reference to this register after the operation has been applied.
| Exception | Condition |
|---|---|
| IndexOutOfRangeException | Thrown if one of the indexes
is out of range. |
| DuplicateIndexesException | Thrown if the indexes specified
refer to the same qubit. |