Over a million developers have joined DZone.

Using Python to Understand Quantum Computing [Interview]

DZone's Guide to

Using Python to Understand Quantum Computing [Interview]

Interested in quantum computing and trying out programming a real live quantum processor? Amazingly, it’s possible for normal humans to get started with quantum computing.

· AI Zone ·
Free Resource

Insight for I&O leaders on deploying AIOps platforms to enhance performance monitoring today. Read the Guide.

There are multiple software frameworks available for accessing quantum computers. This article gives a quick introduction to ProjectQ.

ProjectQ is an open-source software framework for quantum computing started at ETH Zurich. Similar to IBM's QISKit, it allows users to implement quantum programs in Python to access the IBM Q Experience using a powerful and intuitive syntax. ProjectQ can then translate programs to any type of back-end, be it a simulator run on a classical computer or an actual quantum chip.

To start using ProjectQ, simply run:

python -m pip install --user projectq

Or, alternatively, clone/download the ProjectQ repo to your /home directory) and run:

cd /home/projectq
python -m pip install --user .

Full documentation here.

So what’s the difference between QISKit and ProjectQ? I talked with Damian Steiger, founding member and lead developer of ProjectQ, to help understand the differences. Steiger is a Ph.D. student working at the Institute for Theoretical Physics of ETH Zurich. His research focuses on software for quantum computing, computational quantum physics, and high-performance computing.

ProjectQ allows running of quantum algorithms on the IBM Quantum Experience cloud service. What is the difference between ProjectQ and QISKit?

ProjectQ started in 2016 as an open-source software effort for quantum computing. As we had seen tremendous progress in building quantum computing test beds, it became necessary to develop a full stack software framework to write quantum programs for the IBM Q Experience chip. In addition, the high-level quantum programming language combined with a high-performance emulator and simulator was aimed at accelerating the development of new quantum algorithms.

QISKit initial release in 2017 was a great addition to the ecosystem of quantum programming environments, and I am particularly happy that IBM also ended up releasing their code in Python with an Apache 2 license. It allows these two projects to interface with each other and combines the strengths of both. As ProjectQ’s focus is on scalability and large-scale quantum algorithms and simulations thereof, it is currently better suited for such types of applications especially if high-level abstractions are helpful.

In my view, QISKit is more aimed at the current and next generation of quantum computing hardware provided by IBM.

What types of problems are better suited to be solved by ProjectQ instead of R, for example?

ProjectQ is a domain specific language for quantum computing embedded in Python. Its main use is to develop, analyze, and simulate quantum programs. In addition, it allows compiling quantum programs in order to run them on today’s quantum hardware.

To my knowledge R is missing a library for quantum programs. We decided to embed ProjectQ into Python as the quantum research community is already largely using Python and can hence easily post-process results from ProjectQ using their existing Python programs. Of course one could also do this post-processing in R.

What’s the one thing that you personally are most excited about with ProjectQ?

I am really excited about the speed with which I can implement new quantum algorithms using ProjectQ’s high-level language and then run simulations.

Why did you get involved in ProjectQ initially?

When I started my Ph.D., I was tasked with analyzing and developing new quantum algorithms. It quickly turned out that for achieving these tasks various software tools had to be developed. At this point, it made a lot of sense to combine all these tools into a full stack software framework for quantum computing. That’s why Thomas Häner, Prof. Matthias Troyer (our supervisor), and myself started ProjectQ. It was especially fun to not only be able to analyze these quantum programs but to also execute them on the IBM Q Experience chip using our direct interface.

TrueSight is an AIOps platform, powered by machine learning and analytics, that elevates IT operations to address multi-cloud complexity and the speed of digital transformation.

quantum computing ,python ,ibm ,ai ,projectq

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}