Quantum programming models need to enable performance and productivity

Quantum computers are making great strides in quality, fidelity, and size. At the same time, users and application developers are eager to glimpse the expected power of quantum computing for addressing real-world problems, even if routinely delivering superior performance is still years in the future. As an industry, we need to ensure that quantum computers will deliver economic advantage to a broad market. The time is ripe to anticipate the needs of would-be application developers: What programming models will they use? What do they need to be successful? How will they extract performance from quantum processing units (QPUs)?

To gather input from the community of quantum computing engineers, practitioners, and users, a workshop was held at the 2023 IEEE Quantum Computing and Engineering conference. Invited speakers were from three groups that will help frame and develop suitable programming models: (1) application developers who eventually will solve real-world problems using the programming models and tools developed by quantum computing experts working at lower levels of abstraction closer to the hardware, (2) low-level developers who are already using whatever means necessary to obtain performance, and (3) developers who are using the best currently available programming models and tools, which are medium- or low-level. The agenda comprised three 90-minute sessions, on low-level programming, high-level programming, and app development. Expert presentations were followed by discussion among the 50 workshop participants (35 in person and 15 virtually).

This blog post summarizes the points raised at the workshop.

Why performant and productive quantum programming models are vital

Quantum computers have the potential to offer unimaginably higher performance and to solve certain combinatorial problems in decryption and quantum chemistry that classical computers cannot. However, the fundamental operations of quantum computers are completely different from those of classical computers, and the (quantum mechanical) principles on which they work are not well understood by many potential application developers. Delivering both performance and productivity from quantum computing via better tools will make it possible for the broad community of application developers to exploit that latent potential for high-value problems. In turn, such broad accessibility will grow the utility of and the market for quantum computing, enabling commercial success.

Getting good performance from today’s quantum computers is excruciatingly difficult and is largely restricted to quantum experts using the currently available low-level, low-productivity models. What is needed are high-level, high-productivity programming models that are user friendly without compromising on performance.

What application developers need, near-term and long-term

The following points were made during this session:

  • Application developers who are not quantum experts need high-level abstractions that enable them to program quantum computers productively and with high performance, but (a) we don’t know what those abstractions are and (b) it’s impossible to get performance with anything other than the lowest-level interfaces. So, while it’s good to think about high-level abstractions, near-term application developers also need access to lower levels of the software stack to get the needed performance.
  • The current noisy intermediate-scale quantum computer (NISQ) era will be supplanted at some point by the fault-tolerant quantum computer (FTQC) era. The differences in how FTQC and NISQ machines are used is not fully understood but it is likely that they will be considerable.
  • Better high-level abstractions are needed. The circuit model is not high level. What might work at the high level? Hamiltonians? Interfaces specific to a particular method, such as machine learning or constrained optimization? Something else? A better understanding of the root attribute of quantum computing’s power would help ensure that the abstractions help programmers express that attribute clearly. (I.e., for exactly what constructs can a quantum computer deliver exponential speedup?)
  • There are few quantum algorithms (some would say there are only about 5), and tools are needed to enable rapid experimentation with new algorithms. At the outset, algorithm developers likely will work at a midlevel that abstracts some hardware details, not at the high level of application developers. Nevertheless, algorithm developers still need strong model(s) and tools.
  • The programming models and the tools to implement them need the following capabilities:
    • Transparency, the ability for a curious user to figure out how a given layer of the software is modifying a problem for consumption by a subsequent layer of the software, coupled with
    • Guidability, the ability for a knowledgeable user to guide the actions of lower levels of the software;
    • Hackability, an ideal ability for intrepid users to modify the software to address an unanticipated need (hackability is probably most realistic for open-source software); and
    • Composability, the ability to solve a portion of the problem in one module and another portion in another module and compose the modules together and have them work.
  • Given the current challenges for low-level users, it may seem premature to start thinking about programming models for high-level users. But creating good abstractions is notoriously difficult and they are needed before the hardware and related programming models are ready. Moreover, finding strong abstractions forces thinking about quantum system design across a wider set of dimensions, including generality, performance, and implementation complexity. This will make applications developed using those abstractions better performing, longer-lived, and thus more valuable.

Low-level issues that must be addressed for strong performance

The following points were made during this session:

  • There are major challenges to performing even the simplest operations reliably and with high performance on today’s QPUs. Adding the constraint of doing so within certain abstractions (circuit or other) seems almost overwhelming, so for the present the best practice is often to circumvent the abstractions.
  • Mapping existing QPUs to the circuit model is difficult and time consuming, even for QPUs that are nominally native to the circuit model. Examples of the difficulties include the need to (a) exploit variable qubit fidelity in space (i.e., among qubits on the device) and time and (b) synchronize certain operations with others despite poorly understood behavior.
  • Reliable tools for compilation are lacking. Options are to use off-the-shelf compilers, which may not be good enough, or to spend a lot of time fine-tuning and debugging compiler changes for a particular problem.
  • Off-the-shelf compilers too often overlook detailed aspects of hardware, such as coherent (systematic) errors and crosstalk, leading to performance that falls short of what can ideally be achieved, even considering current limitations.

Issues that higher-level programmers are encountering today

The following points were made during this session:

  • Quantum information representations generally are not familiar to application developers and representations that are familiar to developers don’t map to existing QPUs. Might existing high-level application programming interfaces (APIs), such as those for machine learning or constrained optimization, be mappable to quantum computers with transparency to lower levels?
  • The need for expertise throughout the software and hardware stack, to get good performance on a QPU, is highly labor intensive and hence not scalable.
  • We don’t have enough quantum algorithms. This limitation could be addressed with better (low- or mid-level) abstractions and tools for designing algorithms.
  • Hybrid quantum/classical operation is intrinsic to quantum algorithms, but there are not yet good methods for specifying programs that utilize both quantum and classical computation. This is true for both NISQ and fault-tolerant algorithms.
  • Design space needs to be created between application programming models and low-level execution models for excellent compilers to work their magic, as they should automate the management of resources (e.g., qubits and classical/quantum data movement). At present this work is falling on app developers; one participant declared “I don’t want to be a human compiler!”

Next steps

The consensus among workshop participants was that (a) the lack of adequate programming models poses obstacles that will restrict commercial adoption if not resolved; (b) the diverse perspectives of low-level, high-level, and application-level researchers/developers are essential to understanding the full extent of the problem; and (c) several themes emerged that can help guide future development, in academia and industry, of programming models and compilers and the tools to implement them. Following the workshop, a team of interested experts are working to specify what is needed in programming models and tools to address the barriers. Those interested in getting involved should contact Santiago Núñez-Corrales at nunezco2 at illinois dot edu or Steve Reinhardt at steve at xfr dot ai.

Workshop organizers

Raouf Dridi, Quantum Computing Inc.
Pranav Gokhale, Infleqtion
Dor Israeli, Quantum Machines
Tom Lubinski, Quantum Circuits
Tim Mattson, Intel (retired)
Santiago Núñez-Corrales, National Center for Supercomputing Applications, UIUC
Steve Reinhardt, Transform Computing
Yuval Sanders, University of Technology, Sydney
Michał Stęchły, PsiQuantum
Tobias Stollenwerk, Forschungszentrum Jülich

Olivia Di Matteo (University of British Columbia) presented at the workshop and helped prepare this summary.