MultiplexOperationsBruteForceFromGenerator 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

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

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

operation MultiplexOperationsBruteForceFromGenerator<'T> (unitaryGenerator : (Int, (Int -> ('T => Unit is Adj + Ctl))), index : Microsoft.Quantum.Arithmetic.LittleEndian, target : 'T) : Unit is Adj + Ctl

Input

unitaryGenerator : (Int,Int -> 'T => 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$.

index : LittleEndian

$n$-qubit control register that encodes number states $\ket{j}$ in little-endian format.

target : 'T

Generic qubit register that $V_j$ acts on.

Output : Unit

Type Parameters

'T

Remarks

coefficients will be padded with identity elements if fewer than $2^n$ are specified. This version is implemented directly by looping through n-controlled unitary operators.