qiskit_qm_provider.random.rand_gauss_box_muller¶
- rand_gauss_box_muller(qua_rng: QuaRandom, mean, std, z1, z2, tables_qua=None, n_lookup: int = 512)[source][source]¶
QUA macro drawing one Gaussian pair per dimension into
z1andz2.Loops over
mean.length()and draws onequa_rng.rand_fixed()per dimension;box_muller_pair()replays the same call on the host.- Parameters:
qua_rng – QUA
Random, typically fromRandom.declare_qua().mean – QUA
fixedarray of means.std – QUA
fixedarray of standard deviations, same length asmean.z1 – QUA
fixedarray receiving the first sample of each pair.z2 – QUA
fixedarray receiving the second sample of each pair.tables_qua –
(cos_array, ln_array)fromBoxMullerTables.declare_qua(). Pass them when calling the macro several times to declare the tables once; whenNonethey are declared on each call.n_lookup – Table length; must match the tables passed in
tables_qua.
- Returns:
Tuple
(z1, z2).