refactor!: make ancillas argument optional, rename to n_impl_ancillas - #412
Merged
Merged
Conversation
|
This PR contains breaking changes to the public Python API. Breaking changes summary |
CalMacCQ
commented
Sep 17, 2026
| # Get the k stabilizers for the k qubit state. | ||
| semantic_stabilizers = _compute_stabilizers_single_block_state( | ||
| semantic_function, # type: ignore[arg-type] | ||
| code_definition.n_logical_qubits + n_ancillas, |
Contributor
Author
There was a problem hiding this comment.
This n_ancillas arg should not actually have been passed here. Ancillas only make sense for the simulation with the impl_function. I'll link a thread that explains this.
hsemenenko
approved these changes
Sep 17, 2026
Merged
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.
This PR splits off the breaking change from #328 so we can release 0.2 without waiting for the issues with that PR to be resolved.
BREAKING CHANGE:
valid_stabilizer_state_preparationandvalid_clifford_implementationis renamed ton_impl_ancillasto emphasise that ancillas only really make sense in theimpl_functionint | None(Noneby default) rather thanint(0 by default)