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

Fix depth and ascii diagrams for circuits with overlapping multi-qubi… #44

Merged
merged 2 commits into from
Mar 6, 2020

Conversation

avawang1
Copy link
Contributor

@avawang1 avawang1 commented Mar 6, 2020

…t gates

*Issue #, if available: N/A

*Description of changes: Fix depth and ASCII diagrams for circuits with overlapping multi-qubit gates. Previously overlapping multi-qubit gates e.g. Circuit().cnot(0,2).cnot(1,3) had depth 2 when the circuit should have depth of 1. Also, ASCII diagram for this circuit showed each gate was in different times 0 and 1 when both gates should be time 0. Added unit tests for change.

build_files.tar.gz

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@avawang1 avawang1 requested a review from floralph March 6, 2020 21:53
@@ -28,7 +28,7 @@ def build_diagram(circuit) -> str:
Build an ASCII string circuit diagram.

Args:
circuit (Circuit): Circuit to build a diagram of.
circuit (Circuit): Circuit to build a diagram.
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be "Circuit for which to build a diagram"? :P

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is more grammatically correct - will change then merge.

@avawang1 avawang1 merged commit ab63ab5 into master Mar 6, 2020
@avawang1 avawang1 deleted the overlapping branch March 6, 2020 23:35
shiyunon pushed a commit to shiyunon/amazon-braket-sdk-python that referenced this pull request Mar 9, 2021
kshitijc pushed a commit that referenced this pull request Nov 29, 2021
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.

3 participants