uid | title | ms.date | ms.topic | qsharp.kind | qsharp.namespace | qsharp.name | qsharp.summary |
---|---|---|---|---|---|---|---|
Microsoft.Quantum.Canon.TransformedOperationCA |
TransformedOperationCA function |
7/28/2023 12:00:00 AM |
managed-reference |
function |
Microsoft.Quantum.Canon |
TransformedOperationCA |
Given a function and an operation, returns a new operation whose input is transformed by the given function. |
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 a function and an operation, returns a new operation whose input is transformed by the given function.
function TransformedOperationCA<'T, 'U> (fn : ('U -> 'T), op : ('T => Unit is Adj + Ctl)) : ('U => Unit is Adj + Ctl)
A function that transforms the given input into a form expected by the operation.
The operation to be transformed.
A new operation that calls fn
with its input, then passes the
resulting output to op
.
The following call uses @"Microsoft.Quantum.Arithmetic.LittleEndianAsBigEndian" to transform an operation designed for @"Microsoft.Quantum.Arithmetic.BigEndian" inputs into an operation that accepts inputs of type @"Microsoft.Quantum.Arithmetic.LittleEndian":
let leOp = TransformedOperation(LittleEndianAsBigEndian, ApplyXorInPlaceBE);
- Microsoft.Quantum.Canon.TransformedOperation
- Microsoft.Quantum.Canon.TransformedOperationA
- Microsoft.Quantum.Canon.TransformedOperationCA
- Microsoft.Quantum.Canon.ApplyWithInputTransformation
- Microsoft.Quantum.Canon.Composed