ControlledOnInt function

Returns a unitary operator that applies an oracle on the target register if the control register state corresponds to a specified positive integer.

function ControlledOnInt (numberState : Int, oracle : ('T => Unit : Adjoint, Controlled)) : ((Qubit[], 'T) => Unit : Adjoint, Controlled)

Input

numberState
Int

Positive integer.

oracle

Unitary operator.

Functors
Adjoint Controlled

Input: 'T

Output: Unit

Output

A unitary operator that applies oracle on the target register if the control register state corresponds to the number state numberState.

Functors
Adjoint Controlled

Input: Qubit[]

Input: 'T

Output: Unit