More standard gates

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/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, rust
Lĩnh vực
backend

Hướng nghiên cứu

Start with src/gates.rs and the existing gate methods; the issue says single-qubit and controlled gates follow that pattern, while mcx uses control_mask and the multi-qubit rotations and cswap need the listed decompositions. Then inspect the drawer’s SYMBOLS table, the type stub, and the gates documentation page. Done means adding the requested gates and measure_all behavior, with each represented in those supporting files.

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

Mô tả

enhancement
What you want to do

Build common circuits without writing unitary matrices by hand.

Implementation notes
  • The single-qubit and controlled ones need only a matrix in src/gates.rs and a method, the same
    as existing gates. mcx maps straight onto control_mask.
  • rzz is diagonal, so it is a phase that depends on the parity of the two bits. Without a two-qubit
    kernel, decompose it as CX · RZ · CX. rxx and ryy are the same with basis changes.
  • cswap(c, a, b) (control c, swap a and b) is cx(b, a), then ccx(c, a, b), then cx(b, a).
  • Add every gate to the drawer's SYMBOLS table, the type stub and the gates docs page.
What it could look like
qc.sx(0); qc.sxdg(0)
qc.cy(0, 1); qc.ch(0, 1); qc.crx(0, 1, t); qc.cry(0, 1, t)
qc.rzz(0, 1, t); qc.rxx(0, 1, t); qc.ryy(0, 1, t)
qc.cswap(0, 1, 2)
qc.mcx([0, 1, 2, 3], 4)     # any number of controls
qc.measure_all()            # adds classical bits if needed, like Qiskit
Contributing
  • I would like to open a pull request for this (see CONTRIBUTING.md).
Ngôn ngữ chính
Rust
Star
1
Fork
0
Merge trung bình
12 phút
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 kaiwave/qsengine

Tất cả issue của kaiwave/qsengine

Issue tương tự

Thêm issue về Rust

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.