Perform the TargetOperation on all qubits except the qubit at ControlIndex if the qubit at ControlIndex is |1>. Else there is no change in the register. This arbitrary application of a single qubit operator to n qubits in a register based on a control qubit is called ControlU.
|C#||Visual Basic||Visual C++|
Public Function OperationControlledU ( _ TargetOperation As IQubitOperation, _ ControlIndex As _ ) As IQuantumRegister
- TargetOperation (IQubitOperation)
- The operation to apply to all qubits except the qubit at ControlIndex.
- ControlIndex ( )
- The index of the qubit that will serve as the control. If this is |1> then the TargetOperation is applied to all other qubits.
A reference to this register after the operation has been applied.
Assembly: Cove.LocalSimulation (Module: Cove.LocalSimulation) Version: 126.96.36.199 (188.8.131.52)
|Thrown if ControlIndex is out
|This method is not yet