Creating Quantum 8-Bit Art

Russell Huffman
Qiskit
Published in
5 min readMay 5, 2021
Image credit: Russell Huffman

When talking about “8-bit art”, the image that comes to mind is usually low-pixel artwork akin to retro video games. Eight bits of data is not a lot of information, yet working with such constraints can yield some really beautiful and unique results. Like the video game consoles of yesterday, quantum computers are still early in their development with simple outputs, so it seemed appropriate to do a take on an “8-bit” art project from a quantum computer. If you can guess from the image above, my interpretation of quantum 8-bit art is quite different from classical 8-bit art.

What does it mean to work with bits?

A “binary digit”, or a “bit”, is the basic unit of information for a computer, usually shown as a 0 or a 1. If something is 8-bit, it uses sequences of eight 0s or 1s to store more complex information (eight bits together are often called a “byte”). Computers use these bits in various ways, from lighting up pixels on your screen to doing logical operations to basically every other computing operation — it’s totally up to us and the software we write. As an artist, I decided to interpret bits as shapes.

Do quantum computers use bits?

Before we get into the art itself, let’s talk briefly about how quantum computers work. Rather than bits, quantum computers use “quantum bits” or “qubits” as their fundamental unit of computing. Unlike bits, a qubit can be a linear combination (also called a superposition) of 0 and 1. But once measured, qubits only return a 0 or a 1. This means the output of a quantum computer will always be a sequence of bits.

For my 8-bit art, I use eight qubits each individually set in an equal superposition (well, the most equal we can get today), and then immediately measure them. All the qubits have an equal chance of being a 0 or a 1 upon measurement, so we’ve essentially created a quantum random number generator. Any other algorithm would still work for this project so long as the output is eight bits, but I wanted to focus on representing basic data, so the quantum algorithm is less important to this piece. For the curious, the Qiskit code I used is the following:

qubitcount = 8;
qc = QuantumCircuit(qubitcount, qubitcount)
itemsToMeasure = []
for i in range(qubitcount):
qc.h(i)
itemsToMeasure.append(i)
qc.measure(itemsToMeasure, itemsToMeasure)

Bits as shapes

Bits are an abstract concept. Humans may represent them as a 0 or 1, but to a computer, they represent either electricity flowing or not. What we do with the bits is up to us and there are no rules saying I can’t interpret them as representing shapes. For my piece, I assigned each of the eight qubits to a shape that I render (or don’t render) based on the qubit measurement. The shape assignments are completely arbitrary with a focus on making something that looks aesthetically pleasing for a final composition. This is art, after all.

To create the composition shown at the top, the rules are fairly simple. Run the eight qubit random number generator on the quantum computer several times. The output will be 8-bit strings that could look something like 01011101. Each bit has a corresponding shape. If a bit is a 1, draw the shape. If a bit is a 0, don’t draw the shape. All eight shapes (or lack of shapes) get laid over each other. Do it again over and over. For the composition at the top, I ran the process 36 times.

Here’s a visual for the rules using the bit string 01011101 as the example.

That’s basically the entire process. Once everything was ready, I pulled out the pen plotter and started creating prints.

Bits as the basic unit of art making

The main point I’m trying to make here is that the way we choose to interpret and represent data can itself be a form of artistic expression. Understanding how we can represent data opens doors for us creative types to work in highly technical fields like quantum computing. Things can get complicated quickly, but at its core, all computational data (even the data returned by a quantum computer) is just a bunch of 0s and 1s, and we can do whatever we want with it.

For the quantum computing part, I used Qiskit. For the art-making part, I used Processing. For the pen plotter, I used an axi-draw, with Inkscape. Code for the project can be found on my Github if you want to try it yourself.

Each print only uses 36 shots from the quantum computer, but I ran it with ~8000 shots, meaning I can make 1000s of unique posters. Want one? I’ll make a on-of-a-kind print on the pen plotter with real quantum data. Available on Etsy.

--

--

Russell Huffman
Qiskit
Writer for

I am a product manager with Quantum Computing Inc. I have an art background but grad school at Georgia Tech brought me into the tech scene.