Start from any state: `initialize(state)`

Aperta
#17 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, rust
Ambito
backend

Direzione di ricerca

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.

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

Descrizione

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).
Lingua principale
Rust
Stelle
1
Fork
0
Merge medio
12m
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 kaiwave/qsengine

Tutte le issue di kaiwave/qsengine

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.