ApplyWithA 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 ApplyWithA<'T> (outerOperation : ('T => Unit is Adj), innerOperation : ('T => Unit is Adj), target : 'T) : Unit is Adj

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

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