By Brian Siegelwax

This is a review of version 1.0 of Intel’s Quantum SDK that was released last February. You can view the article we posted when the software was released at Intel Releases Version 1.0 of their Quantum SDK.

The SDK is accessed through Intel’s DevCloud for oneAPI which they call a Development Sandbox

Intel’s SDK for Enterprises

The Internet is abuzz with the release of Intel’s updated Software Development Kit (SDK). But, while Intel’s SDK initially resembles other popular SDKs, closer scrutiny reveals significant differentiating factors. Intel’s SDK, therefore, cannot be directly compared to other SDKs, because any feature that makes Intel’s SDK look advantageous turns out to be unfair to other SDKs, and vice versa. It’s akin to comparing oranges and apples: an orange is a terrible apple and an apple is a terrible orange, but an orange is an orange when you want an orange and an apple is an apple when you want an apple.

Enterprise Class

In the post-NISQ era, quantum algorithms will not run in isolation. Applications will run specific computation on quantum processors (QPUs), akin to how specific computation is run today on GPUs. In fact, a single application could conceivably perform computation on QPUs, GPUs, and a variety of other specialized hardware. These applications, especially those that need to run in real time, will not run in Jupyter notebooks. Many programming languages offer superior performance to Python, including C++, which is second only to C in speed.

There is a tradeoff, however. C++ is a compiled language, and compilation takes time. For designing quantum circuits, for rapid prototyping of applications, and for learning about quantum computing, in general, using an interpreted language like Python is advantageous. Therefore, Python-based SDKs prepare you to do quantum computing, while Intel’s C++ SDK offers a better way to actually do quantum computing.

Visualizations

One observation of Intel’s SDK, that might initially appear to be a deficiency, is the lack of visualizations: histograms, Bloch/Q-spheres, and the like. But, while Python-based SDKs provide easy ways to visualize results, these easy-to-use, aesthetically-pleasing visualizations can detract from performance. Intel, therefore, decided to think of their SDK as a toolkit instead. Enterprises can use the SDK to customize outputs to display the information they need while minimizing the impact such displays have on performance. Intel does intend, however, to provide a library or libraries in the future, and they’ll presumably be focused on minimalist visualizations using command line interfaces.

Screenshots showing Intel SDK’s complete C++ code for a twelve-qubit GHZ state. Shown with Intel’s permission.

Code vs Code

C++ should always require more code than anything written in Python, because you’re grabbing more control over the performance of your application. And for small quantum circuits, quantum assembly languages (QASM) use the least possible code. For larger circuits, Python often gains an advantage over QASM due to IF statements, FOR/WHILE loops, and a multitude of libraries. Python applications require as little as a library import and a function call, but you trade performance for this ease-of-use. The disparity among lines of code can be eased by moving C++ into libraries, but such libraries still need to be developed. And, of course, Python language libraries should always contain less code, so the overall code will still be less.

Above this section are the three screenshots required to show the Intel SDK’s complete C++ for a twelve[MAY1] -qubit GHZ state using 45 lines of code. For comparison, an[MAY2] equivalent circuit can be programmed with ten lines of OpenQASM2 including a display of the circuit diagram and a histogram of the output. The Intel SDK code is much longer despite not including either the histogram or the circuit diagram.

Code examples in Intel’s SDK of some common textbook quantum algorithms

Intel’s SDK includes a small number of code examples, which consist mostly of the textbook quantum algorithms. The non-textbook examples can be implemented with less code by Python-based SDKs. And for applications such as molecular simulation and optimization problems, Intel’s SDK doesn’t yet have examples. It’s worth noting that Python libraries can be integrated into C++ code, but that would be detrimental to performance.

Intellectual Property

Many quantum computing frameworks and platforms are open source, with their code freely available on GitHub. Most of the algorithms and applications that use these libraries are written in Python, which is also free to see by anyone who has access. Intel’s SDK uses the C++ language, which is compiled. While compilation doesn’t completely protect an algorithm, it adds a technical challenge to anyone who would like to reverse engineer the algorithm. In addition to seeking legal protection for your algorithms, C++ offers a degree of technical protection.

Picture of a Quantum Dot Chip. Credit: Intel

Quantum Dot Emulator

Superconducting qubits are different from neutral atom qudits which are different from photonic modes and which are different from quantum dots, shown above. The focus is usually on coherence times and error rates, but applications warrant attention, as well. We don’t know what we might be able to do with quantum dots that may be particularly well suited for quantum dots. For example, neutral atom Rydberg states are a natural fit for maximum independent set problems, and that does not carry over to either superconducting qubits or photonic modes. At this time, Intel’s emulator might be the only publicly-accessible platform for researching potential quantum dot advantages.

Importing

One option might be to use Intel’s SDK with other frameworks, viewing them as complimentary rather than competitive. There are many Python-based and Internet-based tools for easily developing quantum circuits. Intel’s performance-centric SDK does not have such tools, but it can import from the popular frameworks via its “OpenQASM2 to C++” feature. Developers can rapidly design and optimize quantum circuits with these other tools, and then use Intel’s SDK to optimize the performance of the applications that will run these optimized quantum circuits.

Familiarity

Many developers of enterprise applications are already familiar with C++ and Linux. For those who will develop applications that will integrate quantum computing, which does not necessarily include designing quantum algorithms, achieving familiarity with quantum computing might be easier using Intel’s SDK than having to learn Python, Jupyter notebooks, and a myriad of libraries they may never otherwise use.

Simulator vs. Simulator

While Intel’s SDK boasts a 34-qubit quantum computing simulator on one computation node (more than 40 qubits on multiple nodes), it must be remembered that quantum computing simulation is based on classical processing power and classical memory. Publicly-available QC simulators tend to be in this 32/34 range in regards to the number of simulatable qubits. Therefore, the simulator that matters is the one compatible to the framework in use. Perhaps more classical computational power is available elsewhere, perhaps not, but the important thing is that Intel has a competitive one available. Developers can prototype enterprise-class applications with simulated quantum processing. That said, Intel earns bonus points for naming their simulator “quantum_8086.”

Simulator Usage

You only want to use Intel’s simulator if you’re developing a C++/Linux application. Other providers offer simulators that you can use without any installations or configurations or time consuming program compilations. Small circuits can be simulated with the other alternatives before Intel’s SDK has time to compile the C++. Runtime comparisons would have to factor in compilation times, which will lengthen as complexity is added. Runtime is also lengthened by trading the clicking on a button in a Jupyter notebook to typing in the various Linux commands needed to queue jobs and retrieve results. Therefore, there is no quick simulation with Intel’s SDK, and the process of using Intel’s simulator is probably the slowest of available simulators. For a fair comparison, the algorithm being compared would have to be big and slow, and runtimes would have to factor in ever-lengthening compilation times. Keep in mind that troubleshooting requires re-compilation, therefore quantum computing program development quite often will be slower with Intel’s SDK.

Picture of a Wafer Containing Intel’s Quantum Dot Qubits. Credit: Intel

Noise Simulation

The Intel Quantum Simulator backend includes noise models in the SDK but doesn’t have hardware-specific noise models yet. Quantum computers have unique noise models that change over time. Users who wish to use a specific device without waiting in queues can alternatively emulate using those specific devices using an accurate noise models. When Intel makes its hardware publicly-accessible or at least regularly generate noise models and make those publicly accessible a use will be able to run their program to determine the effects of noise.

Diagram of Intel’s Quantum Roadmap. Credit: Intel

Roadmap

Intel’s SDK includes mid-circuit measurements[MAY3] , but does not yet support dynamic circuits that do different things based upon the result of the measurements. A Qiskit visualization of a dynamic circuit using a mid-circuit measurement is shown below. Ignoring dynamic circuits for a moment, mid-circuit measurements allow qubits to be measured as soon as they are ready to be measured; in the absence of mid-circuit measurements, some qubits likely have to maintain their coherence, during which time errors may occur, while waiting for other qubits to be ready to be measured.

Example of a Dynamic Circuit that Can Take Advantage of Mid-Circuit Measurement

Mid-circuit measurements open up the possibility of dynamic circuits, as shown above, which allow quantum operations to be executed conditionally upon the results of mid-circuit measurements. In the circuit above, an operation is executed on q1 if the mid-circuit measurement on q0 is a one. If the mid-circuit measurement on q0 is a zero, no operation is executed on q1. The quantum circuit is dynamic, and the operations that execute may vary each time the circuit is run.

Suggestions

Focus on integrating quantum computation into enterprise-class applications, not on designing algorithms. C++/Linux programmers are typically not quantum algorithm researchers, and should only need to know about the Intel SDK tool to convert QASM to C++. The researchers designing the quantum circuits have tools that are faster and easier to work with. They can export the QASM and then run the aforementioned conversion tool.

Should Intel’s SDK be used for circuit design anyway, documentation should show compiled applications importing QASM so that constant recompilation is not required. Compiling the final circuit might be advantageous, but compiling every intermediary circuit is not.

Furthermore, installation and configuration should be simplified. In enterprise settings, in particular, the need to modify workstation security settings might be a hindrance.

Conclusion

There are enterprises that rapidly prototype in Python, but then translate code to C++ for production environments. Intel’s SDK is quantum computing’s equivalent of a production environment. Learning quantum computing and designing quantum circuits can be relatively slow when code has to constantly be re-compiled. So, a drag-and-drop circuit builder such as Quirk, which provides immediate feedback when designing small circuits may be a better choice in those situations. But when an enterprise-class application requires real-time, high-performance processing, eventually leveraging quantum computational advantages, C++ is a legitimate contender for production environments.

Another key reason to consider the Intel SDK is that it will be the way to use the full Intel quantum processor expected to become available in the near future. The spin qubit based technology that Intel is working on will likely be a very important modality in the future and using the Intel SDK will be quickest way for someone to start experimenting with it.

If you’re developing enterprise-class applications, or you specifically want to research quantum computing with quantum dots, or you’re a C++/Linux programmer who doesn’t want to learn Python, then Intel’s SDK may be right for you. For all other purposes, whether for education or for research, existing Python SDKs are more time efficient than compiling code and using command line interfaces. If available skillsets include both C++/Linux and QASM/Python, quantum circuits can be rapidly and easily designed in QASM/Python, exported as QASM, and then converted to C++ for integration into a high-performance application.

April 7, 2023