# Tools for creating quantum circuit diagrams

What tools exist for creating quantum circuit diagrams and exporting them as images? Preferably one which runs in Windows, or even better one which runs in the web browser.

## 6 Answers

Depending on how involved your circuit is you could use

• Quantikz (written by @DaftWullie I believe)

or

• Q-circuit by Bryan Eastin and Steve Flammia.

These are tools to make circuit diagrams in TeX for papers and the like, but you can always make your TeX file just the circuit you want and save it as a pdf. Making complex and incredibly long circuits might be a bit of a hassle and would be better done in an automated tool like the one posted by Davide_sd.

• And remember that adobe reader has a snapshot option so you can easily convert it into an image. – DaftWullie Oct 31 '18 at 5:58
• It’s probably not fair to call qcircuit a predecessor as that sort of implies that quantikz is the newer, updated version. While it is newer, and mirrors much of the functionality, the two things are entirely independent. – DaftWullie Oct 31 '18 at 6:11
• Thats fair! I'll take that like out. – Dripto Debroy Oct 31 '18 at 17:20

I'm new to the quantum world as well, but so far I've been able to draw my basic simple circuits with Qasm2Circ. It requires:

• latex2e with xypic (included in tetex)
• python version 2.3 or greater
• ghostscript (and epstopdf) (for creation of pdfs)
• netpbm (for creation of png files)

Hopefully, somebody will be able to list other tools.

• Do you use this in Windows? – ahelwer Oct 30 '18 at 19:51
• No, I'm using it on Ubuntu. Although, it seems there exist a version for Windows too, check out this Github repo. – Davide_sd Oct 30 '18 at 19:54
• If you use miktex on windows for doing the latex, then one of the tools it comes with (although you need to know to look for it) is bmeps which you can use for crating image files – DaftWullie Oct 31 '18 at 6:01
1. Master of Science degree project developed by Joanna Patrzyk and Bartłomiej Patrzyk at AGH UST in Cracow.

http://www.quide.eu/

It can simulate designed circuits by generating simulator code in C#. Runs under Windows. Available under GPLv3.

1. IBM Quantum Experience. Its interface runs in web browser.

https://quantumexperience.ng.bluemix.net/qx/editor

It can run on "real" quantum computer. Available for research purposes only.
Here is the agreement: https://quantumexperience.ng.bluemix.net/qx/terms
And user guide: https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=full-user-guide&page=introduction

[...] quantum circuit diagrams [...] even better one which runs in the web browser.

Quirk (algassert.com/quirk) runs in browsers and can be used to create simple circuit diagrams. I use it for this purpose all of the time, though it's main purpose is to simulate circuits.

Just drag the gates you want into the circuit, perhaps use the simulation results to check that everything is behaving correctly, and then take a screenshot with e.g. Windows' Snipping Tool. Most browsers also have an option to turn a canvas into an image (e.g. in firefox if you right-click on the circuit you can select 'view image' that you can then download and crop). You can bookmark the circuit to come back to it later, in case you make a small mistake.

The main downside of this approach is a) it requires manual work every time, b) it produces bitmap images instead of vector images, and c) it is somewhat inflexible (e.g. you can't put operations with different controls into the same column).

Example:

One of the best tools to use is the "Quantum Computing" package in Mathematica: http://homepage.cem.itesm.mx/jose.luis.gomez/quantum/

Here you can just input all the useful gates directly and also completely manipulate the Circuits in a complete GUI interface.

Moreover, you can also perform all the desired operations over qubits.

• You're using Version 7? Does it have any problems with newer versions? – AHusain Nov 4 '18 at 13:47
• No, this is an old screenshot. I am using Mathematica 11.3 with this package and it works perfectly without any clash. – Siddhant Singh Nov 4 '18 at 13:52

For drawing in your browser, there is a demo of the Quantikz.jl package you can use:

Various programming languages have their own circuit drawing libraries as well. For latex code probably the best choice is Quantikz, and if you are programming in Julia you can create a diagram (png or latex code) with the Quantikz.jl library.