Skip to content

Commit

Permalink
improve section on image exports
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMacCQ committed Aug 23, 2024
1 parent 34adead commit 732a22e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/manual/tket_tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ See the docs on [circuit composition](https://tket.quantinuum.com/user-guide/man

## 2. How can I export an image of my circuit?

There are multiple ways to do this. Firstly you can use the image export button in the interactive circuit renderer.
### Method 1: Using the circuit renderer

Firstly you can use the image export button in the interactive circuit renderer. Exporting to `.png`, `.jpeg`, and `.svg` images is supported.

Try clicking the export button in the top right of the circuit diagram below.

Expand All @@ -35,6 +37,8 @@ circ = Circuit(2).CX(0, 1).Rz(0.61, 1).CX(0, 1) # Build circuit
draw(circ)
```

### Method 2: Generating a `.tex` file from the `Circuit`

You can also export pytket circuits to LaTeX with the [Circuit.to_latex_file](inv:#*.Circuit.to_latex_file) method. This is handy for using circuit images in papers if you like using the Quantikz library.

```{code-cell} ipython3
Expand Down

0 comments on commit 732a22e

Please sign in to comment.