Implement Gidney's in-place ripple-carry adder with carry-out

Aperta
#1,965 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@aadityarshah ci sta già lavorando.

Dal 5/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start by locating the existing Add, OutOfPlaceAdder, and ControlledAddOrSubtract implementations and their tests; the issue does not name file paths. Compare the in-place adder without carry-out to Fig. 1(b) of the linked paper to identify the expected carry-out behavior. Done means adding the in-place carry-out variant and tests that verify its behavior and Toffoli count.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

While working upon the issue #1462 and going through the paper Quantum schoolbook multiplication with fewer Toffoli gates, I found that the current codebase does not provide a Gidney ripple-carry adder with carry-out.

Currently, it provides Add, which performs in-place addition without carry-out using n-1 Toffoli gates, as described in Fig. 1 (a) of the paper. However, it does not implement the corresponding adder with carry-out as described in Fig. 1(b), which uses n Toffoli gates.

This also differs from the existing OutOfPlaceAdder, which preserves both input registers and computes the n+1-bit sum into a separate output register.

The carry-out version of the adder would be useful to implement the schoolbook multiplications with fewer Toffolis as described in the paper in Fig. 2 (b). This will be useful in the first correction step that fixes the intermediate result obtained after the n iterations of ControlledAddOrSubtract gates.

Lingua principale
Python
Stelle
397
Fork
127
Merge medio
2g 19h
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di quantumlib/Qualtran

Tutte le issue di quantumlib/Qualtran

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.