Cove - A Practical Quantum Computer Programming Framework
SwapIndexes Method (FirstSwapIndexes, SecondSwapIndexes)
NamespacesCove.LocalSimulationQuantumAlgorithmsSwapIndexes(array<Int32>[]()[], array<Int32>[]()[])
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.
Declaration Syntax
C#Visual BasicVisual 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
Parameters
FirstSwapIndexes (array< Int32 >[]()[])
First set of indexes to swap.
SecondSwapIndexes (array< Int32 >[]()[])
Second set of indexes to swap.
Return Value
The operations that perform this swap.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if the arrays passed in are null.
ArgumentExceptionThrown if the indexes passed in are not of equal length.
DuplicateIndexesExceptionThrown if any of the indexes are duplicated. All indexes in and between the two parameters must be unique.

Assembly: Cove.LocalSimulation (Module: Cove.LocalSimulation) Version: 1.0.0.0 (1.0.0.0)