Skip to content

Commit

Permalink
Further clarify in test comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fpapa250 committed Mar 5, 2025
1 parent 1e2d6e8 commit 451de48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qualtran/bloqs/cryptography/ecc/ec_add_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,9 @@ def test_ec_add_symbolic_cost():
# The following formula is 126.5n^2 + 215.5n - 34. We account for the discrepancy in the
# coefficient of n by a reduction in the toffoli cost of Montgomery ModMult, an increase in the
# toffoli cost for Kaliski Mod Inverse, n extra toffolis in ModNeg, 2n extra toffolis to do n
# 3-controlled toffolis in step 2, and a few extra gates added to fix bugs found in the
# circuit. The expression is written with rationals because sympy comparison fails with floats.
# 3-controlled toffolis in step 2, and a few extra gates added to fix bugs found in the circuit
# (see class docstrings). The expression is written with rationals because sympy comparison
# fails with floats.
assert total_toff == sympy.Rational(253, 2) * n**2 + sympy.Rational(431, 2) * n - 34


Expand Down

0 comments on commit 451de48

Please sign in to comment.