Repository navigation
Conversation
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.
Hi team, this issue is part of a batch from our review of bartiq at Marqov. We routinely review quantum computing tools that our community requests or that we’re exploring for integration with the Marqov SDK and Platform. We’re sharing these findings, reproductions, and proposed fixes in the hope they’re useful. There’s no expectation of an immediate response, and we can maintain any patches we need in our own fork while using the software.
Description
Compiling an exact resource count supplied as a string can silently change its value:
9007199254740993becomes9007199254740990. Exact powers and arithmetic on large assigned inputs are affected too. The backend approximates a SymPy integer withN()before converting it to a native integer.Return exact SymPy integers as Python integers before numerical approximation. This fixes expressions SymPy has reduced to an exact integer. Unevaluated sums and noninteger rational expressions retain their current approximation behavior. Regression tests cover positive and negative large integers, exact powers, compilation/export, and evaluation of
N+1with a large input.Validation:
MYPYPATH=src poetry run mypy src --install-types --non-interactive: passes with the lockfile's mypy 1.16.1.poetry run pre-commit run -a: passes.1b7a94b; independently reran the full suite and core-only symbolic/compiler tests.Please verify that you have completed the following steps