File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
qualtran/bloqs/factoring/ecc Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -413,12 +413,12 @@ def test_ec_add_symbolic_cost():
413
413
414
414
# Litinski 2023 https://arxiv.org/abs/2306.08585
415
415
# Based on the counts from Figures 3, 5, and 8 the toffoli count for ECAdd is 126.5n^2 + 189n.
416
- # The following formula is 126.5n^2 + 199 .5n - 35 . We account for the discrepancy in the
416
+ # The following formula is 126.5n^2 + 195 .5n - 31 . We account for the discrepancy in the
417
417
# coefficient of n by a reduction in the toffoli cost of Montgomery ModMult, an increase in the
418
418
# toffoli cost for Kaliski Mod Inverse, n extra toffolis in ModNeg, 2n extra toffolis to do n
419
419
# 3-controlled toffolis in step 2. The expression is written with rationals because sympy
420
420
# comparison fails with floats.
421
- assert total_toff == sympy .Rational (253 , 2 ) * n ** 2 + sympy .Rational (399 , 2 ) * n - 35
421
+ assert total_toff == sympy .Rational (253 , 2 ) * n ** 2 + sympy .Rational (391 , 2 ) * n - 31
422
422
423
423
424
424
def test_ec_add (bloq_autotester ):
You can’t perform that action at this time.
0 commit comments