Returns a slice (subset) of the quantum register, but the ordering of the
qubits in the returned register are reversed then have the specified operation
applied.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public IQuantumRegister SliceReverse( int StartIndex, int StopIndex, IQuantumOperation Operation )
Public Function SliceReverse ( _ StartIndex As Integer, _ StopIndex As Integer, _ Operation As IQuantumOperation _ ) As IQuantumRegister
public: virtual IQuantumRegister^ SliceReverse( int StartIndex, int StopIndex, IQuantumOperation^ Operation ) sealed
Parameters
- StartIndex (Int32)
- Starting index in the register to get the slice of.
- StopIndex (Int32)
- Ending index in the register to get the slice of.
- Operation (IQuantumOperation)
- The operation to apply to the slice.
Return Value
The quantum register representing the slice with the operation
applied.
Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | Thrown if the start or stop index parameters
are out of range. |
ArgumentOutOfRangeException | Thrown if the stop index is less
than the start index. |
NotUnitaryOperationException | Thrown if a non-unitary operation is
passed. All quantum operations must be unitary. |
SizeMismatchException | Thrown if the size of one of the operations
does not match the size of the register. |
ArgumentException | Thrown if the operation does not have
AbstractSimulatedQuantumOperation as a base class. |