Fold long circuit drawings
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- developer-experience
Research direction
Start by locating _drawer.py and reading the shortcut: note mentioned in the issue, then trace how print(qc) and qc.draw render circuit operations. The issue proposes terminal-width folding and packing non-overlapping gates into columns; done means long drawings wrap and gates on separate qubits share columns, with fold=None disabling folding.
Written by the indexing model from the issue text.
Description
What you want to do
print(qc) draws one column per operation and never wraps, so a circuit with a hundred gates is
one line hundreds of characters wide. _drawer.py notes this as a shortcut:.
Implementation notes
Also pack gates on qubits that don't overlap into the same column, which shortens most drawings a lot.
What it could look like
print(qc) # folds at the terminal width
qc.draw(fold=80) # explicit width; fold=None for no folding
Contributing
- I would like to open a pull request for this (see CONTRIBUTING.md).
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- Avg merge
- 12m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kaiwave/qsengine
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in kaiwave/qsengine
Similar issues
-
bug order-flow studies ui
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
userFRM/egui-charts#2417 ·
Maintainers usually reply within 1 day
-
In a plain-text message, Font, Font Size, Font Color and Text Highlight Color stay livePossibly taken @ragelfundionctrumnar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UCS-Care-Group/mailcraft#862 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
smoltcp-rs/smoltcp#1243 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day