ApplyToEachIndexA 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 single-qubit operation to each indexed element in a register. The modifier A indicates that the single-qubit operation is adjointable.

operation ApplyToEachIndexA<'T> (singleElementOperation : ((Int, 'T) => Unit is Adj), register : 'T[]) : Unit is Adj

Input

singleElementOperation : (Int,'T) => Unit is Adj

Operation to apply to each qubit.

register : 'T[]

Array of qubits on which to apply the given operation.

Output : Unit

Type Parameters

'T

The target on which each of the operations acts.

See Also