Skip to content
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

Remove OpType::Collapse from gen_auto_rebase_pass GateSetPredicate #1685

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

sjdilkes
Copy link
Contributor

@sjdilkes sjdilkes commented Nov 19, 2024

OpType::Collapse isn't available at the python layer - there is no OpType.Collapse - and is not a supported operation in any Backends we have. Currently, I don't think it's even possible to construct a pytket Circuit with Collapse operations, having briefly looked through where it is used.

However, it's proving a blocker on SequencePass construction in some places. As an example, GreedyPauliSimp supports all the OpType required to compile to qiskit & quantinuum hardware, but if added to a SequencePass after an AutoRebasePass, the SequencePass construction fails due to OpType::Collapse always being included in the GateSetPredicate.

Checklist

  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@sjdilkes sjdilkes marked this pull request as ready for review November 19, 2024 11:44
Copy link
Collaborator

@cqc-alec cqc-alec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, please update the documentation of AutoRebase in the binders as well.

@cqc-alec
Copy link
Collaborator

Sorry, please update the documentation of AutoRebase in the binders as well.

And auto_rebase_pass() (even though it's deprecated).

@sjdilkes
Copy link
Contributor Author

Sorry, please update the documentation of AutoRebase in the binders as well.

And auto_rebase_pass() (even though it's deprecated).

done both!

@sjdilkes sjdilkes merged commit eb7d846 into main Nov 19, 2024
32 checks passed
@sjdilkes sjdilkes deleted the remove-collapse-autorebase branch November 19, 2024 16:01
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.

2 participants