DrawMany 작업

경고

이 설명서는 최신 QDK로 대체된 클래식 QDK를 참조합니다.

최신 QDK에 대한 API 설명서는 를 참조 https://aka.ms/qdk.api 하세요.

네임스페이스: Microsoft.Quantum.Arrays

패키지: Microsoft.Quantum.Standard

지정된 수의 샘플에 대한 작업을 반복하여 배열에서 해당 출력을 수집합니다.

operation DrawMany<'TInput, 'TOutput> (op : ('TInput => 'TOutput), nSamples : Int, input : 'TInput) : 'TOutput[]

입력

op: 'TInput => 'TOutput

반복적으로 호출할 작업입니다.

nSamples: Int

수집할 호출 op 샘플 수입니다.

input: 'TInput

에 전달할 op입력입니다.

출력: 'TOutput[]

형식 매개 변수

'TInput

'TOutput

예제

다음 샘플은 한 번에 단일 비트를 샘플하는 작업이 지정된 정수입니다.

let randomInteger = BoolArrayAsInt(DrawMany(SampleRandomBit, 16, ()));

참고 항목