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

Convert a directed multigraph to tape #2165

Merged

Conversation

anthayes92
Copy link
Contributor

Context:
In the circuit cutting pipeline, once we have the subgraphs corresponding to the circuit fragments we must then to convert these to tapes in order to execute them.

Description of the Change:
A method for converting directed multigraphs to tapes has been added.

Benefits:
Facilitates circuit cutting.

anthayes92 and others added 30 commits January 17, 2022 15:25
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
@anthayes92
Copy link
Contributor Author

not sure about the CodeFactor error for the missing docstring in qchem_ops.py#L600, seems to have somehow slipped into master!

Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @anthayes92! Looking at the code, I'm not sure the subscript approach is worth the added logic and suggest we consider going back to the original approach.

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
pennylane/transforms/qcut.py Outdated Show resolved Hide resolved
pennylane/transforms/qcut.py Outdated Show resolved Hide resolved
pennylane/transforms/qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Show resolved Hide resolved
tests/transforms/test_qcut.py Show resolved Hide resolved
Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @anthayes92! This is looking good, I have a few more comments/suggestions to be resolved but happy to approve once done.

pennylane/transforms/qcut.py Outdated Show resolved Hide resolved
pennylane/transforms/qcut.py Outdated Show resolved Hide resolved
pennylane/transforms/qcut.py Show resolved Hide resolved
pennylane/transforms/qcut.py Outdated Show resolved Hide resolved
pennylane/transforms/qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Outdated Show resolved Hide resolved
tests/transforms/test_qcut.py Show resolved Hide resolved
Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Approved, although would still like to resolve this comment end potentially remove test_non_unique_node_order unless it is different to test_graph_to_tape. Thanks @anthayes92!

@anthayes92 anthayes92 merged commit c13cb47 into master Feb 16, 2022
@anthayes92 anthayes92 deleted the sc-13394-a-user-can-convert-a-multigraph-to-a-quantum branch February 16, 2022 14:43
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