Skip to content

refactor(core): unify parameter handling and compiler helpers - #44

Merged
jianjian01 merged 8 commits into
cq-lib:developfrom
jianjian01:develop
Sep 24, 2026
Merged

jianjian01 merged 8 commits into
cq-lib:developfrom
jianjian01:develop

Conversation

@jianjian01

Copy link
Copy Markdown
Collaborator

Centralize shared parameter and compiler logic, improve invalid-parameter error handling, and fix cascading parameter renames in QASM3 export.

  • Resolve parameters through Circuit APIs across compilation and QASM export, and reject invalid parameters during rewrite equivalence checks.
  • Add ParameterValue::scaled to preserve symbolic and fixed representations, with overflow checks in Hamiltonian evolution.
  • Share one-qubit matrix reconstruction, classical control body traversal, lowerable operations, global-phase extraction, and instruction reconstruction.
  • Apply simultaneous substitution to QASM3 gate parameters and global phase so overlapping or swapped names retain their meaning.
  • Add regression coverage for invalid parameters, symbolic scaling, matrix reconstruction, control-flow traversal, and QASM round trips.

@jianjian01
jianjian01 merged commit e918f67 into cq-lib:develop Sep 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant