Skip to content

fixed issue 4022 by updating matplotlib drawer and reference test images#4087

Closed
cognitivecomp wants to merge 3 commits intoQiskit:masterfrom
cognitivecomp:fixissue4022branch
Closed

fixed issue 4022 by updating matplotlib drawer and reference test images#4087
cognitivecomp wants to merge 3 commits intoQiskit:masterfrom
cognitivecomp:fixissue4022branch

Conversation

@cognitivecomp
Copy link

Summary

Fixes #4022

Details and comments

Circuits drawn using circuit.draw(output='mpl') previously cut off the "m" in the label "measure" when the circuit includes the command circuit.measure_all(). This PR changes the horizontal spacing such that the "m" is fully visible.

The horizontal spacing is determined by the formula for x_offset. Adjusting the value in the formula from 0.18 to 0.3 was done to be on the safe side (a value of 0.28 seems to be just enough so that the "m" is no longer cut off). This formula should probably be tweaked further in the future - that will also depend on whether the horizontal spacing should be dynamic or static (i.e. providing maximum space for the longest label even when a circuit does not have that longest label). Currently, the value of len_longest_label in the formula is 9, the "longest label" being ${q}_{0}$.

@1ucian0 1ucian0 requested a review from a team as a code owner June 12, 2020 00:06
@1ucian0 1ucian0 added the on hold Can not fix yet label Jun 12, 2020
@1ucian0
Copy link
Member

1ucian0 commented Jun 25, 2020

We are moving away from this way of testing after #4544

Any help moving the tests to this systems is welcomed :)

Closing this PR in the favor of #4544

@1ucian0 1ucian0 closed this Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold Can not fix yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"M" in measure is cutoff for MPL circuits

2 participants

Comments