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

Add option to user config to control idle_wires in circuit drawer #12462

Merged
merged 5 commits into from
Jun 12, 2024

Conversation

1ucian0
Copy link
Member

@1ucian0 1ucian0 commented May 27, 2024

Summary

Inspired by #12361 and based on #9211 (co-authorship included).

Closes #11317 and other unrelated formatting issues.

Details and comments

This PR adds the option circuit_idle_wires to the user config file to modify the default behavior of the idle_wires option in the circuit_drawer. For example, the following configuration in the settings.conf file:

[default]
circuit_drawer = mpl
state_drawer = latex
circuit_idle_wires = false

the circuit drawer wont display idle wires when called without any parameter.

@1ucian0 1ucian0 requested review from nonhermitian and a team as code owners May 27, 2024 11:29
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

Comment on lines -1159 to -1161
# We need a second run of BasisTranslator to correct gates outside of
# the target basis. This is a known isssue, see:
# https://docs.quantum.ibm.com/api/qiskit/release-notes/0.33#known-issues
Copy link
Member Author

Choose a reason for hiding this comment

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

unrelated to the issue. Just too small to deserve its own PR

@coveralls
Copy link

coveralls commented May 27, 2024

Pull Request Test Coverage Report for Build 9479023804

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • 9 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 89.593%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
crates/qasm2/src/lex.rs 8 92.11%
Totals Coverage Status
Change from base Build 9469441886: 0.02%
Covered Lines: 62524
Relevant Lines: 69787

💛 - Coveralls

Copy link
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

LGTM, can approve once CI passes.

qiskit/visualization/circuit/circuit_visualization.py Outdated Show resolved Hide resolved
@1ucian0 1ucian0 added this to the 1.2.0 milestone Jun 12, 2024
@1ucian0 1ucian0 enabled auto-merge June 12, 2024 08:26
@1ucian0 1ucian0 added this pull request to the merge queue Jun 12, 2024
Merged via the queue into Qiskit:main with commit b933f6d Jun 12, 2024
15 checks passed
@ElePT ElePT added the Changelog: New Feature Include in the "Added" section of the changelog label Jul 31, 2024
Procatv pushed a commit to Procatv/qiskit-terra-catherines that referenced this pull request Aug 1, 2024
…iskit#12462)

* Add option to user config to control idle_wires in circuit drawer

Co-Authored-By: diemilio <[email protected]>

* docs

* 11339

* Update qiskit/visualization/circuit/circuit_visualization.py

Co-authored-by: Elena Peña Tapia <[email protected]>

---------

Co-authored-by: diemilio <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
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.

4 participants