ApplyIfZeroA 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 an adjointable operation conditioned on a classical result value being zero.
operation ApplyIfZeroA<'T> (result : Result, (op : ('T => Unit is Adj), target : 'T)) : Unit is Adj
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 A
indicates that the operation to be applied is adjointable.
Input
result : Result
A measurement result that controls whether op is applied or not.
op : 'T => Unit is Adj
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