Add section on parallel execution semantics#149
Draft
acl-cqc wants to merge 3 commits into
Draft
Conversation
|
Hey there and thank you for opening this pull request! 👋 We follow the Conventional Commits convention for PR titles. It looks like your title needs some adjustment. The title should have a type prefix, followed by a colon. The most important ones are:
If the PR contains a breaking change, use You may also include a Expand this message for the full list of tags.
|
acl-cqc
commented
Jun 30, 2026
| ``` | ||
| seeing the message "Index was...." does not necessarily mean that the array access succeeded and thus that i==0; it could also occur for out-of-range i<0. | ||
|
|
||
| <!-- on copyable-element arrays, `take` compiles to `get`, |
Author
There was a problem hiding this comment.
this is just a note, doesn't need to go in
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.
closes #143
Note very much DRAFT
Added as a section of
python_differences.mdbut might want to be a separate document. Can read here: https://github.com/Quantinuum/guppy-docs/blob/acl/parallel_semantics/sphinx/language_guide/python_differences.md#parallel-execution-semanticsExpectations of future releases
I'm assuming that we'll consider a change to the spec (i.e. allowing more reordering) as breaking, but have included a documentation of the v1.0 release with the intention that we can change that behaviour (within the bounds of the parent section) without considering it breaking. Unsure if this is the right approach...
...e.g. a "rolling breakage" model like that proposed for the standard library might be better, although deprecation here is not really practical (we can't tell when people are relying on particular semantics).
Content
I've stated panics can be reordered. I have not said anything specifically about
qalloc; by implication, this meansqallocvs, say, an array indexing op, and get an "unexpected" change to panic messageqallocvs each other. My justification here is that currently the following program fails on an emulator with only one qubit:qalloc(); qalloc()- and it fails with a messageguppylang.emulator.exceptions.EmulatorError: Panic (#1001): No more qubits available to allocate.- that is, we're (predictably) panicking, and the message does not specify whichqallocfailed, so there is no possibility of surprise even there.But, I have not said
qallocs can be reordered vs.qfree- should I explicitly clarify that this cannot happen?Re. documented behaviour of 1.0 release, I've investigated the hugrs for a few examples and think this is correct but please shout out if you think otherwise.