[Circuit renderer] Compact rendering of classically controlled gate - #3665
Open
Dima Fedoriaka (fedimser) wants to merge 6 commits into
Open
[Circuit renderer] Compact rendering of classically controlled gate#3665Dima Fedoriaka (fedimser) wants to merge 6 commits into
Dima Fedoriaka (fedimser) wants to merge 6 commits into
Conversation
Dima Fedoriaka (fedimser)
force-pushed
the
fedimser/clas-control-3
branch
from
August 28, 2026 18:59
942c95f to
7c92b3e
Compare
Dima Fedoriaka (fedimser)
marked this pull request as ready for review
August 28, 2026 19:16
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.
ControlRegisterto represent a register (classical or quantum) that is used to as control to a gate.ControlRegisterisRegisterplus booleaninverted.Unitary.controlsnow is a vector ofControlRegisterand can contain both classical and quantum registers.ControlRegisterextendsRegisterin typescript rathe than wrapping it - this is done for backwards compatibility. Even though we changed type ofcontrols, JSON looks exactly the same and old .qsc files will be correctly parsed.ControlRegister.invertedcontrols with a hollow control dot (done with CSS).Example 1 - teleportation
Before:

After:

Example 2
Example 3 - negative cases (complex condition, 2-qubit gate).