test: start adding integration tests for optimization on Guppy generated hugr programs#1384
test: start adding integration tests for optimization on Guppy generated hugr programs#1384
Conversation
|
Hmm these tests all pass the precommit check locally but there seems to be an issue with importing |
|
| Branch | cm/guppy_opt_integration_tests |
| 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 | 143.70 x 1e3(0.00%)Baseline: 143.70 x 1e3 | 145.13 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 6,590.00(0.00%)Baseline: 6,590.00 | 6,655.90 (99.01%) |
| tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile | 📈 view plot 🚷 view threshold | 21.67 x 1e3(0.00%)Baseline: 21.67 x 1e3 | 21.89 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 606.00(0.00%)Baseline: 606.00 | 612.06 (99.01%) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1384 +/- ##
=======================================
Coverage 93.55% 93.55%
=======================================
Files 127 127
Lines 11389 11389
=======================================
Hits 10655 10655
Misses 734 734 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fixed, I needed to ensure that a recent enough version of the This version bump should probably be mentioned explicitly in the changelog. |
There was a problem hiding this comment.
Pull request overview
This PR introduces integration tests to validate that TKET optimization passes correctly transform Guppy-generated HUGR programs. The tests cover basic optimizations like normalization, redundant gate cancellation, and Clifford simplification.
Key changes:
- Added new test file with three integration tests for TKET optimization on Guppy programs
- Updated test dependencies to include
tket~=0.12.13
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/integration/tket_opt/test_opt.py | Implements three integration tests validating TKET optimization passes on Guppy-generated quantum circuits |
| pyproject.toml | Adds tket package as a test dependency with version constraint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
I've started adding some basic tests that validate that
tketoptimizations transform guppy programs as expected. This is part of #1383Note that some key use cases are not supported yet including
tketthis will be fixed.Once these limitations are removed I think it would be good to add test cases for the above as well.