Skip to content

Channel autorouting#213

Open
gpeairs wants to merge 32 commits into
mainfrom
gp/auto-channel
Open

Channel autorouting#213
gpeairs wants to merge 32 commits into
mainfrom
gp/auto-channel

Conversation

@gpeairs
Copy link
Copy Markdown
Member

@gpeairs gpeairs commented Apr 28, 2026

Adds autorouting for channel routing based on Hashimoto and Stevens (1971), Yoshimura and Kuh (1982), and Condrat, Kalla, and Blair (2013).

Typical superconducting qubit devices are very regular by construction. Components lie on a repeating grid, and routes follow channels between them. Channel routing as described in the references above can take advantage of that regular structure to quickly produce reasonable routing solutions, which designers (or optimizers) can iterate on.

This PR adds an algorithmic core in src/paths/channel_routing_core.jl, which is DeviceLayout.jl-independent, and src/paths/channel_autorouter.jl, which defines the ChannelRouter object that connects DeviceLayout structures (Paths, Routes, ...) to the core interface.

The existing SingleChannelRouting <: RouteRule (#123) lets users route multiple paths along a single channel with manual track assignment (or a simple auto-incrementing track). This PR introduces AutoChannelRouting <: RouteRule, which allows simultaneously routing many nets through multiple intersecting channels and automatically assigns tracks to avoid crossings. The channel and track assignment problem is solved by a ChannelRouter object inside the AutoChannelRouting rule, then the rule is used to construct the actual routes based on those assignments together with a rule for transitioning between channels (the same way SingleChannelRouting works, but chaining multiple channels together rather than only transitioning to the start and end pins).

Routing proceeds in two steps: channel assignment (choosing which channels each net's wire passes through) and track assignment (assigning non-overlapping tracks within each channel). Track assignment within a channel is crossing-aware (based on Condrat et al.): If a crossing is avoidable (without changing assigned channels or already-assigned tracks), then it will generally be avoided. (This does mean that the quality of a solution can depend on the order channels are processed for track assignment.)

See docs/src/concepts/channel_autorouter.md for explanation (preview) and examples/ChannelAutorouter/ChannelAutorouter.jl for examples (preview).

Some follow-ups will make this more useful for complex problems, but are out of scope for this PR:

  • Routing solution import/export
  • Better interface for ripup/reroute, manual track assignment
  • Channel capacity constraints
  • Crossing and congestion reduction (negotiation during assignment or outer optimization loop)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 96.14148% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/paths/channel_autorouter.jl 92.92% 14 Missing ⚠️
src/paths/channel_routing_core.jl 98.46% 6 Missing ⚠️
src/hooks.jl 33.33% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

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