Repository navigation
Conversation
This changes the default background to be transparent instead of the current mix of SVG default (black) and some elements having white.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8583 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 1139 1139
Lines 105740 105771 +31
=======================================
+ Hits 105303 105336 +33
+ Misses 437 435 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
mhucka
marked this pull request as ready for review
December 2, 2026 09:27
mhucka
requested review from
NoureldinYosri,
arettig,
dabacon,
dstrain115,
mpharrigan and
pavoljuhas
and removed request for
NoureldinYosri
December 2, 2026 09:28
Contributor
|
I agree that the qubit labels hack should be fixed, but shouldn't the boxes have a background? imagine putting a circuit on a slide with a textured background or something |
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.




Change the SVG output code to specify a transparent background, instead of the current mix of SVG default (black) and some elements having white.
Achieving this turned out to be more involved than simply specifying something like
fill=nonein the SVG constructs. Previously, the SVG code drew horizontal and vertical wires continuously through the centers of qubit labels and gate boxes, relying on opaquefill="white"<rect>elements (including borderlessstroke-width="0"rectangles behind qubit labels) to cover up the overlapping wire sections. To make backgrounds transparent without wires striking through labels or gate text, the new_rectcode now defaults tofill="none", qubit labels (xi == 0) omit their backing<rect>altogether, and a new_render_entrieshelper renders entries first while recording per-row and per-column bounding-box cutouts for every gate box and qubit label. It leaves pass-through symbols@,×, and''unclipped. Before emitting<line>elements,tdd_to_svgpasses each horizontal and vertical wire span through a new_subtract_intervalshelper that splits the wire into segments stopping cleanly at box edges, then places the clipped lines ahead of the entries so paint order is preserved.