Returns a slice (subset) of the quantum register containing the qubits
specified in Indexes, and in that order.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public IQuantumRegister SliceSubset( IEnumerable<int> Indexes )
Public Function SliceSubset ( _ Indexes As IEnumerable(Of Integer) _ ) As IQuantumRegister
public: virtual IQuantumRegister^ SliceSubset( IEnumerable<int>^ Indexes ) sealed
Parameters
- Indexes (IEnumerable<(Of <(Int32>)>))
- The indexes of the qubits in the register being returned.
Return Value
The quantum register representing the subset.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown if a null array is passed. |
IndexOutOfRangeException | Thrown if any of the indexes specified are
outside of the allowable range. |
DuplicateIndexesException | Thrown if the same index is specified more than
once. |