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

Đang mở
#1,965 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@aadityarshah đang làm issue này rồi.

Từ ngày 5/10/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
57/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
quantum-computing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
397
Fork
127
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quantumlib/Qualtran

Tất cả issue của quantumlib/Qualtran

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.