OpenQASM import and export
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with src/circuit.rs, especially Label and how instructions retain names and angles; inspect the circuit API for import and export entry points. The issue outlines OpenQASM 2 and 3 edge cases, unsupported import statements, and unitary decomposition, so first map the supported gates and conditions. Done means circuits can be imported from and exported to the described QASM versions with clear errors for unsupported cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What you want to do
Move circuits between qsengine and Qiskit, other simulators, or hardware. Today there is no way
in or out except rebuilding the circuit gate by gate.
Implementation notes
- Each instruction already keeps its name and angles (
Labelinsrc/circuit.rs, described as
kept "for drawing and later for export"). - OpenQASM 2 limits:
if (c == v)compares the whole register, but qsengine conditions on any subset of bits.
Export conditions only when they cover the whole register; otherwise raise and point to version 3.p/cpareu1/cu1inqelib1.inc.
unitarygates have no name in QASM. Export them asU(θ,φ,λ)from a ZYZ decomposition
(record the global phase asgphasein QASM 3). Controlledunitarygates need a controlled-U
decomposition, or should raise.- Import: parse the subset qsengine supports, and give a clear error naming the first unsupported
statement (customgatedefinitions, loops and so on).
What it could look like
qc = qsengine.QuantumCircuit.from_qasm(open("bell.qasm").read())
print(qc.to_qasm()) # OpenQASM 3 by default
print(qc.to_qasm(version=2))
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