Hello (Many Quantum) World(s)

Historically, the first program you write for a new computer language is “Hello World,” or, if you are in Texas, “Howdy World.” But with quantum computing on the horizon, you need something better. Like “Hello Many Worlds.” [IonQ] proposes what that looks like and then writes it in seven different quantum languages in a post you should check out.

Here’s the description of the simple program:

The basic quantum program we’ll write is simple. It creates a fully-entangled state between two qubits, and then measures this state. This state is sometimes called a Bell State, or Bell Pair, after physicist John Stewart Bell.

The measurement results for this program should give us 0 for both qubits or 1 for both qubits, in equal amounts. When running these, we’ll be able to tell that we’re running on real hardware because that’s not always what we get! These errors are what currently limit quantum computers, but the first steps to overcome this with quantum error correction have already begun.

The languages include IBM’s Qiskit, Microsoft’s Q#, Amazon’s Bracket, Google’s Cirq, ETH Zurich’s ProjecctQ, Pennylane, Pytket, and XACC. If you are wondering which of these to learn, it is interesting to see the differences between them.

For example, Bracket looks nice and simple:


from braket.circuits import Circuit
qc = Circuit().h(0).cnot(control=0, target=1)
print(qc)

None of the languages look too complex, but sometimes the setup to run them on remote quantum computers is a bit more code. Many of these could also be run on a simulator if you want the practice.

We noted that Twist — a relatively new language, wasn’t on the list. If you want a gentle introduction to quantum, try our series.



Hello (Many Quantum) World(s)
Source: Manila Flash Report

Post a Comment

0 Comments