Apply a series of operations to the quantum register. If any of the operations
are invalid and an exception is thrown then the state of the register is not altered.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public IQuantumRegister ApplyOperations( IEnumerable<IQuantumOperation> Operations )
Public Function ApplyOperations ( _ Operations As IEnumerable(Of IQuantumOperation) _ ) As IQuantumRegister
public: virtual IQuantumRegister^ ApplyOperations( IEnumerable<IQuantumOperation^>^ Operations ) sealed
Parameters
- Operations (IEnumerable<(Of <(IQuantumOperation>)>))
- Operations to apply. They will be applied in order from lowest index to highest.
Return Value
A reference to this register after the operation has been 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. |
ArgumentException | Thrown if the operation does not have
AbstractSimulatedQuantumOperation as a base class. |