Tools for Drawing Quantum Circuits

Last night I was writing an article for the series “The more You Know” to add to my Dictionary of Quantum Information and Quantum Computation and I ran across the need to draw a Quantum Circuit.

Although my first thought was to use a generic drawing software the results were not at all satisfying. Thus I proceeded to take the next logical step: an online search for a Quantum Circuit drawing tool. In this article I review two particularly interesting tools I found.

Online Base: Quantum Circuit Simulator

I first came across this website by programmer Davy Wybiral, which is an online based Quantum Circuit Simulator. It’s interface is very clean and the circuit can be easily and intuitively created by simply selecting the quantum gates and placing them in the circuit. This website produces results such as the following

web

Additionally, as its name indicates, this website can also perform a simulation of the quantum circuit. For instance, the previous circuit generates the Greenberger-Horne-Zeilinger (GHZ) state

\frac{|000\rangle+|111\rangle}{\sqrt{2}},       (1)

and its simulation yields

0.70710678+0.00000000i|000>50.0000%0.70710678 + 0.00000000i|111>50.0000%,

which coincides with Eq. (1).

Although the circuits created with this website are quite nice, there are some operations that are not available and thus cannot be drawn (like measurements). I recommend this website for anyone who needs to quickly draw a Quantum Circuit and who does not know how to use LaTeX.

MIT LaTeX package to draw Quantum Circuit

A deeper search led me to many downloadable softwares, but in particular it led me to Michael Nielsen’s blog where he recommends this LaTeX package for drawing Quantum Circuits. As cited in their website this tool is

[…] a simple text-format language for describing acyclic quantum circuits composed from single qubit, multiply controlled single-qubit gates, multiple-qubit, and multiple-qubit controlled multiple-qubit gates.

Figures of quantum circuits in the book “Quantum Computation and Quantum Information,” by Nielsen and Chuang, were produced using an earlier version of this package.

Needless to say, after a couple of minutes reviewing their 17 examples, I was in love with this tool. Once you get the hang of it it’s pretty simple to use and the results are just amazing!

Gates

The veredict

I would strongly recommend MIT LaTeX package to anyone who knows how to use LaTeX and who needs to draw Quantum Circuits on a regular basis.

Although I’m sure there are software out there available for people without programming or  LaTeX experiencie I didn’t try them all out. If any of you has any recommendations I’d be glad to review them!


 All text copyright © Marco Vinicio Sebastian Cerezo de la Roca.

Creative Commons License
Tools for Drawing Quantum Circuits by Marco Vinicio Sebastian Cerezo de la Roca is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

About marcocerezo

I'm Marco Cerezo, I have a Ph.D in Physics and I'm currently a Postdoctoral Research Associate at Los Alamos National Laboratory in New Mexico, USA. My main fields of study are Quantum Information, Quantum Computing and Condensed Matter. Currently I'm working to develop novel quantum algorithms which can be useful in near-term quantum devices.
This entry was posted in Quantum Information and Quantum Computation: General Discussions and tagged , , , , , , . Bookmark the permalink.

1 Response to Tools for Drawing Quantum Circuits

  1. Pingback: A First Glimpse of Rigetti’s Quantum Computing Cloud – Everything about Data Analytics

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s