Repeat operation
Namespace: Microsoft.Quantum.Canon
Package: Microsoft.Quantum.Standard
Repeats an operation a given number of times.
operation Repeat<'TInput> (op : ('TInput => Unit), nTimes : Int, input : 'TInput) : Unit
Input
op : 'TInput => Unit
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:
Repeat(U, 17, target);
(Bound(ConstantArray(17, U)))(target);
See Also
Feedback
Submit and view feedback for