Start from any state: `initialize(state)`

Đang mở
#17 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
54/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 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ả

enhancement
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

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.