ApplyWithInputTransformationA operation


This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Canon

Package: Microsoft.Quantum.Standard

Given an operation that accepts some input, a function that returns an output compatible with that operation, and an input to that function, applies the operation using the function to transform the input to a form expected by the operation.

operation ApplyWithInputTransformationA<'T, 'U> (fn : ('U -> 'T), op : ('T => Unit is Adj), input : 'U) : Unit is Adj


fn : 'U -> 'T

A function that transforms the given input into a form expected by the operation.

op : 'T => Unit is Adj

The operation to be applied.

input : 'U

An input to the function.

Output : Unit

Type Parameters




The following call uses LittleEndianAsBigEndian function to apply an operation designed for BigEndian user defined type inputs to an input of type LittleEndian user defined type:

ApplyWithInputTransformation(LittleEndianAsBigEndian, ApplyXorInPlaceBE, LittleEndian(qubits));

See Also