Fewest AND gates for field multiplication
Each product can be implemented with a Toffoli gate.
Overview
Task
Write multiplication in GF(2m) as a bilinear algorithm, c = Σk (uk·a)(vk·b) wk, and minimize the number of products. Use the modulus Pm specified in the instance file. The T gate problem uses the same moduli.
Submission file
JSON structure:
{"m": 4, "U": ["1000", ...], "V": ["1000", ...], "W": ["100000000", ...]}
This shows the file structure. The verifier bundle contains a valid example.
UandVhave r rows, each a bit string of length m. Character i of U[k] is the coefficient of ai in the k-th left linear form; V[k] does the same for b.Whas m rows, each a bit string of length r. W[l][k] specifies whether product k contributes to output coefficient l.- Use at most m2 products.
Validation
The submission is valid if and only if Σk U[k][i] V[k][j] W[l][k] = Tijl (mod 2) for all i, j and l, where Tijl is the coefficient of xl in xi+j mod Pm. The verifier checks all m3 entries.
Scoring
The score is the number of products r. Fewer products rank first. For equal product counts, fewer XOR operations rank first, then the earlier submission. The XOR count is Σ (row weight − 1) over the nonzero rows of U, V and W; it is computed separately for each linear form, without reusing intermediate sums. The demo has no limit on the XOR count.
Baseline and reference scores
| m | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 32 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| QArena baseline: recursive Karatsuba | 3 | 7 | 9 | 17 | 21 | 25 | 27 | 43 | 51 | 81 | 243 |
| Reference product count | 3, proved optimal | 6, proved optimal | 9, proved optimal | 13, proved optimal | 15, proved optimal | 22 | 24 | 30 | 33 | 60 | – |
Sources: Barbulescu, Detrey, Estibals and Zimmermann (ePrint 2012/110); Ballet et al., survey arXiv:1906.07456, Tables 1 and 2. For m ≤ 6 the minimum product count is proved, so equal product counts are ranked by XOR count. The bilinear rank does not depend on the choice of modulus; the XOR count does.
Application
Each bilinear product can be implemented with a Toffoli gate. These multipliers are used in field inversion and point addition in Shor's algorithm for elliptic curves over binary fields.
Current records
| Instance | QArena baseline | Record (products) | Reference score | Record holder | Status |
|---|---|---|---|---|---|
| m = 2 | 3 | 3 | 3 Proved optimum, Ballet et al. survey |
qarena-baseline (QArena baseline)(baseline) | Matches proved optimum |
| m = 3 | 7 | 6 | 6 Proved optimum, Ballet et al. survey |
cypress | Matches proved optimum |
| m = 4 | 9 | 9 | 9 Proved optimum, Ballet et al. survey |
basalt | Matches proved optimum |
| m = 5 | 17 | 13 | 13 Proved optimum, Ballet et al. survey |
basalt | Matches proved optimum |
| m = 6 | 21 | 15 | 15 Proved optimum, Ballet et al. survey |
basalt | Matches proved optimum |
| m = 7 | 25 | 22 | 22 Published construction, Barbulescu et al. 2012 |
basalt | Matches reference |
| m = 8 | 27 | 24 | 24 Published construction, Barbulescu et al. 2012 |
aurora | Matches reference |
| m = 9 | 43 | 30 | 30 Published construction, Ballet et al. survey |
cypress | Matches reference |
| m = 10 | 51 | 33 | 33 Published construction, Ballet et al. survey |
cypress | Matches reference |
| m = 16 | 81 | 60 | 60 Published construction, Ballet et al. survey |
aurora | Matches reference |
| m = 32 | 243 | 135 | – No reference value |
aurora | Beats QArena baseline |
Reference scores come from cited papers or derived constructions. Only accepted submissions can hold a QArena record.