Skip to content

Latest commit

 

History

History
68 lines (39 loc) · 1.71 KB

microsoft.quantum.canon.applytoelementa.md

File metadata and controls

68 lines (39 loc) · 1.71 KB
uid title ms.date ms.topic qsharp.kind qsharp.namespace qsharp.name qsharp.summary
Microsoft.Quantum.Canon.ApplyToElementA
ApplyToElementA operation
7/28/2023 12:00:00 AM
managed-reference
operation
Microsoft.Quantum.Canon
ApplyToElementA
Applies an operation to a given element of an array.

ApplyToElementA 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 operation to a given element of an array.

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

Description

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

Input

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

'T

The input type of the operation to be applied.

See Also

  • Microsoft.Quantum.Canon.ApplyToElement
  • Microsoft.Quantum.Canon.ApplyToElementC
  • Microsoft.Quantum.Canon.ApplyToElementCA