fixed issue 4022 by updating matplotlib drawer and reference test images#4087
Closed
cognitivecomp wants to merge 3 commits intoQiskit:masterfrom
Closed
fixed issue 4022 by updating matplotlib drawer and reference test images#4087cognitivecomp wants to merge 3 commits intoQiskit:masterfrom
cognitivecomp wants to merge 3 commits intoQiskit:masterfrom
Conversation
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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}$ .