Notă
Accesul la această pagină necesită autorizare. Puteți încerca să vă conectați sau să modificați directoarele.
Accesul la această pagină necesită autorizare. Puteți încerca să modificați directoarele.
Fully qualified name: Std.Arrays.DrawMany
operation DrawMany<'TInput, 'TOutput>(op : ('TInput => 'TOutput), nSamples : Int, input : 'TInput) : 'TOutput[]
Summary
Repeats an operation for a given number of samples, collecting its outputs in an array.
Input
op
The operation to be called repeatedly.
nSamples
The number of samples of calling op to collect.
input
The input to be passed to op.
Type Parameters
TInput
The type of input expected by op.
TOutput
The type of output returned by op.
Example
The following samples an alternating array of results.
use qubit = Qubit();
let results = Std.Arrays.DrawMany(q => {X(q); M(q)}, 3, qubit);