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

Feature/conjugation box #984

Merged
merged 10 commits into from
Aug 29, 2023
Merged

Feature/conjugation box #984

merged 10 commits into from
Aug 29, 2023

Conversation

yao-cqc
Copy link
Contributor

@yao-cqc yao-cqc commented Aug 24, 2023

Adds ConjugationBox to capture any compute-action-uncompute pattern.
By default, uncompute will be derived from compute, but the user has the ability to provide a custom operation.
The current pytket interface has some limitation therefore the three operations need to have the same number of qubits.

@yao-cqc yao-cqc marked this pull request as ready for review August 29, 2023 08:42
@yao-cqc yao-cqc requested a review from sjdilkes August 29, 2023 08:42
Copy link
Contributor

@sjdilkes sjdilkes left a comment

Choose a reason for hiding this comment

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

The code all looks great. Do you think it's worth adding case handling for QControlBox with this new conjugation box to only control on the action in this PR? It's the obvious functionality that this gives benefit to.

Similarly, PauliExpBox could be considered a child of this new box type, do you think its easy to update PauliExpBox to have a similar structure and benefit from quantum control off only the action (i.e. rotation)?

@yao-cqc
Copy link
Contributor Author

yao-cqc commented Aug 29, 2023

The code all looks great. Do you think it's worth adding case handling for QControlBox with this new conjugation box to only control on the action in this PR? It's the obvious functionality that this gives benefit to.

Similarly, PauliExpBox could be considered a child of this new box type, do you think its easy to update PauliExpBox to have a similar structure and benefit from quantum control off only the action (i.e. rotation)?

Yeah, I plan to do these things in separate PR(s). The QControlBox still need some changes for this to work. One possible solution is to overload the decompose_boxes method so it can stop the recursion at certain boxes (ConjugationBox in this case) so the QControlBox can spot the ConjugationBoxes.

@yao-cqc yao-cqc merged commit d3b783c into develop Aug 29, 2023
33 checks passed
@yao-cqc yao-cqc deleted the feature/ConjugationBox branch August 29, 2023 13:04
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