ApplyToElementA operation


This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Canon

Package: Microsoft.Quantum.Standard

Applies an operation to a given element of an array.

operation ApplyToElementA<'T> (op : ('T => Unit is Adj), index : Int, targets : 'T[]) : Unit is Adj


Given an operation op, an index index, and an array of targets targets, applies op(targets[index]).


op : 'T => Unit is Adj

An operation to be applied.

index : Int

An index into the array of targets.

targets : 'T[]

An array of possible targets for op.

Output : Unit

Type Parameters


The input type of the operation to be applied.

See Also