Repository navigation
Conversation
…oad_guppy_circuit
Contributor
|
| Project | guppylang |
| Branch | acl/test_optimization |
| Testbed | Linux |
Click to view all benchmark results
| Benchmark | hugr_bytes | Benchmark Result bytes x 1e3 (Result Δ%) | Upper Boundary bytes x 1e3 (Limit %) | hugr_nodes | Benchmark Result nodes (Result Δ%) | Upper Boundary nodes (Limit %) |
|---|---|---|---|---|---|---|
| tests/benchmarks/test_big_array.py::test_big_array_compile | 📈 view plot 🚷 view threshold | 59.84 x 1e3(0.00%)Baseline: 59.84 x 1e3 | 60.44 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 4,514.00(0.00%)Baseline: 4,514.00 | 4,559.14 (99.01%) |
| tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile | 📈 view plot 🚷 view threshold | 26.87 x 1e3(0.00%)Baseline: 26.87 x 1e3 | 27.14 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 1,182.00(0.00%)Baseline: 1,182.00 | 1,193.82 (99.01%) |
| tests/benchmarks/test_queue_push_pop.py::test_queue_push_benchmark_compile | 📈 view plot 🚷 view threshold | 6.70 x 1e3(0.00%)Baseline: 6.70 x 1e3 | 6.77 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 279.00(0.00%)Baseline: 279.00 | 281.79 (99.01%) |
| tests/benchmarks/test_queue_push_pop.py::test_queue_push_pop_benchmark_compile | 📈 view plot 🚷 view threshold | 9.22 x 1e3(0.00%)Baseline: 9.22 x 1e3 | 9.31 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 371.00(0.00%)Baseline: 371.00 | 374.71 (99.01%) |
Merging this PR will not alter performance1 warning
Comparing |
acl-cqc
force-pushed
the
acl/test_optimization
branch
from
November 10, 2026 21:55
5b36adf to
f91b6c0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2522 +/- ##
==========================================
+ Coverage 93.36% 93.40% +0.04%
==========================================
Files 167 167
Lines 16947 17050 +103
==========================================
+ Hits 15823 15926 +103
Misses 1124 1124 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
acl-cqc
commented
Nov 11, 2026
| @@ -0,0 +1,569 @@ | |||
| """Tests optimizing Hugrs generated offline by Guppy programs.""" | |||
|
|
|||
| # ALAN TODO Should be integrated into either tests/test_optimization.py | |||
Contributor
Author
There was a problem hiding this comment.
Thoughts here? I was a bit unclear about why tests/test_optimization.py wasn't already in tests/integration/...
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modelled on Quantinuum/tket2#2144 but without the offline generation or Hugrs from older versions of guppy: the idea is to detect if we change guppy in a way that breaks optimization.
The other idea was that we'd use standard
OptimizationLevel.Defaultcode already in guppy to drive the optimizer, rather than tket2'stest_guppy_opt.pyhaving its own code to drive what optimizations to do, which I expected to largely duplicate guppylang's OptimizationLevel. Turns out tket2 uses pytketCliffordSimprather than theRemoveRedundanciesused byOptimizationLevel.Default, but in many cases either works, so there is some difference vs the tket2 tests here.