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

Unitary Synthesis of ChoiMixTableau for Diagonalisation (Again) #1320

Merged
merged 8 commits into from
Apr 4, 2024

Conversation

willsimmons1465
Copy link
Contributor

@willsimmons1465 willsimmons1465 commented Apr 2, 2024

Description

#941 implemented a whole bunch of stuff: new features, bug fixes, reorganised code... and some unexpected regression for circuits of pauli gadgets. #1201 reverted the whole PR to temporarily fix the regression. This PR reintroduces the new features, bug fixes, and reorganised code without changing any of the observable behaviour for pytket users.

Related issues

#1199 and #1202.

Note that in #1202, the examples show that both the old and new synthesis methods had situational benefits over each other. The new behaviour would still be available (toggle the allow_matching_final parameter of reduce_overlap_of_paulis), though analysis of which is better for which situation is left for future experimentation (likely best done through naively running with both and comparing effectiveness).

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.

@willsimmons1465 willsimmons1465 requested a review from cqc-alec April 2, 2024 10:41
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.

Looks good, just a tiny question on a comment. Thankfully didn't take too long to review as I was mostly able to visually compare this and the previous reviewed PR.

ChoiMixTableau::col_key_t ctrl = tab.col_index_.right.at(op.first);
ChoiMixTableau::col_key_t trgt = tab.col_index_.right.at(op.second);
in_circ.add_op<Qubit>(OpType::CX, {ctrl.first, trgt.first});
// DEBUG METHOD: Ignore this for coverage checks
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we ignoring it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment was more intended for any developer who is scanning through coverage reports to check for ways to improve their coverage. I don't know of any simple method for ignoring methods from gcovr - if you have any suggestions please let me know! I'd rather not have to lift this entire class structure up to a header and move this to test files, as the class is just a helper utility to perform a single method

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah I see. You should be able to use exclusion markers: https://gcovr.com/en/stable/guide/exclusion-markers.html .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, I have added the markers and checked it ignores it locally. The CI errors seem to be from a quimb update which looks independent from this PR and will need some looking into

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the suggestion, I have added the markers and checked it ignores it locally. The CI errors seem to be from a quimb update which looks independent from this PR and will need some looking into

Ah yes, we had this issue on the pytket-docs repo as well. Should get this fixed ASAP.

@cqc-alec cqc-alec merged commit a2f6fab into develop Apr 4, 2024
30 checks passed
@cqc-alec cqc-alec deleted the feature/choimix_unitary_synth2 branch April 4, 2024 12:53
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