Commit 891e452
Add new Quantikz rendering modules and enhance existing functions for visualization (#7354)
Feature(vis): Enhance circuit_to_latex_render and GIF creation
This PR introduces `cirq.contrib.quantikz` with the `render_circuit`
function
to produce circuit diagrams in LaTeX using the quantikz package.
The functionality is showcased and described here: in this Jupyter
notebook
https://drive.google.com/file/d/1KXQjBmQ9rNUjZHJ6QuGolthLN19_K9yK/view?usp=drivesdk
(colab:
https://colab.sandbox.google.com/drive/1KXQjBmQ9rNUjZHJ6QuGolthLN19_K9yK)
**Notes on `render_circuit`:**
* Performs upfront checks for `pdflatex` and `pdftoppm` executables.
Issues informative warnings and disables relevant functionality if they
are not found, preventing unexpected failures.
* If `pdflatex` fails and an `output_tex_path` is specified, the
problematic `.tex` file is copied to the specified path for easier user
inspection.
Example outputs:





---------
Co-authored-by: Doug Strain <dstrain@google.com>
Co-authored-by: Michael Hucka <mhucka@caltech.edu>
Co-authored-by: Pavol Juhas <juhas@google.com>1 parent d69b437 commit 891e452
File tree
5 files changed
+1422
-0
lines changed- cirq-core/cirq/contrib/quantikz
5 files changed
+1422
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments