Swap the first indexes and the second indexes. Each qubit in element x of
FirstSwapIndexes will be swapped with element x of SecondSwapIndexes. Example:
A register is ordered 0, 1, 2, 3. If FirstIndexes = 0, 2 and SecondIndexes = 3, 1
then the resulting order will be 3, 1, 2, 0.

C# | Visual Basic | Visual C++ |
public List<IQuantumOperation> SwapIndexes( int[] FirstSwapIndexes, int[] SecondSwapIndexes )
Public Function SwapIndexes ( _ FirstSwapIndexes As Integer(), _ SecondSwapIndexes As Integer() _ ) As List(Of IQuantumOperation)
public: virtual List<IQuantumOperation^>^ SwapIndexes( array<int>^ FirstSwapIndexes, array<int>^ SecondSwapIndexes ) sealed

- FirstSwapIndexes (array< Int32 >[]()[])
- First set of indexes to swap.
- SecondSwapIndexes (array< Int32 >[]()[])
- Second set of indexes to swap.

The operations that perform this swap.

Exception | Condition |
---|---|
ArgumentNullException | Thrown if the arrays passed in are null. |
ArgumentException | Thrown if the indexes passed in are not
of equal length. |
DuplicateIndexesException | Thrown if any of the indexes
are duplicated. All indexes in and between the two parameters must be unique. |