Apply a generic operation to the specified qubits.
| C# | Visual Basic | Visual C++ |
IQuantumRegister ApplyOperation( IQuantumOperation Operation, int[] Indexes )
Function ApplyOperation ( _ Operation As IQuantumOperation, _ Indexes As Integer() _ ) As IQuantumRegister
IQuantumRegister^ ApplyOperation( IQuantumOperation^ Operation, array<int>^ Indexes )
- Operation (IQuantumOperation)
- Operation to apply to the qubit(s)
- Indexes (array< Int32 >[]()[])
- Indexes to apply the operation to.
A reference to this register after the operation has been applied.
| Exception | Condition |
|---|---|
| IndexOutOfRangeException | Thrown if any of the indexes
are out of range. |
| SizeMismatchException | Thrown if the operation does not
size does not match the size of the register. |