Skip to content

Remove supports_decompose_bloq #1382

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

Merged

Conversation

mpharrigan
Copy link
Collaborator

@mpharrigan mpharrigan commented Sep 3, 2024

This method was unreliable and the source of bugs

fixes #670

Its main legitimate use case was for flattening bloqs as much as possible, but this is now the default behavior and does not require a predicate.

Otherwise, we embrace the python mantra of asking for forgiveness rather than permission: try decomposing the bloq (or just calling the method that will try to decompose the bloq) and catch (DecomposeTypeError, DecomposeNotImplementedError).

@mpharrigan mpharrigan enabled auto-merge (squash) September 4, 2024 23:41
@mpharrigan mpharrigan merged commit 7e318f2 into quantumlib:main Sep 5, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GateWithRegisters supports_decompose_bloq returns false when a Cirq decomposition is specified
2 participants