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

Support for cregbundle in text circuit drawer #4274

Merged
merged 20 commits into from
Apr 28, 2020

Conversation

1ucian0
Copy link
Member

@1ucian0 1ucian0 commented Apr 26, 2020

Fixes #2797

qr = QuantumRegister(3, 'q')
cr = ClassicalRegister(3, 'c')
circuit = QuantumCircuit(qr, cr)
circuit.measure(qr, cr)
circuit.draw()  # cregbundle=True by default
        ┌─┐
q_0: |0>┤M├──────
        └╥┘┌─┐
q_1: |0>─╫─┤M├───
         ║ └╥┘┌─┐
q_2: |0>─╫──╫─┤M├
         ║  ║ └╥┘
c: 0  3/═╩══╩══╩═
         0  1  2
  • Clarifies that scale does not affect text.

@ajavadia

This comment has been minimized.

@1ucian0 1ucian0 marked this pull request as ready for review April 27, 2020 20:32
@1ucian0 1ucian0 marked this pull request as draft April 27, 2020 21:32
Luciano Bello added 2 commits April 27, 2020 18:04
@1ucian0 1ucian0 marked this pull request as ready for review April 27, 2020 22:08
@mergify mergify bot merged commit a0b9736 into Qiskit:master Apr 28, 2020
@mtreinish mtreinish added the Changelog: New Feature Include in the "Added" section of the changelog label Apr 29, 2020
@1ucian0 1ucian0 deleted the cregbundle_text branch April 30, 2020 16:35
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* drafting

* size

* layer is cregbundle aware

* test

* expose it in .draw()

* print

* scale docstring

* lint

* test adjustment

* multiple cregs

* lint

* conditional

* lint

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify style across circuit visualizers
3 participants