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

Add optimisation level 3 #417

Merged
merged 13 commits into from
Nov 20, 2024
Merged

Add optimisation level 3 #417

merged 13 commits into from
Nov 20, 2024

Conversation

sjdilkes
Copy link
Contributor

@sjdilkes sjdilkes commented Nov 19, 2024

Add a new optimisation level to pytket-qiskit that uses GreedyPauliSimp to optimise circuits.

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 20, 2024 10:40
@sjdilkes sjdilkes requested a review from cqc-melf as a code owner November 20, 2024 10:40
Copy link
Collaborator

@cqc-melf cqc-melf left a comment

Choose a reason for hiding this comment

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

few small comments

@@ -11,6 +11,7 @@
- Update default compilation to use `Qiskit` `SabreLayoutPassManager` as a `CustomPass`.
- Fix handling of non-default registers when selecting bits in results.
- The {py:func}`tk_to_qiskit` converter gives a warning if the input {py:class}`~pytket.circuit.Circuit` contains [implicit qubit permutations](https://docs.quantinuum.com/tket/user-guide/manual/manual_circuit.html#implicit-qubit-permutations).
- Add new level 3 optimisation that uses `GreedyPauliSimp`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you move this to 0.60.0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

)
return SequencePass(
[
DecomposeBoxes(),
FullPeepholeOptimise(),
RemoveBarriers(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you removing the barriers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GreedyPauliSimp doesn't support them - I'll update the documentation to make it clear that this optimisation level will remove them

setup.py Outdated
@@ -46,7 +46,7 @@
packages=find_namespace_packages(include=["pytket.*"]),
include_package_data=True,
install_requires=[
"pytket >= 1.34.0",
"pytket == 1.35.0rc2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could do 1.35.0 (please add that to the changelog)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@sjdilkes sjdilkes requested a review from cqc-melf November 20, 2024 18:14
@sjdilkes sjdilkes merged commit fe9f237 into main Nov 20, 2024
6 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.

2 participants