-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add get_current_shot
to qsystem module
#798
Labels
ci
CI / devops
Comments
qartik
added a commit
that referenced
this issue
Feb 12, 2025
qartik
added a commit
that referenced
this issue
Feb 17, 2025
qartik
added a commit
that referenced
this issue
Feb 21, 2025
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 21, 2025
Closes: #798 It's not clear to me whether the type in tket2-hseries for `get_current_shot()` should be `usize` or `int(6)`. I used usize initially but got the following runtime error during json validation (`[] -> [tket2.qsystem.utils][usize] but stored signature was [] -> [tket2.qsystem.utils][int(6)]`): ```py tests/integration/conftest.py:64: in validate_impl validate_json(js) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hugr = '{"modules":[{"version":"live","nodes":[{"parent":0,"op":"Module"},{"parent":0,"op":"FuncDefn","name":"test","signatur..."i":1,"b":"A"}],"output":[{"t":"R","i":2,"b":"A"}],"runtime_reqs":["guppylang"]}},"binary":false,"lower_funcs":[]}}}]}' def validate_json(hugr: str): # Executes `cargo run -p validator -- validate -` # passing the hugr JSON as stdin p = subprocess.run( # noqa: S603 [validator, "validate", "-"], text=True, input=hugr, capture_output=True, ) if p.returncode != 0: > raise RuntimeError(f"{p.stderr}") E RuntimeError: Error parsing package: Error resolving opaque operation: Conflicting signature: resolved GetCurrentShot in extension tket2.qsystem.utils to a concrete implementation which computed [] -> [tket2.qsystem.utils][usize] but stored signature was [] -> [tket2.qsystem.utils][int(6)] ``` I [changed the signature](CQCL/tket2@a173d44) to use `int(6)`, which then made the types compatible.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lowers to tket2 extension: CQCL/tket2#767
The text was updated successfully, but these errors were encountered: