Skip to content

Commit

Permalink
loosen BP test tolernace
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Oct 28, 2024
1 parent 9d86836 commit ed21567
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/test_tensor/test_belief_propagation/test_d2bp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import quimb.tensor as qtn
from quimb.experimental.belief_propagation.d2bp import (
contract_d2bp,
compress_d2bp,
contract_d2bp,
sample_d2bp,
)

Expand All @@ -27,7 +27,7 @@ def test_tree_exact(dtype):
info = {}
norm2_bp = contract_d2bp(psi, info=info, progbar=True)
assert info["converged"]
assert norm2_bp == pytest.approx(norm2, rel=5e-6)
assert norm2_bp == pytest.approx(norm2, rel=1e-5)


@pytest.mark.parametrize("damping", [0.0, 0.1])
Expand Down
4 changes: 2 additions & 2 deletions tests/test_tensor/test_belief_propagation/test_l2bp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import quimb.tensor as qtn
from quimb.experimental.belief_propagation.l2bp import (
contract_l2bp,
compress_l2bp,
contract_l2bp,
)


Expand All @@ -14,7 +14,7 @@ def test_contract_tree_exact(dtype):
info = {}
norm2_bp = contract_l2bp(psi, info=info, progbar=True)
assert info["converged"]
assert norm2_bp == pytest.approx(norm2, rel=5e-6)
assert norm2_bp == pytest.approx(norm2, rel=1e-5)


@pytest.mark.parametrize("dtype", ["float32", "complex64"])
Expand Down

0 comments on commit ed21567

Please sign in to comment.