Skip to content

Road to medium#29

Merged
jbolns merged 4 commits into
mainfrom
road_to_medium
Dec 10, 2025
Merged

Road to medium#29
jbolns merged 4 commits into
mainfrom
road_to_medium

Conversation

@jbolns

@jbolns jbolns commented Dec 10, 2025

Copy link
Copy Markdown
Collaborator

PR adds a number of improvements that altogether enable successful completion of larger-than-small circuits.

  • Improved critical nodes checks for second pass edges
    • Positive impact to completion rates
    • Negative impact on runtime due to involving additional checks.
  • Fix unobstructed exits bug found earlier by @inmzhang ( fixes Potential bug in unobstructed exits check #20 )
    • Positive impact to completion rates
    • Positive impact to runtimes due to reducing the number of placements that require deeper checks.
  • Moved so-called "second pass" edges (the ones missed by the traditional node-based BFS) to inside the BFS loop, ensuring all edges are now processed as soon as they are discovered irrespective of whether the operation involves placing a new node of connecting two previously-placed nodes.
    • Positive impact to completion rates due to reducing the number of open beams at any given point in time
    • Neutral or not-easily-observable-to-naked-eye impact on runtimes because the actual paths are about as long as they were when all second pass were being handled in one single batch at the end.

The PR also add a couple of features that might enable future experimentation

  • Deterministic mode for the selection of first mode
    • Selects the non-boundary spider with lowest ID.
    • For PyZX graphs, graph discovery plays out left-to-right / top-to-bottom, i.e., like one does when building manually.
    • That said, as expected, effect on runtimes seems negligible and there's no way to guarantee the outcome is the lowest volume possible.
  • 3 end-2-end test scripts for later usage in comprehensive testing (which can be used for now to test locally before merging any changes).
  • Improvements to pyzx_random generating function.
  • A few qasm files to test things with.
  • A few additional PyZX wrappers to improve PyZX interops.

@jbolns
jbolns merged commit 4c3f5a8 into main Dec 10, 2025
1 check passed
@jbolns
jbolns deleted the road_to_medium branch December 10, 2025 20:39
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.

Potential bug in unobstructed exits check

1 participant