ApplyToEachCA operation
Fully qualified name: Std.Canon.ApplyToEachCA
Q#
operation ApplyToEachCA<'T>(singleElementOperation : ('T => Unit is Adj + Ctl), register : 'T[]) : Unit is Adj + Ctl
Applies an operation to each element in a register.
The modifier CA
indicates that the single-element operation is controllable and adjointable.
Operation to apply to each element.
Array of elements on which to apply the given operation.
The target on which the operation acts.
Prepare a three-qubit |+⟩ state:
Q#
use register = Qubit[3];
ApplyToEach(H, register);