Using Qiskit on IBM z Systems

Jack Woehr
Qiskit
Published in
5 min readJul 6, 2022
IBM z16 (Photo credit: IBM)

Mainframes and Qiskit may seem like near opposites — on one hand, you have a decades-old technology concept once responsible for powering many of the world’s businesses. On the other, you have an open source software development kit for quantum computers, which we hope will spark a paradigm shift in computing overall.

So, naturally, it makes sense to try installing Qiskit on the IBM z mainframe architecture…

What is z?

The z/architecture is the instruction set architecture behind the latest generation of IBM mainframes. The evolution of IBM mainframe architecture goes (roughly):

  • IBM 360 (1964)
  • IBM 370 (1970)
  • IBM 390 (1990)
  • IBM z (2010-present)

The z virtualizing architecture dates back to 1967. Modern virtualization systems — based on, for example, the Intel architecture — conceptually and in practice derive from half a century of virtualization experience on mainframes.

Z-architecture mainframes do run “old code,” some of it written over 50 years ago, but they also run modern code. The traditional mainframe operating system z/OS features Unix System Services (USS) which is a genuine Unix™ operating system running in an address space. Most open-source tools and languages can be compiled there.

In addition to support for our shared open-source world under USS, by 1999, enthusiasts inside and outside of IBM had managed to bring up the full gcc toolchain, the Linux kernel, and utilities on the architecture. IBM chose to move forward with this; and nowadays, Linux and its full complement of tools and utilities, including the KVM hypervisor, are critical components of z practice.

Why run Qiskit on z?

One answer to that question is: “Because it’s there.” That’s why I first struggled to install Qiskit on a LinuxONE Community Cloud virtual server in 2019. The Community Cloud provides you a virtual server or OpenShift container for a few months — courtesy of IBM and Marist College. At that time, I had recently become a Qiskit Advocate; and for a few months, my nerdly peace of mind depended on being able to run Qiskit on every architecture I could obtain access to.

A more practical answer to the question arises from the use case for cloud quantum computing in the near term. The far future of quantum computing may include local physical devices — but until then, we expect to access this hardware as a cloud service. In this model it is already becoming useful and generates a steadily growing revenue stream for its providers.

IBM z is a monster container environment able to run and network hundreds of thousands of containers in a highly performant and energy-efficient manner. With the availability of cloud quantum computing, web services will appear that callout to the platform, and those services will be implemented in the standard virtualized server / containerized server environment currently in universal use.

It’s important here to remember that open source Qiskit is not specific to IBM quantum computers. The “provider” metaphor in Qiskit implements pluggable backends to any quantum computational platform based on a recognized gate architecture (and certain other exotic models). At present, competitors such as IonQ and Rigetti also use IBM’s Qiskit to compose and marshal quantum computations to their own proprietary quantum processing units (QPU).

Why should I care about Qiskit on IBM z?

This question is a special case of the general question, “Why should I care about quantum computing?” The answer to that one is easy: “If you’re a computer professional under 40, quantum computing is probably going to be mainstream before you retire.”

If the mainstreaming of QC is likely a given, then the original question reduces to something like, “Do I want to be clued to the maximal implementation of the present era’s quantum computing delivery design pattern?” If the answer to this is “Yes,” then you might be curious about Qiskit on z.

Play time — try it out!

If you want to try this out just for fun, reserve yourself a LinuxONE Community Cloud virtual server with the Ubuntu distribution installed and try my recipe for installing Qiskit on that platform. That blog article presents my installation recipe found on the Github page where I keep the canonical copy. Please file an issue on that repository if you encounter a problem.

You can also try out Chris Poole’s Qiskit on LinuxONE containerized version of my recipe.

Summary so far

  • Qiskit is a programmable provider-agnostic client of cloud quantum computing.
  • Qiskit is installable on all “reasonable platforms” including Linux on the IBM z architecture.
  • High volume, high-reliability, and highly scalable containerized web services backed by cloud quantum computing could well be more economical to deploy via IBM z architecture than would be the case in the more common data center “flotilla of x86 servers” model.
  • Qiskit for Linux on z can be tried out today at no cost other than the effort to install it and use it.

And beyond … Containers and serverless quantum computing

The IBM z architecture has supported Linux for almost a quarter century now. Linux has grown in importance for IBM customers over the intervening years and is even more visible since IBM purchased Red Hat. In particular, container virtualization has become a major application space for the ever-evolving z architecture.

Qiskit allows users to formulate quantum computations and execute them on cloud quantum hardware or local simulators. While users have typically installed Qiskit on Linux, Mac, or Windows, we have seen that you can also install Qiskit into a Linux on z or LinuxONE image, and soon, in a Docker image on z. Enthusiasts inside and outside of IBM are also preparing to install Qiskit on OpenShift and other images.

Qiskit is already architected to the container/serverless model. The original Qiskit model was for the client workstation to perform all the classical computation to prepare a quantum circuit for execution on the cloud QPU,. Nowadays, Qiskit Runtime can hand over portions of classical computation as well to the application host. Advantages of this model include the execution speed of optimized classical code on a powerful cloud host and less data transmission over the network.

The serverless model of cloud quantum computing is on its way. As Qiskit containers appear on IBM z, advanced features of the z architecture may contribute substantially to this deployment strategy.

--

--

Jack Woehr
Qiskit
Writer for

Open Source programmer, Qiskit Advocate, IBM Champion 2021, 2022. Specialist in IBM i modernization.