ControlledOnInt 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 unitary operator that applies an oracle on the target register if the control register state corresponds to a specified nonnegative integer.
function ControlledOnInt<'T> (numberState : Int, oracle : ('T => Unit is Adj + Ctl)) : ((Qubit[], 'T) => Unit is Adj + Ctl)
Input
numberState : Int
Nonnegative integer.
oracle : 'T => Unit is Adj + Ctl
Unitary operator.
Output : (Qubit[],'T) => Unit is Adj + Ctl
A unitary operator that applies oracle
on the target register if the
control register state corresponds to the number state numberState
.
Type Parameters
'T
Remarks
The value of numberState
is interpreted using a little-endian encoding.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for