Skip to content

Commit

Permalink
use assert_almost_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
MarquessV committed Oct 17, 2024
1 parent 1e84d79 commit b1eef4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forest/benchmarking/tests/test_direct_fidelity_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_exhaustive_process_dfe_run(benchmarker: BenchmarkConnection):
prog += process

expectation = wfnsim.reset().do_program(prog).expectation(setting.observable)
assert expectation == 1.
assert_almost_equal(expectation, 1.0)


def test_exhaustive_state_dfe_run(benchmarker: BenchmarkConnection):
Expand All @@ -62,7 +62,7 @@ def test_exhaustive_state_dfe_run(benchmarker: BenchmarkConnection):
prog += process

expectation = wfnsim.reset().do_program(prog).expectation(setting.observable)
assert expectation == 1.
assert_almost_equal(expectation, 1.0)


def test_exhaustive_process_dfe_analytical(benchmarker: BenchmarkConnection, qvm):
Expand Down

0 comments on commit b1eef4e

Please sign in to comment.