-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flag to latex drawer to enable label passthrough
This commit adds a new flag latex_labels to the circuit_drawer for use with the latex and latex_source drawer. When it is set to true it disables the pylatexenc conversion from unicode input to a latex encoding. This enables users who want to manual create gate names that are properly latex encoded (for example to have gate names with subscripts) to do so. Fixes #3171
- Loading branch information
Showing
4 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
features: | ||
- | | ||
A new boolean kwarg flag, ``latex_labels``, has been added to | ||
``qiskit.visualization.circuit_drawer`` and ``qiskit.QuantumCircuit.draw``. | ||
This flag only is used by the ``latex`` and ``latex_source`` circuit drawer | ||
backends. When set on all other backends it will be ignored. When this flag | ||
is set to ``True`` with the latex drawers it will disable the automated | ||
conversion of input gate names from unicode to a latex encoding. This | ||
enables users who want to manually format gate names for rendering in latex | ||
to do so. |