MultiplexerBruteForceFromGenerator 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

Returns a multiply-controlled unitary operation $U$ that applies a unitary $V_j$ when controlled by n-qubit number state $\ket{j}$.

$U = \sum^{2^n-1}_{j=0}\ket{j}\bra{j}\otimes V_j$.

function MultiplexerBruteForceFromGenerator (unitaryGenerator : (Int, (Int -> (Qubit[] => Unit is Adj + Ctl)))) : ((Microsoft.Quantum.Arithmetic.LittleEndian, Qubit[]) => Unit is Adj + Ctl)

Input

unitaryGenerator : (Int,Int -> Qubit[] => Unit is Adj + Ctl)

A tuple where the first element Int is the number of unitaries $N$, and the second element (Int -> ('T => () is Adj + Ctl)) is a function that takes an integer $j$ in $[0,N-1]$ and outputs the unitary operation $V_j$.

Output : (LittleEndian,Qubit[]) => Unit is Adj + Ctl

A multiply-controlled unitary operation $U$ that applies unitaries described by unitaryGenerator.

See Also