Introducing QURI Parts: Modular and efficient open-source libraries for quantum computing
In today’s development of quantum computing software, one needs to deal with several challenges:
- Reusability of code: it is often necessary to test algorithms across different platforms, including quantum circuit simulators and real quantum computers. Since different platforms require writing the code with their own SDKs, you often need to rewrite the algorithms for each SDK.
- Computing performance: though there are fast simulators for quantum circuits, their speed is sometimes compensated by the overhead of classical computation before and after the simulation, such as object conversion, data preparation, and post-processing.
- A lot of unwanted dependencies: SDKs for quantum computing tend to have a lot of dependencies, most of which are only required for limited use cases. Such unwanted dependencies increase time spent on various steps of development and may cause trouble.
We, developers at QunaSys, have been facing those challenges and decided to build a fundamental library suite to address them. Today, we introduce the library suite, QURI Parts, as open-source libraries. QURI stands for “Quantum Universal Research Interface,” representing what we want to provide to quantum researchers and developers through this library suite. QURI is pronounced as cue-ree, which is the same as an old Chinese word 究理 meaning “pursuing rational principle.”
QURI Parts provides basic components that can be used to assemble quantum algorithms as portable and performant Python code. It focuses on the following features:
- Modularity and extensibility: The components are provided as small parts, each of which is designed to conform to standard interfaces so that you can replace them easily. Those components are packaged in several modules so that you can install only what you need without installing too many unnecessary dependencies. It is also simple to implement a component conforming to the standard interfaces by yourself and use it together with other components available in QURI Parts.
- Platform independence: The standard interfaces in QURI Parts are designed carefully so that you can easily write platform-independent code. Once you write the main algorithm code, you can switch between various simulators and platforms by typically adding only a few lines. It is also possible to write code that dynamically selects which simulator or platform should be used.
- Performance: In the design of QURI Parts, we prioritize computation performance, especially for simulators. We have a module for using Qulacs, one of the fastest quantum circuit simulators, with QURI Parts, where we focus on reducing overhead as much as possible so that the performance of Qulacs does not get spoiled. The overhead of circuit conversion before execution is considerably small, making it faster than other libraries and simulators. We are aware that there is still room for performance improvement, which will be addressed in future versions of QURI Parts. Besides overhead for the simulator, we pay attention to the performance of classical pre and post-processing, e.g. reconstructing the expectation value of a Pauli operator from a sampling result.
Circuit conversion + execution time comparison between Qulacs (no conversion), QURI Parts, and other libraries using Qulacs. A modified version of the benchmark code at benchmark-qulacs repository was used. The benchmark was conducted using multi-threading on an Intel Core i5-11400 CPU.
Current QURI Parts covers the following areas related to quantum computing. Of course, we are going to keep expanding the coverage in future versions.
- Basic concepts
- Quantum gate and circuit, and noise
- Quantum states and operators
- Circuit sampling, estimation of the operator expectation value
- Ansatz for variational algorithms
- Error mitigation techniques
- Platform (device/simulator) support
- Quantum circuit simulators: Qulacs, Stim
- Quantum platforms/SDKs: Amazon Braket, Cirq, Qiskit
- Chemistry application
- Fermion-qubit mapping, OpenFermion support
QURI Parts is already used in our research projects, including joint research with customer companies. We will actively keep working on QURI Parts and add more features. If you are a researcher, a developer, or a student who is working on quantum computing, please try implementing your code with QURI Parts and share with us what you think. You can post issues on the GitHub repository of QURI Parts. We will appreciate any feedback or contribution.
- QURI Parts documentation https://quri-parts.qunasys.com
- Tutorials https://quri-parts.qunasys.com/tutorials.html
- GitHub repository https://github.com/QunaSys/quri-parts