Repository navigation
chore: update variance metrics key names and value precision - #393
Merged
Merged
Conversation
sajidkakroo-qntm
requested review from
DanielNevilleCQ,
ferbetanzo and
gsangiolo
October 6, 2026 15:17
sajidkakroo-qntm
force-pushed
the
saj/fix_test_metrics
branch
from
October 6, 2026 15:22
85e57e7 to
e6cd158
Compare
ferbetanzo
approved these changes
Oct 7, 2026
| def approx(expected: int | float) -> Comparison: | ||
| return Comparison( | ||
| lambda a: (type(a) is int or type(a) is float) and abs(a - expected) <= 1e-10, | ||
| f"≈ {expected} (up to 10 decimal places)", |
Contributor
There was a problem hiding this comment.
I'm not sure if we should wait for the Selene devs to comment on whether the 1 ULP difference is expected or not. It might be that a certain precision is part of the requirements, or could also come from the LLVM lowering...
Contributor
There was a problem hiding this comment.
On the other hand, if these are experimental, then it's probably fine to just do an approximate comparison... 🤷🏼♂️
Collaborator
Author
There was a problem hiding this comment.
Yep, I think let's merge it since it's just for the experimental metrics.
I will keep an eye out and update accordingly based on the response from the Selene devs.
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.
Update:
Hugr program change: https://github.com/Quantinuum/qnexus/pull/385/changes#diff-5ba2245ca8f035a387b3d90006285eacae1a9adec5913b0a75342b7f3a529c4c
Here are the examples showing the jump from 15 to 16 decimal digits for
RXY_PHI_VARIANCE