Package com.quantum4j.qasm
Class QasmImporter
java.lang.Object
com.quantum4j.qasm.QasmImporter
Strict OpenQASM 2.0 importer for Quantum4J.
Supports:
- Header: OPENQASM, include
- qreg/creg
- Single-qubit gates: x,y,z,h,s,t,u1,u2,u3,rx,ry,rz
- Two-qubit: cx,cz,swap,iswap,ch
- Three-qubit: ccx
- measure q[i] -> c[j]
Rules:
- Every logical statement must end with a semicolon.
- No trailing garbage allowed (e.g. "h q[0] xyz" is rejected).
- Strict register syntax: q[0], c[1], etc.
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
fromQasm
-