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

Make RebaseCustom more serialisable #1311

Closed
yao-cqc opened this issue Mar 25, 2024 · 0 comments · Fixed by #1410
Closed

Make RebaseCustom more serialisable #1311

yao-cqc opened this issue Mar 25, 2024 · 0 comments · Fixed by #1410
Assignees

Comments

@yao-cqc
Copy link
Contributor

yao-cqc commented Mar 25, 2024

Most of the backends now rely on RebaseCustom and RebaseSquash passes. Since these two passes take a circuit-to-circuit function (e.g. basis_tk2_replacement) as an argument, they can't be completely serialised. This behaviour makes some of our default passes non-(de)serialisable. However, since these circuit-to-circuit functions are usually built-in functions (e.g. TK2_using_CX) in tket, we should be able to make them more serialisable. One possible way is to override RebaseCustom and RebaseSquash to take an enum that points to one of the built-in functions.

Note that some TK1 transformations are implemented in python in _decompositions.py, which might make things trickier...

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 a pull request may close this issue.

1 participant