Skip to main content
IBM Quantum Platform
번역 정보

이 페이지의 추가 언어 번역이 곧 제공될 예정입니다.

BalancedUniformPauli

class samplomatic.distributions.BalancedUniformPauli(num_subsystems: int)

GitHub

Bases: Distribution

The balanced uniform distribution over virtual Pauli gates.

Here, balanced means that on every qubit, each of the four Paulis appears the same number of times, provided that the requested number of samples is a multiple of four. Moreover, when the number of samples is a multiple of two, it is promised that, for each qubit, X or Y is sampled the same number of times as I or Z.

The sampling algorithm is simply to draw four times fewer n-qubit Paulis uniformly and iid than requested, and then replicate each four times with respective multiplications by I⊗nI^{\otimes}n, X⊗nX^{\otimes}n, Z⊗nZ^{\otimes}n, and Y⊗nY^{\otimes}n, truncating the samples if their requested number is not a multiple of four. Randomizations are ordered such that the four replications are consecutive. The particular ordering of the four multiplicative terms— II then XX then ZZ then YY —is what provides the guarantee that for each qubit, X or Y is sampled the same number of times as I or Z, even if the number of samples is even but not a multiple of four.

Parameters

num_subsystems – The number of subsystems this distribution samples.

Attributes Summary

칼럼 1
칼럼 2
register_typeThe virtual gate type being sampled.

Methods Summary

칼럼 1
칼럼 2
sample(size, rng)Sample the distribution.

Attributes Documentation

register_type

Methods Documentation

sample

sample(size, rng)

GitHub

Sample the distribution.

Parameters

  • size – The number elements to sample.
  • rng – A randomness generator.

Returns

The samples.

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.