The Benefits of Advanced Real-Time Control Flow

We use many different languages every day to communicate with one another. Similarly, software developers use programming languages (Python, C++, Java, etc.) to communicate what they’d like a computer to do. There are many languages designed for different purposes, ranging from scientific data analysis to maximizing performance.

Quantum computing is still evolving. The level of programming tends to be lower level where individual qubits are still being manipulated by developers. Several representations of quantum programs already exist – Qiskit, Q#, Tket, Cirq, etc. However, it often takes a great deal of technical expertise to grasp their differences and why you would choose one over another. Each exhibits its strengths. Some are popular simply due to the traction they’ve accumulated over time, while some haven’t gained popularity because of the esoteric nature of their environments or their complexity.

The quantum community agrees that much work needs to be done to develop new types of applications. They are searching for unique features that can offer novel ways of expressing quantum calculations. The existing methods have been tried and tested, and their limits have been exposed. New features will empower the broadest class of capability and utility in the quantum domain.

This is where advanced Real-Time Control Flow (RTCF) comes in.

At Quantum Circuits, we believe it is an essential piece of the future quantum programming model. It is the cornerstone of our QCDL quantum API. It also plays an essential role in raising industry standards for quantum programming languages like the Quantum Intermediate Representation (QIR), which is driven by the QIR Alliance  (Quantum Circuits is one of its founding members).

Indeed, companies like NVIDIA also leverage these representations to build their own quantum languages – CUDA-Q – to leverage real-time control capability in novel and performant ways. Microsoft and Quantinuum emphasize the importance in their recent joint efforts on error correction.

So, why advanced RTCF? We introduced the broad strokes before in our overview of error-awareness, but let’s drill in.

Broadly speaking, RTCF is a collection of features that gives users the ability to tightly integrate classical and quantum computations in real-time, within the coherence times of qubits. This allows users to implement new and unique algorithms or increase the efficiency of existing ones. Below is a breakdown of the features in more detail:

  • Measurement-based Feedforward: branch in real-time based on mid-circuit measurements.
  • Arithmetic, Function Calls: add; multiply, etc., with results stored in variable; parameterizable functions.
  • Conditional Branching: Branching based on classical calculation outcomes; for example, comparing arithmetic results to quantum measurements (0 or 1).
  • Run-time Looping Capability: Looping via real-time feedback, using constructs like for or while loops.
  • Dynamic Parameterized Gates: Passing variable values as parameters to gates in real-time.
  • Branching on Detected Errors: Branching & gate execution based on error detection measurement outcomes in real-time.
Example quantum circuits illustrating Quantum Circuits’ real-time control flow capability.

The above capabilities are empowering. For starters, engineers spend less time preparing quantum computers for deployment because all calibration can run more quickly. This means more uptime for customers and less waiting for a precious QPU resource.

Likewise, algorithm designers who want to execute loops and quick math can do so on the timescales of qubits – in our case, that’s nanoseconds – without having to stop the quantum calculation and kick off a slow classical process. Just imagine that overhead: Stop the algorithm, send the result to a computer, run the equivalent classical piece, send that result back to the quantum computer, resume the quantum algorithm. That could take 100x longer than just doing it all in one tightly coupled program. With RTCF, you can save time and money – lots of it.

Next, algorithms.

Near-term quantum systems have shown very interesting results. But it’s widely acknowledged that more tools are needed, in addition to error correction, to make substantive leaps in computational capability.

So, let’s think about where the RTCF piece of error awareness fits in. In 2022, Lubinksi et al. published a paper on Random Walk Phase Estimation, which leveraged a number of the most advanced RTCF features to demonstrate where some key new efficiencies in executing quantum phase estimation may be had if real-time control is a resource. That was simply a two-qubit demonstration, so natural extensions to larger systems are possible, and with Quantum Circuits’ architecture, employing error detection is a promising direction as well. 

Given a powerful set of novel tools, developers will have an opportunity to explore and discover new quantum applications that today do not exist, or dramatically enhance the efficiency of those that do. Indeed, RTCF will remain a bona fide tool in any toolkit even when quantum computers are operating at the fault-tolerant level. Given the variety of real-time control options available to users, listed above, applying RTCF techniques at the logical qubit level will offer ample opportunities to boost performance over conventional algorithm techniques. Investing now is the perfect time to prepare for larger systems in the future. RTCF is a new direction today to create quantum value tomorrow.

There aren’t too many examples of hardware vendors who provide these kinds of features. In fact, most hardware vendors don’t provide RTCF. The feature is one of the differentiating features Quantum Circuits offers users. Easily accessible through Quantum Circuits’ QCDL API, users are encouraged to write new programs, run them on our simulators, and test them out on real QPU hardware as it becomes available. 

If you’re interested in learning more about RTCF, error awareness, and how it can impact your quantum workflows, contact us at partner@quantumcircuits.com. We’d love to tell you about our Alpha Program and see if there’s a good fit.

Contact Us

The path to fault-tolerant, commercial-ready quantum computing starts now. Explore with us. Learn more about our technology, products, or customer partnership program. We look forward to meeting you.