Returns a slice (subset) of the quantum register.
| C# | Visual Basic | Visual C++ |
public IQuantumRegister Slice( int StartIndex, int StopIndex )
Public Function Slice ( _ StartIndex As Integer, _ StopIndex As Integer _ ) As IQuantumRegister
public: virtual IQuantumRegister^ Slice( int StartIndex, int StopIndex ) sealed
- StartIndex (Int32)
- Starting index in the register to get the slice of.
- StopIndex (Int32)
- Ending index in the register to get the slice of.
A quantum register representing the slice.
| 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. |