Skip to content

Commit

Permalink
Support standalone Vars in OQ3 exporter (Qiskit#12308)
Browse files Browse the repository at this point in the history
* Support standalone `Var`s in OQ3 exporter

This adds the remaining support needed for the OpenQASM 3 exporter to
support standalone variables.  The way the circuit model handles
closures over these variables makes it much easier to support these than
it was to handle free-form control-flow operations.

This PR somewhat refactors small parts of the exporter to better isolate
the "top-level program" statement construction and analysis from the
"build a scoped set of instructions" logic, which makes it rather easier
to handle things like declaring IO variables only in the global scope,
but locally declared variables in _all_ relevant scopes.

* Remove references to QSS

* Clarify comment about forward declarations

* Add test for parameter/gate clash resolution
  • Loading branch information
jakelishman authored and ElePT committed May 31, 2024
1 parent 6091d42 commit fef9ebd
Show file tree
Hide file tree
Showing 3 changed files with 336 additions and 104 deletions.
Loading

0 comments on commit fef9ebd

Please sign in to comment.