forked from rigetti/pyquil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul Quil to LaTeX circuit generation (rigetti#1074)
- Loading branch information
Showing
15 changed files
with
1,022 additions
and
702 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Visualization | ||
============= | ||
|
||
pyQuil programs may be converted to LaTeX circuit diagrams, or even rendered immediately in a Jupyter Notebook. The main entry point of LaTeX generation is :py:func:`~pyquil.latex.to_latex`. For inline rendering in a notebook, the main entry point is :py:func:`~pyquil.latex.display`. | ||
|
||
|
||
Both of these functions take an optional :py:class:`~pyquil.latex.DiagramSettings`, which may be used to control some aspects of circuit layout and appearance. | ||
|
||
.. currentmodule:: pyquil.latex | ||
.. autoclass:: DiagramSettings | ||
|
||
.. rubric:: Attributes | ||
.. autosummary:: | ||
:template: autosumm.rst | ||
|
||
~DiagramSettings.texify_numerical_constants | ||
~DiagramSettings.impute_missing_qubits | ||
~DiagramSettings.label_qubit_lines | ||
~DiagramSettings.abbreviate_controlled_rotations | ||
~DiagramSettings.qubit_line_open_wire_length | ||
~DiagramSettings.right_align_terminal_measurements | ||
|
||
.. autofunction:: to_latex | ||
.. autofunction:: display |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
from pyquil.latex.latex_generation import to_latex | ||
from pyquil.latex._diagram import DiagramSettings | ||
from pyquil.latex._ipython import display |
Oops, something went wrong.