Start from any state: `initialize(state)`
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
- 54/100
Hướng nghiên cứu
Start by reading CONTRIBUTING.md and tracing how QuantumCircuit accepts and executes instructions, including its CPU and GPU state paths. Check how state vectors are represented and where state preparation occurs; the issue suggests initialize must be the first instruction. Done means accepting a supplied state, validating its length and normalization, renormalizing it, and covering the requested CPU and GPU behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What you want to do
Begin a circuit from a given state vector (a known ground state, data loaded into amplitudes,
or a state saved from another run) instead of |0…0⟩.
Implementation notes
- Simplest version: allowed only as the first instruction. It writes the amplitudes directly
(CPU: copy; GPU:write_buffer) and skips state preparation. - Validate the length and normalisation (within 1e-9), and renormalise.
What it could look like
qc = qsengine.QuantumCircuit(3)
qc.initialize(np.array([...], dtype=complex)) # length 2**3, normalised
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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của kaiwave/qsengine
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Fold long circuit drawingsĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Tất cả issue của kaiwave/qsengine
Issue tương tự
-
bug order-flow studies ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
userFRM/egui-charts#2417 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
In a plain-text message, Font, Font Size, Font Color and Text Highlight Color stay liveCó thể đã có người làm @ragelfundionctrumnar đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
UCS-Care-Group/mailcraft#862 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
smoltcp-rs/smoltcp#1243 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày