OpenQASM 3 Introduction

Open Quantum Assembly Language, otherwise also known by its acronym OpenQASM is an interface language that allows representation of Quantum Programs. OpenQASM is designed to enable experiments with small depth quantum circuits. It was first described in a paper Open Quantum Assembly Language published on 13th July 2017 by Andrew W. Cross, Lev S. Bishop, John A. Smolin, and Jay M. Gambetta. Read the Original Paper

OpenQASM 3 is the 3rd major version of OpenQASM.

Why OpenQASM?

OpenQASM is a simple language that serves as a medium of intermediate representation of Quantum Circuits. For example, a high-level Quantum Programming language or a Compiler makes use of OpenQASM by converting high-level code to OpenQASM code. The OpenQASM code is then converted lower level code such as Target Machine Code.

Do note that OpenQASM code does not consist of machine-level instructions.

Where can I run OpenQASM?

IBM released a reference source code implementation for OpenQASM as apart of Qiskit to use along with their IBM Quantum Experience. You can use the IBM Quantum Experience Composer to create Quantum Programs in OpenQASM and run them. Furthermore, you can also use IBM Quantum Experience to convert Qiskit code to OpenQASM code. IBM Quantum Experience is a cloud based Quantum Computing Platform by IBM Check out IBM Quantum Experience

Qiskit also provides the added functionality to convert Qiskit code to OpenQASM code and vice-versa. This allows you to convert between Qiskit and OpenQASM code on your own local machine.

Enough of introduction to OpenQASM 3, it’s time we proceed to learning about OpenQASM 3.