Returns a slice (subset) of the quantum register containing the qubits
specified in Indexes, and in that order. The specified operations are
then applied.
| C# | Visual Basic | Visual C++ |
public IQuantumRegister SliceSubset( IEnumerable<int> Indexes, IEnumerable<IQuantumOperation> Operations )
Public Function SliceSubset ( _ Indexes As IEnumerable(Of Integer), _ Operations As IEnumerable(Of IQuantumOperation) _ ) As IQuantumRegister
public: virtual IQuantumRegister^ SliceSubset( IEnumerable<int>^ Indexes, IEnumerable<IQuantumOperation^>^ Operations ) sealed
- Indexes (IEnumerable<(Of <(Int32>)>))
- The indexes of the qubits in the register being returned.
- Operations (IEnumerable<(Of <(IQuantumOperation>)>))
- The operations to apply to the slice.
The quantum register representing the subset.
| Exception | Condition |
|---|---|
| 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. |
| 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. |