Apply a generic operation to the register.
| C# | Visual Basic | Visual C++ |
protected IQuantumRegister ApplyOperation( ComplexMatrix OperationMatrix )
Protected Function ApplyOperation ( _ OperationMatrix As ComplexMatrix _ ) As IQuantumRegister
protected: IQuantumRegister^ ApplyOperation( ComplexMatrix^ OperationMatrix )
- OperationMatrix (ComplexMatrix)
- The operation to apply
A reference to this register after the operation has been applied.
| Exception | Condition |
|---|---|
| SizeMismatchException | Thrown if the number of qubits
the operation applies to does not match the number of qubits in the
register. |
| ArgumentException | Thrown if the number of rows
and columns in OperationMatrix are not equal. |
| ArgumentException | Thrown if the number of rows and
columns in OpeartionMatrix are not a power of two. |
| ArgumentOutOfRangeException | Thrown if OperationMatrix doesn't
match the size of the exposed qubits. |