Skip to content

Commit

Permalink
Add rtol to kpz checks (#335)
Browse files Browse the repository at this point in the history
Add rtol to kpz checks
  • Loading branch information
eliottrosenberg authored Sep 1, 2023
1 parent 7c831ab commit d021621
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions recirq/kpz/experiment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ def test_size_independence_muinf():
expt2 = kpz.KPZExperiment(cycles, mu, 1, theta, phi, num_qubits=2 * cycles + 2)
res2 = expt2.run_experiment_amplitudes(_SAMPLER)

assert np.isclose(res1.mean, res2.mean, atol=1e-5)
assert np.isclose(res1.variance, res2.variance, atol=1e-5)
assert np.isclose(res1.skewness, res2.skewness, atol=2e-5)
assert np.isclose(res1.kurtosis, res2.kurtosis, atol=2e-5)
assert np.isclose(res1.mean, res2.mean, atol=1e-5, rtol=2e-5)
assert np.isclose(res1.variance, res2.variance, atol=1e-5, rtol=2e-5)
assert np.isclose(res1.skewness, res2.skewness, atol=2e-5, rtol=2e-5)
assert np.isclose(res1.kurtosis, res2.kurtosis, atol=2e-5, rtol=2e-5)


def test_size_independence():
Expand Down

0 comments on commit d021621

Please sign in to comment.