ApplyWithCA operation
Warning
This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.
Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.
Namespace: Microsoft.Quantum.Canon
Package: Microsoft.Quantum.Standard
Given two operations, applies one as conjugated with the other.
operation ApplyWithCA<'T> (outerOperation : ('T => Unit is Adj), innerOperation : ('T => Unit is Adj + Ctl), target : 'T) : Unit is Adj + Ctl
Description
Given two operations, respectively described by unitary operators $U$ and $V$, applies them in the sequence $U^{\dagger} V U$. That is, this operation implements the unitary operator given by $V$ conjugated with $U$.
Input
outerOperation : 'T => Unit is Adj
The operation $U$ that should be used to conjugate $V$. Note that the outer operation $U$ needs to be adjointable, but does not need to be controllable.
innerOperation : 'T => Unit is Adj + Ctl
The operation $V$ being conjugated.
target : 'T
The input to be provided to the outer and inner operations.
Output : Unit
Type Parameters
'T
The target on which each of the inner and outer operations act.
Remarks
The outer operation is always assumed to be adjointable, but does not need to be controllable in order for the combined operation to be controllable.
See Also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for