Qadence

Pasqal unveils Qadence: a library for Quantum Algorithms

Qadence, a user-friendly library for designing digital-analog quantum programs

PASQAL is launching  Qadence, a user-friendly Python programming package designed to implement analog, digital-analog, or digital quantum algorithms, tailored for quantum machine learning workloads

 

Quantum computing has incredibly progressed over the last decade. Today, quantum processing units implementing tens or even hundreds of qubits are routinely available to research centers and enterprises.

 

Initially, advances in quantum technologies were driven mainly by digital quantum computing. The digital approach lies in implementing algorithms as sequences of discrete quantum operations on one, two, or multiple quantum bits (qubits), called quantum gates.  Despite the universality of this method, it comes with a drawback: digital quantum computing requires thousands of gates to implement programs that can solve real-life problems, but we can only execute a few sequences before the results become unreliable. This happens because individual gates are noisy and errors compound. Reliable digital quantum computers, implementing industrial applications, won’t be available anytime soon.

 

For this reason, another method has recently gained traction in the field: analog quantum computing. In the analog mode, the algorithms are designed to operate on all qubits in the register so that the quantum system evolves continuously in a controlled fashion. The analog method is simpler and prone to fewer errors since it can perform in one computational step what the digital mode would require thousands of steps.

 

And, of course, combining the best of both worlds is also possible and convenient for most algorithms. The digital-analog quantum computing paradigm combines single-qubit quantum operation (single-qubit gates) with blocks of operations in the analog mode. This method combines the universality property, associated with the digital mode, with a reduction in the number of gates thanks to the analog blocks.

 

While accumulating experience in the conception and execution of analog and digital-analog quantum algorithms ,PASQAL scientists realized a lack of user-friendly and efficient quantum programming tools for simplifying the execution of analog and digital-analog programs on both simulators and real quantum devices such as PASQAL’s neutral atoms processors.

 

To bridge this gap, we have been using the full-stack approach to create tools to support neutral atoms quantum processors’ analog and digital-analog capabilities. Pulser Studio—the first no-code neutral atoms programming platform—is the latest addition to that stack. Previously to Pulser Studio, we developed Pulser, an open-source Python library for programming neutral atoms quantum processing units (QPUs) at the pulse level.

 

This year, we are launching Qadence, a user-friendly Python programming package designed to implement analog and digital-analog quantum algorithms tailored for quantum machine learning workloads. While other great packages exist for quantum machine learning, such as Penny Lane, no of them focused specifically on digital-analog quantum algorithm.

 

Novel Qadence’s features

 

We conceived Qadence for algorithms to be structured in “blocks” so that programming is as fun and easy as building Legos. Each block can represent a single quantum gate or a composition of gates. Large bocks are compositions of smaller blocks that can also be compounded while creating the quantum circuit. This approach is inspired by the Yao quantum library for constructing quantum programs.

 

Qadence’s blocks structure.
The following list summarizes the main Qadence’s novel features

 

  • User-friendly and open-source library designed to implement analog and digital-analog quantum programs, using a block-based interface inspired by Yao.
  • Works with interacting qubit systems using arbitrary qubit configurations.
  • Account for complex interactions among qubits, reflecting closer the reality of advanced quantum hardware modalities, without requiring deep knowledge of the underlying quantum system.
  • Seamlessly switch from simulations to a real device such as PASQAL neutral atoms quantum computers as soon as they are generally available later this year.
  • Automatic differentiation of quantum programs built on top of PyTorch makes it suitable for quantum machine learning workloads. The efficient implementation of parameter shift rules opens the way to execute digital-analog QML on real devices.
  • Compiles certain types of analog or digital-analog programs, such that they are as efficient to emulate on a classical computer as the corresponding purely digital programs, greatly improving efficiency over established packages such as QuTiP.
  • It is natively integrated with the other two open-source projects maintained by PASQAL:
  1. PyQTorch, a fast emulator for digital and digital-analog programs built on top of PyTorch. PyQTorch allows for fast differentiation of quantum programs with respect to their parameters.
  2. Pulser, a pulse-level interface for programming neutral atoms devices with built-in qubit interaction.

 

Quantum machine learning with Qadence

 

Quantum Machine Learning (QML) is one of the hottest research and development topics in modern quantum computing. At PASQAL, we are advancing QML research and industrial applications from many different angles, ranging from graph machine learning to solving differential equations with quantum neural networks and performing generative modeling using quantum sampling. For this reason, QML is Qadence’s main target application.

 

With Qadence, the programmer can handle models’ trainable quantum circuit parameters in a highly effective way. Qadence offers an efficient and completely general parameter shift rules implementation, paving the way for executing digital-analog QML on real devices. [NH82] Another essential feature is that it provides an efficient way for differentiating a quantum model with respect to its parameters, which is crucial to implementing QML algorithms. For this purpose, Qadence is seamlessly integrated with the popular Pytorch deep learning library for automatic differentiation. All these and other features help the programmer, for example, find the parameters that minimize the output of a quantum model in just a few lines of code on both emulators and quantum hardware.

 

Upgraded versions of Qadence will include noise channels, error mitigation techniques tailored explicitly for interacting qubit systems, and advanced digital-analog emulation modalities. The ultimate goal of Qadence is to become the standard for executing digital-analog programs by providing a combination of a simplified interface, very accurate emulation of quantum platforms with interacting qubits, and a seamless switch from this emulation to real quantum hardware capable of executing digital-analog programs.

 

This blog briefly introduces you to the world of capabilities Qadence offers. To get started or dive into the Qadence technical details and the package documentation, we invite you to follow this link. For any feed back or feature request, please open an issue here.

 

References

  • M. A. Nielsen and I. L. Chuang.(2010) Quantum computation and quantum information. Cambridge university press.
  • Dodd et al. (2002). Universal quantum computation and simulation using any entangling Hamiltonian and local unitaries. Phys. Rev. A(65): 040301.
  • Parra-Rodriguez et al. (2020). Digital-Analog Quantum Computation. Phys. Rev. A(101): 022305.
  • Schuld, P. (2021). Machine learning on Quantum Computers. Springer Nature.
  • Schuld et al. (2019). Evaluating analytic gradients on quantum hardware, Phys. Rev. A(99): 032331.
  • Kyriienko et al. (2021). General quantum circuit differentiation rules. Phys. Rev. A(104): 052417.

 

Would you like to learn more about these techniques on a neutral atom quantum computer? Get familiar with quantum computing, our platform, and algorithms with Quantum Discovery.