SliceReorder Method (NewIndexes)
Cove - A Practical Quantum Computer Programming Framework
SliceReorder Method (NewIndexes)
NamespacesCove.BaseIQuantumRegisterSliceReorder(IEnumerable<(Of <(Int32>)>))
Reorder the qubits in any arbitrary order. NewIndexes is an array of integers that must equal the length of this register. The qubit at each index in that array will be moved to the value in the array. Example: the register this is called on contains 3 qubits, indexed 0 - 2. If the array {2, 0, 1} is passed then: the qubit at index 0 will be moved to index 2; the qubit at index 1 will be moved to index 0; the qubit at index 2 will be moved to index 1.
Declaration Syntax
C#Visual BasicVisual C++
IQuantumRegister SliceReorder(
	IEnumerable<int> NewIndexes
Function SliceReorder ( _
	NewIndexes As IEnumerable(Of Integer) _
) As IQuantumRegister
IQuantumRegister^ SliceReorder(
	IEnumerable<int>^ NewIndexes
NewIndexes (IEnumerable<(Of <(Int32>)>))
The array of new
Return Value
A reference to a register with the reordering performed.
SizeMismatchExceptionThrown if the length of NewIndexes does not match the length of this register.
ArgumentOutOfRangeExceptionThrown if invalid indexes are specified in NewIndexes
DuplicateIndexesExceptionThrown if the same index is specified more than once in NewIndexes. Example: the NewIndexes is {1, 0, 1} this will be thrown because 1 is specified twice.

Assembly: Cove.Base (Module: Cove.Base) Version: (