Enlarge the character glyph set for nicer-looking diagrams
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 22/100
Research direction
The discussion centres on the character lookup tables (Normal, Bold, Doubled, ASCII and NORMAL_THEN_DOUBLED_MIXED_BOX_CHARS) and the pick_charset() function, which is where the optional style parameters would go. Read those first to see how the existing tables are keyed. Done means the maintainers have agreed on which styles to add and how the tables are organised, before any implementation starts.
Written by the indexing model from the issue text.
Description
Is your design idea/issue related to a use case or problem? Please explain
Currently, the character glyph set used for text diagrams is limited to the existing character sets (Normal, Bold, Doubled, and ASCII). Expanding the available glyphs could allow for more visually appealing and customizable diagrams. This request is related to a request discussed previously with the Cirq maintainers (with our club, the Disruption Lab at UIUC).
Describe your design idea/issue
I propose expanding the available character glyphs to include rounded corners, dashed lines, and additional characters such as dots.
There are a few design decisions I'd like to discuss before implementing this:
-
Which characters and styles should we support?
- I'm currently planning to add rounded corners, dashed lines, and some additional characters (e.g., dots).
- Are there any other characters or styles that would be useful?
-
How should the new characters be organized?
- Should we introduce new lookup tables for the additional styles?
- Alternatively, should we extend the existing lookup tables (Normal, Bold, Doubled, and ASCII) to include these characters?
-
How should we handle missing Unicode characters?
- NORMAL_THEN_DOUBLED_MIXED_BOX_CHARS currently has missing entries because Unicode does not provide characters for certain combinations of single and double lines.
- Should we leave these entries as they are, or consider alternative representations?
Proposed implementation
My current plan is to introduce new lookup tables for rounded corners, dashed lines, and any other agreed-upon styles. I would also extend pick_charset() with optional parameters to select these styles while preserving the existing default behavior.
I'd appreciate feedback on the proposed approach, particularly which styles to support and how best to organize the lookup tables.
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 48
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 quantumlib/Cirq
-
Potential missed optimization: `drop_diagonal_before_measurement` leaves an identity `PhasedXZGate` that blocks further removalPossibly taken @jangyoujin0917 claimed this 22 days ago. Openarea/gates area/optimization kind/feature-request triage/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
quantumlib/Cirq#8523 · 1 comment ·
Maintainers usually reply within 1 day
-
`defer_measurements` ignores `BitMaskKeyCondition.index` and changes circuit behaviorMay be free again @Tejendra-06 claimed this 54 days ago, and no pull request is open. Opengood for learning help wanted kind/bug-report skill/experienced triage/accepted triage/wont-fix
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
quantumlib/Cirq#8361 · 8 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
kind/feature-request triage/discuss
quantumlib/Cirq#8598 ·
Maintainers usually reply within 1 day
-
area/docstrings area/google kind/bug-report triage/discuss
Difficulty 1/5 1-3 hours Newbie friendliness 91/100
quantumlib/Cirq#8587 ·
Maintainers usually reply within 1 day
-
kind/bug-report triage/discuss
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
quantumlib/Cirq#8580 ·
Maintainers usually reply within 1 day
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day