Understanding the Software Stack in Quantum Computing
Tags: quantum, softwareengineering, quantumcomputing, careerdevelopment
Published: 2024-05-15 05:57:31

This article is inspired by the need for more Software Engineers in quantum computing. Not to mention the other Developers, UX Designers, QA Testers, Product Managers and all the rest of the talent that makes it possible to ship a real product to real customers. Especially products in Deep Tech and Frontier Tech like quantum computing.

These products and the teams attempting to create them are subject to a long and challenging [journey from "Science to Technology to Engineering to Product"](https://medium.com/@hellodavidryan/how-do-we-think-about-products-in-deep-tech-a-suggested-framework-69e59419a1c6). A series of phase shifts that are more about organisational (and community) evolution than just a linear progression through technology readiness.

This evolution doesn't just happen. For those of us working in these teams, we face the challenge of reinventing the organisation as it shifts from academic to technical to something more broadly engaged with the marketplace. Which means sourcing and collaborating with a growing community of talent and continually evolving and growing our own skills.


![Diagram showing the key phases of Deep Tech product evolution, with examples of Quantum Computing software relevant to each phase](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pg2q1hb094s4bgb9mtv4.png)

This was something I touched on in my "[Open Source Your Way into a Quantum Computing Career](https://www.youtube.com/watch?v=sXDva9Etw5A)" talk back in 2022 at the Linux Foundation's Open Source Summit. And it's grown even further in the year or so since, with a noticeable industry shift toward "quantum utility" (a term we use to focus on real-world usefulness rather than [theoretical supremacy](https://www.sciencenews.org/article/google-quantum-supremacy-claim-controversy-top-science-stories-2019-yir)) and some massive projects kicking off. Such as the Australian government's [nearly $1B investment in PsiQuantum](https://www.abc.net.au/news/2024-04-30/australia-signs-deal-for-first-useful-quantum-computer/103781352) setting up a commercial quantum computer back in my home town of Brisbane (said with a little homesickness from here in Seattle).

So yes, there is a lot going on. Which makes this a very good time to understand what these quantum systems are actually composed of and where your talent and curiosity fits in. I've included some recommendations at the end for how to get involved. And I should add a quick disclaimer that there's not really one "quantum computer" paradigm. I've abstracted the most common elements of the various systems we work on for educational value, but welcome any challenges or rebuttals as this model evolves over time.

---

## The quantum stack at a glance

In many ways the quantum computing stack matches the pattern of a modern high-performance computing (HPC) stack. And to a lesser degree will be familiar enough to anyone working in the cloud computing space. We go from a high-level user experience down to some form of platform that takes our workload and converts it to something that will then run on the hardware. Simple enough to get our head around.

The nuance is a lot more complicated. Such as understanding that a quantum computer is only really as good as the quantum algorithm being used. All the fancy stuff you've heard about [superposition](https://scienceexchange.caltech.edu/topics/quantum-science-explained/quantum-superposition) and [entanglement](https://scienceexchange.caltech.edu/topics/quantum-science-explained/entanglement) really just comes down to a way to reliably run some useful algorithms that, on a hardware level, [uses phase and interference](https://www.wolframcloud.com/objects/summerschool/pages/2017/JacobMarks_TE) to perform the "computation" that spits out a probability of the right answer. Doing this a lot creates a greater likelihood of the right answer. Doing this at all requires a useful algorithm and a reliable system implementation.

Simulation also plays a crucial role. You might see this talked about as having to do with "saving from expensive hardware purchases", but this isn't really the case (and often a clue someone is just using AI to write their quantum clickbait). We rely on simulation to not only help develop new and interesting algorithms, but to explore the various ways to set up a workload. It's also a core part of the workflows many of us are building towards, where a truly hybrid system would use classical computing resources to handle the workload and scheduling, along with acceleration via GPUs (or newer chips like [TPUs](https://cloud.google.com/blog/products/ai-machine-learning/an-in-depth-look-at-googles-first-tensor-processing-unit-tpu) and [LPUs](https://wow.groq.com/lpu-inference-engine/)), and effectively push certain workloads to the quantum processing unit (QPU) where a quantum algorithm may be useful to the task at hand. While some, like myself, are focused on integrating quantum computing with existing infrastructure, others are dedicated to building the most powerful standalone quantum system. Hence the wide range of exploration in the industry.

If all you take away from this is that a quantum computer is a specialised system that includes a QPU in addition to the existing compute stack to run specialised quantum algorithms then that's a win. No cats, slits, or spooky hand-waving required.

![Diagram showing the key layers of a Quantum Computing software and system stack](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smmarb8535javpb3ugge.png)

---

## The quantum stack in detail

The following sections move from the top user layer down through the platform, and ultimately into the hardware layer. While the boundaries between these layers can be blurred in practice, we'll follow a model based on a typical workload or workflow for clarity (and sanity).

---

### 1. Quantum programming languages and developer tools

At the highest level of the quantum system is the human punching away at the keyboard. Quantum programming languages provide the high level of abstraction required for exploring quantum algorithms and creating programs in a manageable form. The experience of working with these languages is expanded by Software Development Kits (SDKs) that offer the libraries and tools required to develop quantum software.

There is some blurring of the distinction between SDKs and frameworks and Integrated Development Environments (IDEs). This is shaped by the diverse approaches of quantum vendors and the integration of platforms and product verticals tailored to specific end-users. A researcher wanting full local access and pulse level control will differ from an enterprise team developing hybrid workloads, which will differ from a fintech startup building on top of a cloud-based quantum platform. This pattern is familiar in enterprise or cloud-based projects, but it will evolve with nuances as the commercial value of quantum systems becomes more apparent and influences product design. Meanwhile, the most prevalent SDKs and their associated programming languages are as follows.

- [IBM Quantum](https://www.ibm.com/quantum) and (Python-based) [Qiskit](https://www.ibm.com/quantum/qiskit)
- [Microsoft Quantum Development Kit](https://learn.microsoft.com/en-us/azure/quantum/install-overview-qdk) (QDK) and [Q#](https://quantum.microsoft.com/en-us/explore/concepts/qsharp)
- [Google Cirq](https://quantumai.google/cirq) and Python
- [Amazon Braket](https://aws.amazon.com/braket/) and Python
- [Intel Quantum SDK](https://www.intel.com/content/www/us/en/developer/tools/quantum-sdk/overview.html) for Python, and C/C++
- [Rigetti Forest](https://github.com/rigetti/forest-tutorials) and (Python-based) [PyQuil](https://pyquil-docs.rigetti.com/en/stable/)

---

### 2. Quantum algorithms and applications

Moving down the stack we come to the algorithms at the heart of any desired quantum workload. As the various competing approaches to creating quantum computers improve, so do the opportunities for real-world applications. A range of software libraries and packages are being built towards specific functional areas of use (such as [IBM's Qiskit Machine Learning](https://github.com/qiskit-community/qiskit-machine-learning) for quantum machine learning or [Google's OpenFermion](https://quantumai.google/openfermion) for quantum chemistry), and the existing libraries of known quantum algorithms are being extended and optimised by researchers and commercial vendors (such as [Stephen Jordan's Quantum Algorithm Zoo](https://quantumalgorithmzoo.org/) and [Classiq's library](https://github.com/Classiq/classiq-library)).

Some quantum algorithms have achieved near-celebrity status. Others are quantum adaptations of classical algorithms or serve as building blocks for larger workloads. There are even some quantum algorithms that are functionally useless in the real world (insert a joke about physicists here if you dare), but are important examples of quantum advantage. For a deeper dive, see my feature on quantum algorithms, but here are some notable examples.

- [Shor's Algorithm](https://www.classiq.io/insights/shors-algorithm-explained), known for its potential to break encryption, is proposed to factor large numbers exponentially faster than classical algorithms.
- [Grover's Search Algorithm](https://www.classiq.io/insights/grovers-algorithm) offers a starting point for accelerating unstructured data searches.
- [Deutsch-Jozsa Algorithm](https://www.classiq.io/algorithms/deutsch-jozsa-algorithm) isn't technically useful in and of itself, but was an early example of showing quantum advantage over classical methods.
- [Quantum Fourier Transform (QFT)](https://en.wikipedia.org/wiki/Quantum_Fourier_transform) is the quantum version of the Fast Fourier Transform at the heart of many powerful algorithms.
- [Variational Quantum Eigensolver (VQE)](https://www.classiq.io/algorithms/variational-quantum-eigensolver-vqe) is a hybrid algorithm being explored for near-term applications in quantum chemistry, materials simulation, and optimization problems.

---

### 3. Quantum simulators and emulators

Quantum simulators are the software tools used to replicate the behaviour of quantum systems on classical computers. They form an essential part of our workflow developing algorithms and optimising potential workloads (especially with simulators that feature the same set of gates or other elements of the specific hardware). The role of simulators has evolved as the industry itself evolves from pure academic research to potential commercial utility. The accuracy of the simulation for specific quantum hardware has improved to the point of modelling the system's unique noise and errors. Note that the following examples are subject to change or deprecate as vendors (looking at you Qiskit 1.0) iterate or streamline their product ranges as the industry matures.

- [Google Cirq](https://quantumai.google/cirq/simulate/simulation) and [Qsim](https://quantumai.google/qsim)
- [Intel Quantum Simulator](https://github.com/intel/intel-qs)
- [Microsoft Quantum Simulators](https://learn.microsoft.com/en-us/azure/quantum/sparse-simulator) (and [novel Resource Estimator](https://learn.microsoft.com/en-us/azure/quantum/intro-to-resource-estimation))
- [IonQ hardware noise model simulation
](https://ionq.com/docs/get-started-with-hardware-noise-model-simulation)
- [Quantum Brilliance Qristal Emulator](https://quantumbrilliance.com/quantum-brilliance-emulator)
- [IBM Qiskit Aer](https://quantumbrilliance.com/quantum-brilliance-emulator)

---

### 4. Quantum cloud platforms

Before we move further down the stack we need to make a small side note on the topic of quantum cloud platforms. In the current era there are a handful of major vendors with a few hardware systems in operation. Each faces the same question of whether to attempt to sell hardware units directly, host on their own campus, sell access via the internet, or some combination of the above. And then add private interconnects, public cloud vendors, sovereign capability and research labs to the mix. It's not a given that the cloud platform model will prove to be the defining economic model for quantum computing, although it occupies the greatest mindshare from outside of the sector given the patterns of cloud computing that came prior.

Having said all of that, pay attention also to the companies who choose not to provision their systems for cloud platform access. At [Quantum Brilliance](https://quantumbrilliance.com/) my focus was on highly-parallelised edge-compute clusters using the diamond NV-centre approach that enables small form factor and room-temperature QPUs (with the first [deployed at the Pawsey Supercomputing Centre in Australia](https://youtu.be/IR-bYQA1TIg?si=xQpGnN2Ha267z9XF)). In speaking with other quantum startups, the use cases for all forms of fixed or mobile deployment seem to apply, and there's a lot of interesting (and often undisclosed) work being done away from the web. Among those accessible online, here are some to watch.

- [IBM Quantum Experience](https://www.ibm.com/quantum)
- [Amazon Braket](https://aws.amazon.com/braket/)
- [Microsoft Azure Quantum](https://azure.microsoft.com/en-us/products/quantum/)
- [Google Quantum Computing Service](https://quantumai.google/cirq/google/concepts)
- [Strangeworks (multi-vendor platform)](https://strangeworks.com/platform)
- [Xanadu Cloud](https://www.xanadu.ai/)
- [Quantinuum (H-Series via multiple vendors)](https://www.quantinuum.com/hardware#access)

---

### 5. Quantum compilers and circuit optimisation

The role of the quantum compiler is to translate the high-level quantum programs into the low-level instructions to be executed on quantum hardware. While the specifics are beyond this article's scope, the process involves gate decomposition (to match the abstract gates to the physical qubits), mapping and scheduling (to match the logical qubits of the algorithm to the physical qubits) and details specific to the vendor and their particular system (such as fidelity, error rates and connectivity).

To simplify this example stack, we will roll into this level the various forms of quantum circuit optimization that apply techniques to minimize the number of quantum gates, depth, or other resource elements without changing the underlying function. This can occur before compilation, as a part of it during the compilation process, or later on as part of a fine-tuning for the hardware process. For clarity, let's group it here within our workflow. Here's some examples to be aware of.

- [Quantinuum TKET](https://github.com/CQCL/tket)
- [inQWIRE SQIR and VOQC](https://github.com/inQWIRE/SQIR)
- [Rigetti Quil Compiler](https://pyquil-docs.rigetti.com/en/stable/compiler.html)
- [Berkeley Quantum Synthesis Toolkit](https://bqskit.lbl.gov/)
- [Microsoft QDK Compiler](https://github.com/microsoft/qsharp/tree/main/compiler/qsc)

---

### 6. Quantum error correction software

The role of quantum error correction in the current era of ["noisy" quantum systems](https://q-ctrl.com/topics/what-is-nisq-computing) is especially important. To the point that there are companies specialising in this layer of the stack. The need for these companies and the wider error correction effort is due to the fragile nature of quantum systems. While superconducting quantum computers dominate popular imagination, error correction is vital across all methods (trapped ion, photonic, NV-centre, etc.).

Regardless of qubit generation method, challenges arise in preparation, workload execution, and measurement. [Decoherence](https://www.scientificamerican.com/blog/observations/decoherence-is-a-problem-for-quantum-computing-but/) affects all methods, along with gate errors, measurement errors, and individual qubit quality. Quantum error correction is understandably complex, but can incorporate techniques such as system redundancy (spreading the quantum information across multiple qubits), syndrome management (using ancillary qubits to detect errors without disturbing the encoded information), and profiling the performance of individual or clustered qubits over time. While these will still be important if the era of truly fault-tolerant quantum computing is achievable, they are an exciting topic of research in the present Noisy Intermediate-Scale Quantum (NISQ) era we find ourselves in. Major vendors and examples include the following.

- [Q-CTRL Fire Opal](https://q-ctrl.com/fire-opal)
- [Riverlane](https://www.riverlane.com/quantum-error-correction)
- [Nord Quantique](https://nordquantique.ca/en/home)
- [Unitary Fund Mitiq
](https://mitiq.readthedocs.io/en/stable/)

---

### 7. Quantum control systems

The quantum control system is responsible for managing and controlling quantum hardware operations. It handles tasks at the hardware level such as calibration, pulse shaping, and qubit control. Given the different forms of quantum computing being developed, and the range of implementations of monolithic or networked quantum systems, we can consider the term "quantum control system" to be inclusive rather than specific. Likewise there is no hard and fast definition of a "quantum operating system".

This will likely change over time as the phase of development moves from the ["Science to Technology" phases and into "Engineering to Product"](https://medium.com/@hellodavidryan/how-do-we-think-about-products-in-deep-tech-a-suggested-framework-69e59419a1c6). Especially where closer alignment with existing product patterns and the terminology of the users and/or marketplace are desirable. For the most part, the control system will be an internal resource (something between an OS and firmware) but the following vendors and products are notable.

- [Quantum Machines OPX+](https://www.quantum-machines.co/products/opx/)
- [Q-CTRL Quantum Control (resource)](https://q-ctrl.com/topics/what-is-quantum-control)
- [Qblox and Orange Quantum Systems Quantify-Core](https://quantify-os.org/docs/quantify-core/v0.7.5/#)

---

### 8. Quantum hardware

The final layer in our stack is the quantum hardware itself. It's useful to remember that there is no single or right way to generate and work with qubits. Nor is there a clear market leading approach. Each method or approach has its own challenges, and there may prove to be multiple approaches with benefits for specific scenarios.

The hardware layer is what many think of when they hear the term "quantum computing", much in the same way that the early tube and valve computing devices defined the terminology and language by sheer force of mechanical interaction. Switches and punch cards gave way to instructions and programs over time, in turn being extended by memory and storage, and then connected by networks and servers.

These patterns are present in the research and development of quantum devices. As we can see from the above, the layers of an example quantum stack provide opportunity for existing expertise at each layer to provide new and interesting ideas. Hopefully in new ways we might never have considered, given the nuance that each underlying technology and layer in the stack provides.

---

## TL;DR?

The work being done by quantum physicists, electrical and electronic engineers, fabricators and all kinds of manipulators of atoms is not only supported but enabled by those of us who wrangle the bits and (zetta)bytes. It's a great time to get involved.

A good start for new learners is [Q-CTRL's Black Opal](https://q-ctrl.com/black-opal), [Delft university's high level MOOC on edX](https://www.edx.org/learn/quantum-computing/delft-university-of-technology-the-quantum-internet-and-quantum-computers-how-will-they-change-the-world), and [the inevitable path into IBM's Qiskit](https://www.ibm.com/quantum/qiskit). For those of you from the C# side of things, [this Microsoft introduction](https://learn.microsoft.com/en-us/training/modules/intro-to-azure-quantum/) has a quick look at their approach with Q# and how it's rolled into the Azure ecosystem. And the [Classiq algorithm library](https://docs.classiq.io/latest/explore/) is worth bookmarking.

I'll do a dedicated article on learning quantum for software engineers soon, as this is a topic that I get emailed about nearly weekly since my [Open Source Summit talk](https://youtu.be/sXDva9Etw5A?si=99otFuFUlZ-v_M8S) (and the rolling layoffs of engineering talent that has occurred since). While any industry shift is hard for the people and families affected by the colder edge of the economics, it can in turn be an opportunity to unlock the talent (and the career paths) that would otherwise be locked away. So if you're considering further exploration, please do so, and [drop me a line](https://www.linkedin.com/in/hellodavidryan/) if there's anything I can do to help. And be sure to sign up to the [Product In Deep newsletter](https://productindeep.substack.com/) where we dig into the strategy and craft that goes into shipping real products in the Deep Tech and Frontier Technology realms.