RepeatC 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

Repeats an operation a given number of times.

operation RepeatC<'TInput> (op : ('TInput => Unit is Ctl), nTimes : Int, input : 'TInput) : Unit is Ctl

Input

op : 'TInput => Unit is Ctl

The operation to be called repeatedly.

nTimes : Int

The number of times to call op.

input : 'TInput

The input to be passed to op.

Output : Unit

Type Parameters

'TInput

Example

The following are equivalent:

RepeatC(U, 17, target);
(BoundC(ConstantArray(17, U)))(target);

See Also