`unitary()`: project nearly-unitary matrices onto the closest unitary

Aperta
#21 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
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Start by reading src/circuit.rs around line 144 to see how unitary() checks matrices and how it represents them. The issue suggests projecting accepted matrices with a polar decomposition or one Newton step; confirm the available matrix operations and relevant tests before choosing an approach. Done means accepted nearly-unitary matrices are projected to the closest unitary without changing the API.

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

Descrizione

enhancement
What you want to do

unitary() accepts matrices that are up to 1e-9 away from unitary (src/circuit.rs:144) and uses them
as given. Each such gate scales the norm by up to 1 ± 1e-9, which adds up over long circuits.

Implementation notes

After the check passes, replace U with its closest unitary, U·(U†U)^(−1/2). For 2×2 that's a
closed-form polar decomposition, or a single Newton step U ← ½(U + U^{−†}), which is enough at
this tolerance.

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

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.