Cove - A Practical Quantum Computer Programming Framework
Slice Method (StartIndex, StopIndex, Operations)
NamespacesCove.BaseIQuantumRegisterSlice(Int32, Int32, IEnumerable<(Of <(IQuantumOperation>)>))
Slice (subset) a quantum register and perform operations on the slice.
Declaration Syntax
C#Visual BasicVisual C++
IQuantumRegister Slice(
	int StartIndex,
	int StopIndex,
	IEnumerable<IQuantumOperation> Operations
)
Function Slice ( _
	StartIndex As Integer, _
	StopIndex As Integer, _
	Operations As IEnumerable(Of IQuantumOperation) _
) As IQuantumRegister
IQuantumRegister^ Slice(
	int StartIndex, 
	int StopIndex, 
	IEnumerable<IQuantumOperation^>^ Operations
)
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.
Operations (IEnumerable<(Of <(IQuantumOperation>)>))
The operation sto apply to the slice.
Return Value
A quantum register representing the slice with the operations applied.
Exceptions
ExceptionCondition
SizeMismatchExceptionThrown if the number of qubits any of the operations operates on does not match the size of the slice.
IndexOutOfRangeExceptionThrown if the start or stop index parameters are out of range.
ArgumentOutOfRangeExceptionThrown if the stop index is less than the start index.
NotUnitaryOperationExceptionThrown if a non-unitary operation is passed. All quantum operations must be unitary.
NotUnitaryOperationExceptionThrown if a non-unitary operation is passed. All quantum operations must be unitary.
SizeMismatchExceptionThrown if the size of one of the operations does not match the size of the register.

Assembly: Cove.Base (Module: Cove.Base) Version: 1.0.0.0 (1.0.0.0)