Mondrian-Inspired Quantum Art

Russell Huffman
Qiskit
Published in
6 min readApr 19, 2022

“I wish to approach truth as closely as is possible, and therefore I abstract everything until I arrive at the fundamental quality of objects.”
- Piet Mondrian

Mondrian saw a spirituality in art, one that was rooted in search of the most fundamental properties of creative expression. Quantum mechanics governs the most fundamental properties of nature, so it seems appropriate to explore wielding these fundamental building blocks as a defining force of an artistic composition. In doing so, I created a series of artworks that are a nod to Piet Mondrian’s iconic style while also using quantum computers as a core component for determining the composition.

Example piece from the Mondrian’s Cube series

Art as a set of rules

Piet Mondrian was a pioneer of abstract art in the 20th century and founder of an art movement know as “De Stijl” or “Neo-Plasticism.” This art movement was driven by artistic ideals and a restricted set of compositional rules. Specifically, Mondrian worked with “only primary colours and non-colours, only squares and rectangles, only straight and horizontal or vertical lines” (source Tate). Mondrian was able to generate artworks with a style that we now see as so iconic because he prescribed this set of rules. Today, generative artists do something similar. We create a set of strict rules for a computer to follow that determines an artistic composition. For the Mondrian’s Cube series, I created a set of rules that are followed by both classical and quantum computers that together create a final composition. Like Mondrian’s search for an idealized aesthetic, I am applying a set of specific rules to each composition, but instead of conceptually referencing these fundamental qualities, I am literally applying these rules to a quantum system.

In short, each of Mondrian’s Cubes is the result of rules applied via both quantum algorithm and classic algorithm.

Creating Mondrian’s Cubes

For my quantum interpretation of Mondrian’s iconic style, I am playing off his basic elements of restricting the composition to just squares and rectangles, straight lines, and colors. However, I am working instead in 3D space. The composition starts with a single cube in 3D space with lines that bisect it along the x, y, and z axis based on data from a qubit corresponding to each axis. The cubes are then colored by errors in the quantum system.

To break things down, let’s start with the quantum part. The quantum circuit I used is a basic 3 qubit GHZ state that looks like this:

Circuit visualization of the GHZ state

I apply a Hadamard gate to the first qubit, setting it in an equal superposition. I entangle the second qubit to the first via a controlled not (or CNOT) gate. I entangle the third qubit via another CNOT. This is a maximally entangled quantum state, and for my purposes it means the returned value of all qubits when measure should be the same (in the absence of errors). Because of the initial Hadamard gate, there should a 50% chance of getting a return value of 000 and a 50% chance of getting a value of 111. I compose the artworks using IBM’s current state-of-the-art albeit noisy quantum systems. The results mean sometimes we will get values other than 000 or 111. That is okay, because we can factor those errors into the composition of the artwork. This quantum circuit is run hundreds of times to give us a data set to work with.

Once I run the quantum circuit and export the dataset, I can start applying those values to my composition. For the classical (non-quantum) part, I use Blender, an open source 3D modeling program that includes a Python environment, which I use to apply my quantum dataset to the artwork. The algorithm to create the cube compositions uses the following rules:

  1. Get the first cube and the first piece of quantum data, which is one of the 3 digit sequences (eg. 111).
  2. If the first qubit’s value (the rightmost binary digit) was returned as 1, draw a line splitting the cube in half on the X axis.
  3. If the second qubit’s value (the middle binary digit) was returned as 1, draw a line splitting the cube in half on the Y axis.
  4. If the third qubit’s value (the leftmost binary digit) was returned as 1, draw a line splitting the cube in half on the Z axis.
  5. If there was an error returned by the quantum computer resulting in a value other than 000 or 111, then color the cube. There are 6 other possible states that are all considered error. Those states are 001, 010, 011, 100, 101, and 110. I map each of these to a color. For example, if the returned value was 001, color the cube red. If the returned value was 100, color the cube purple. So on and so forth (It’s worth noting that using secondary colors like purple is a departure from what Mondrian did).
  6. Grab the next piece of quantum data and the next cube, and repeat steps 2 through 6.

The quantum algorithm was run hundreds of times, but with some experimentation, the most aesthetically pleasing results only required about 20 pieces of data. Because (in general) each subsequent cube that is split is smaller than the one before it, after 20 cuts, it becomes impossible to see the results. I ran the algorithm many times and tested it with many different numbers of cuts, and settled on some compositions I liked the most. The shape of the cube composition was determined with the quantum data, but I was able to move the camera in 3D space to choose the angles I liked the most. Once everything was in place and to my liking, I exported the view as vector artwork that I could then send to the pen plotter (specifically, an AxiDraw v3).

Time lapse of the pen plotter drawing the final piece

A pen plotter is a technical drawing tool that has recently had a resurgence in popularity. It functions kind of like a printer in that it can faithfully reproduce digital artworks. However, the options for drawing medium and drawing surface is much broader than a traditional printer. In my case, I can use nice archival quality paper and the pens of my choice to give it the look and feel I want. Below are a handful of version from the final series of Mondrian’s Cubes.

Summary

The Mondrian’s Cubes series is a quantum computing power generative art series that is a nod towards Piet Mondrian. Mondrian’s work is a cornerstone of 20th century art, but in my mind he was also a progenitor of generative art and his ideals nicely fit to quantum mechanical principles. As more artists get involved in quantum computing in their art making process, I hope a “quantum aesthetic” will emerge that depends less on prior precedence, but until then I think it’s important to look back at the artists of yesterday that helped us get to where we are today.

The source code for this project can be found here.

Russell Huffman is a designer with IBM Quantum based in Austin, Texas. The above article is personal and does not necessarily represent IBM’s positions, strategies or opinions.

--

--

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.