Simulate the gates before the first mid-circuit measurement only once
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- performance
Direzione di ricerca
Start at the shortcut: note in src/circuit.rs:408 and trace how instructions are simulated for each shot, stopping at the first Measure or Reset. Then inspect the QuantumBackend implementations to see how CPU and GPU state buffers are managed. Done means the cached prefix is reused when two states fit in memory, with the current behavior retained when they do not.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What you want to do
A circuit that measures part-way is simulated from scratch for every shot, including all the gates
before the first measurement, whose result is the same every time. For a deep state-preparation
circuit followed by one mid-circuit measurement, almost all of the time goes on repeating that
prefix. src/circuit.rs:408 notes this as a shortcut:.
Implementation notes
- Run the instructions up to the first
Measure/Resetonce, keep a copy of that state, and
start each shot from the copy instead ofcollapse_to(0). - This needs a "copy this state" primitive on
QuantumBackend. CPU: copy theVec. GPU:
copy_buffer_to_bufferinto a second buffer, which stays on the GPU. - This doubles memory, so skip the cache when two states would not fit (for example above 29 qubits
on the CPU), and fall back to the current behaviour. - A further step is to also sample the first measurement's outcome from the cached state and only
branch from there.
What it could look like
No API change.
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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di kaiwave/qsengine
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Fold long circuit drawingsApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Tutte le issue di kaiwave/qsengine
Issue simili
-
bug order-flow studies ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
userFRM/egui-charts#2417 ·
I maintainer di solito rispondono entro 1 giorno
-
In a plain-text message, Font, Font Size, Font Color and Text Highlight Color stay liveForse già presa @ragelfundionctrumnar l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
UCS-Care-Group/mailcraft#862 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
smoltcp-rs/smoltcp#1243 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno