Skip to content

Commit

Permalink
changed simplify to simplify_am, simplify was attempting to numerical…
Browse files Browse the repository at this point in the history
…ly resolve a clebsch-gordan coefficient but the test was made to check a symbolic simplification, the clebsch-gordan function failed attempting to resolve a number to these symbols. Altering simplify->simplify_am passes test
  • Loading branch information
Wholinator committed Jan 15, 2025
1 parent de34619 commit d751911
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/nuclear_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def test_varsh_872_5(nuclear: NuclearBogoliubovDrudge):
TODO: Investigate its failure in Apache Spark environment.
"""

dr = nuclear
a, alpha, b, beta, b_prm, beta_prm = symbols(
'a alpha b beta bprm betaprm', integer=True
Expand All @@ -132,7 +133,7 @@ def test_varsh_872_5(nuclear: NuclearBogoliubovDrudge):
)
for sums_i in [sums, reversed(sums)]:
tensor = dr.sum(*sums_i, amp)
res = tensor.deep_simplify().merge()
res = tensor.simplify_am().merge() #previously used deep_simplify
assert res.n_terms == 1
term = res.local_terms[0]
assert len(term.sums) == 0
Expand Down

0 comments on commit d751911

Please sign in to comment.