Skip to content

Commit 9e00baf

Browse files
committed
Fix bloq counts
1 parent c906ea6 commit 9e00baf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qualtran/bloqs/factoring/ecc/ec_add_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,12 @@ def test_ec_add_symbolic_cost():
413413

414414
# Litinski 2023 https://arxiv.org/abs/2306.08585
415415
# 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
417417
# coefficient of n by a reduction in the toffoli cost of Montgomery ModMult, an increase in the
418418
# toffoli cost for Kaliski Mod Inverse, n extra toffolis in ModNeg, 2n extra toffolis to do n
419419
# 3-controlled toffolis in step 2. The expression is written with rationals because sympy
420420
# 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
422422

423423

424424
def test_ec_add(bloq_autotester):

0 commit comments

Comments
 (0)