Returns a slice (subset) of the register from StartIndex to the end, then has
the operations applied to it.
Declaration Syntax
C# | Visual Basic | Visual C++ |
IQuantumRegister SliceFrom( int StartIndex, IEnumerable<IQuantumOperation> Operations )
Function SliceFrom ( _ StartIndex As Integer, _ Operations As IEnumerable(Of IQuantumOperation) _ ) As IQuantumRegister
IQuantumRegister^ SliceFrom( int StartIndex, IEnumerable<IQuantumOperation^>^ Operations )
Parameters
- StartIndex (Int32)
- Starting index in the register to get the slice of.
- Operations (IEnumerable<(Of <(IQuantumOperation>)>))
- The operations to apply to the slice.
Return Value
The quantum register representing the slice with the operation then applied.
Exceptions
Exception | Condition |
---|---|
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. |