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: 18.104.22.168 (22.214.171.124)
|Thrown if ControlIndex is out
|This method is not yet