Skip to content

feat: Frontend support for Helios platform configuration#1807

Open
cgh-qtnm wants to merge 6 commits into
mainfrom
gh-helios-config
Open

feat: Frontend support for Helios platform configuration#1807
cgh-qtnm wants to merge 6 commits into
mainfrom
gh-helios-config

Conversation

@cgh-qtnm
Copy link
Copy Markdown
Contributor

@cgh-qtnm cgh-qtnm commented Jun 3, 2026

This PR adds a new module guppylang.std.qsystem.helios and a function set_platform_config which sets Helios-specific platform options on a compiled HUGR. At the moment, this is only for development purposes - none of these options are supported by the backend yet and the interface should be considered unstable.

In addition, this module will also provide a definition of the metadata key. Let me know if that should go somewhere else.

cgh-qtnm and others added 4 commits June 2, 2026 13:21
Add new module with a plain Python function that sets the
'qsystem.helios.configuration' metadata key on the module root(s) of a
compiled HUGR Package or Hugr. The configuration contains three
keyword-only arguments: squash_rxys (bool, default True),
enable_replay (bool, default False), and dd_threshold (int, default 0).

Also add integration tests for default and custom config values.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cgh-qtnm cgh-qtnm requested a review from a team as a code owner June 3, 2026 21:25
@cgh-qtnm cgh-qtnm requested review from Copilot and nicolaassolini-qntm and removed request for nicolaassolini-qntm June 3, 2026 21:25
@cgh-qtnm cgh-qtnm requested a review from ss2165 June 3, 2026 21:25
@cgh-qtnm cgh-qtnm changed the title Frontend support for Helios platform configuration feat: Frontend support for Helios platform configuration Jun 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🐰 Bencher Report

Branchgh-helios-config
TestbedLinux
Click to view all benchmark results
Benchmarkhugr_bytesBenchmark Result
bytes x 1e3
(Result Δ%)
Upper Boundary
bytes x 1e3
(Limit %)
hugr_nodesBenchmark Result
nodes
(Result Δ%)
Upper Boundary
nodes
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
158.77 x 1e3
(0.00%)Baseline: 158.77 x 1e3
160.36 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
6,641.00
(0.00%)Baseline: 6,641.00
6,707.41
(99.01%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
27.54 x 1e3
(0.00%)Baseline: 27.54 x 1e3
27.81 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
1,074.00
(0.00%)Baseline: 1,074.00
1,084.74
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_benchmark_compile📈 view plot
🚷 view threshold
10.91 x 1e3
(0.00%)Baseline: 10.91 x 1e3
11.02 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
308.00
(0.00%)Baseline: 308.00
311.08
(99.01%)
tests/benchmarks/test_queue_push_pop.py::test_queue_push_pop_benchmark_compile📈 view plot
🚷 view threshold
14.84 x 1e3
(0.00%)Baseline: 14.84 x 1e3
14.99 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
435.00
(0.00%)Baseline: 435.00
439.35
(99.01%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Helios-specific frontend configuration support by introducing a new guppylang.std.qsystem.helios module that writes Helios platform options into compiled HUGR module metadata, along with integration tests validating default/custom configuration and input validation.

Changes:

  • Added guppylang.std.qsystem.helios with set_platform_config and HELIOS_CONFIG_META_KEY for attaching Helios config metadata to compiled HUGRs.
  • Extended qsystem integration tests to verify metadata contents for default/custom configurations and to validate rejection of invalid dd_threshold.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/integration/test_qsystem.py Adds integration tests asserting Helios platform config metadata is set correctly and invalid values are rejected.
guppylang/src/guppylang/std/qsystem/helios.py Introduces Helios-specific API to attach configuration metadata to compiled HUGR modules/packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread guppylang/src/guppylang/std/qsystem/helios.py Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.99%. Comparing base (07d0ed4) to head (aab2240).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1807   +/-   ##
=======================================
  Coverage   92.99%   92.99%           
=======================================
  Files         135      136    +1     
  Lines       13068    13079   +11     
=======================================
+ Hits        12152    12163   +11     
  Misses        916      916           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 3, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing gh-helios-config (aab2240) with main (07d0ed4)

Open in CodSpeed

Copy link
Copy Markdown
Contributor

@nicolaassolini-qntm nicolaassolini-qntm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for me, only a little change

squash_rxys=False,
enable_replay=True,
dd_threshold=-1,
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually use the tests/error folder for test errors

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.

4 participants