ApplyIfZeroCA 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 a unitary operation conditioned on a classical result value being zero.
operation ApplyIfZeroCA<'T> (result : Result, (op : ('T => Unit is Adj + Ctl), target : 'T)) : Unit is Adj + Ctl
Description
Given an operation op
and a result value result
, applies op
to the target
if result
is Zero
. If One
, nothing happens to the target
.
The suffix CA
indicates that the operation to be applied is unitary
(controllable and adjointable).
Input
result : Result
A measurement result that controls whether op is applied or not.
op : 'T => Unit is Adj + Ctl
An operation to be conditionally applied.
target : 'T
The input to which the operation is applied.
Output : Unit
Type Parameters
'T
The input type of the operation to be conditionally applied.
See Also
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