Hello, I'm Gokita who is in charge of R&D of quantum cloud platform at Quantum Laboratory, Fujitsu Research.
Fujitsu has expanded the Quantum Cloud Platform "Open Quantum Toolchain for Operators & Users" , which Fujitsu has been developing in collaboration with teams including University of Osaka *1, Systems Engineering Consultants Co., LTD. (SEC), *2, and TIS Inc. (TIS) *3, and released it as OSS (Open Source Software) including various quantum software. So I would like to introduce the outline of this OSS.
- About Quantum Computers
- Current Status and Challenges of Quantum Computer System Software
- Significance of OSS release of quantum cloud platform
- Overview of Quantum Cloud Platform "Open Quantum Toolchain for Operators & Users"
- Summary
About Quantum Computers
A quantum computer is a computer that performs calculations using the principles of quantum mechanics. Conventional computers perform calculations in units called bits with two states of "0" and "1," but quantum computers perform calculations using units called qubits instead of bits. A qubit has a property called quantum superposition, and it can have 0 and 1 states at the same time in probability.
In addition, quantum entanglement is a property in which multiple qubits influence each other, and it is expected that by utilizing these unique properties, it will be possible to process calculations in a short time, which would take an enormous amount of time with conventional computers.
Current Status and Challenges of Quantum Computer System Software
Since the number of quantum computers that can actually be used is still small, and the actual operation requires a large amount of labor, it is common for users to use quantum devices such as quantum computers and quantum circuit simulators by using cloud services provided by companies (providers) that own quantum computers. In this case, the user creates a quantum program using various quantum software (For example, SDKs, libraries, circuit conversion programs, etc.) provided by the provider, and accesses the quantum device through the system software operated by the provider.
Most of the software for users who "use" these quantum computers is released as OSS and is actively developed, but the system software for providers who "operate" quantum computers is rarely released. The system software to be developed by the provider covers a wide range of functions, including user authentication functions, job scheduler functions to manage jobs thrown by users, quantum device management functions, and functions to mediate job information between cloud services and quantum devices. It is difficult for companies, startups, and research institutes developing quantum computers to develop these system software on their own.
In addition, it is possible to register a quantum device in a service operated by a major quantum cloud vendor without developing the system software from scratch on the provider side, and open the quantum device to the user through the service. However, the system software specifications of the quantum cloud vendor are bound, and it is difficult to customize it to meet the needs of quantum device developers.
Significance of OSS release of quantum cloud platform
In light of this situation, we have released the quantum cloud platform "Open Quantum Toolchain for Operators & Users" as an OSS. The significance of OSS release of quantum computer system software is summarized again.
- Collaborative development and improvement of quantum software by developers from all over the world can incorporate diverse opinions and technologies, leading to improved software quality and functionality
- Start-ups, companies, and research institutions that are researching and developing quantum computer hardware will be able to easily build the system, and will receive a wide range of feedback as it is used by many users.
- It will enable users and providers of quantum computers to freely modify and build systems according to their needs, leading to accelerated research on quantum applications and quantum software.
With the release of the OSS, we hope that quantum computer users and providers around the world will join our development community and revitalize the quantum system software field.
Overview of Quantum Cloud Platform "Open Quantum Toolchain for Operators & Users"
The outline of the quantum cloud vendor platform "Open Quantum Toolchain for Operators & Users" released this time is briefly explained by following how jobs created by users are processed inside the quantum cloud system.
First, in order for a user to use a quantum computer via a cloud service, the user must request a quantum circuit created by the user to the cloud service via an SDK or web application.
The cloud layer receives jobs after user authentication, and while queuing jobs and managing jobs, waits for a request to acquire jobs from the backend layer.
The backend tier polls the cloud tier periodically to see if there are jobs available to run. When the back-end layer receives a job, it undergoes preprocessing, such as a process called transpile that transforms the input quantum circuit into a form that can be run on a quantum device. The preprocessed quantum circuit is executed by the quantum device to obtain the sampling result, and the result is corrected by error mitigation processing or post-processed according to the type of job, and then returned to the cloud by API.
Finally, the user retrieves the result, which completes the process.
The figure below illustrates the above process sequence. The area enclosed in a red frame is the area covered by our software, and you can see that it covers all but a few components close to the actual machine.
The following is a bit of a dive into the typical components of cloud and edge server.
Cloud Component
The cloud component exposes APIs to the front-end and back-end layers and is a central part of our quantum cloud platform to handle both requests. The interface specification is written in OpenAPI *4 format and allows HTTP protocol access to URLs designed according to the RESTful API.
The main functions are user authentication, job management, and job queuing. The authentication function is implemented using Amazon Cognito, the API function using Amazon API Gateway, the application function using AWS Lambda, and the job management using Amazon RDS.
For API development, we have adopted schema-driven development using datamodel-code-generator *5, which automatically generates code from OpenAPI specifications, and FastAPI *6 frameworks to prevent the divergence between specifications and implementation. For more information, please visit the following blog. zenn.dev
In addition, our cloud component is IaC (Infrastructure as a Code) enabled by Terraform *7, enabling automation of infrastructure construction and code management of configuration changes.
Edge-Server Component
The edge server component is responsible for the entry point of the back-end layer, and is responsible for mediating the conversion (transpile) of quantum circuits and the execution processing in real machines. Periodically poll the cloud layer to obtain jobs, schedule quantum circuits to run at appropriate times, and perform pre-processing and post-processing depending on the type of job.
Tranpile, which is part of the preprocessing, is performed in cooperation with Tranqu *8, a one-stop transpiler framework that supports multiple quantum circuit library formats. The gRPC protocol *9 is used to communicate with Tranqu quantum devices and internal microservices.
In addition to basic sampling jobs, our edge-server supports estimation jobs, quantum multi-programming *10, quantum classical hybrid job functions, which we call SSE (Server Side Execution) *11, and error mitigation processing of sampling results executed by quantum devices.
In the following sections, we will delve a little deeper into the estimation jobs and error mitigation processes that Fujitsu contributed to the development.
Estimation job
Many quantum algorithms require calculation of expected values of physical quantities (observables). For example, VQE determines the ground state energy of a molecule by minimizing the expected value of the Hamiltonian, and quantum machine learning minimizes the parameters of a quantum neural network by minimizing the expected value of the loss function. Therefore, the ability to easily perform expected value calculations is important as quantum system software. Here's how the expected value is calculated.
Any observable can be represented by a linear combination of Pauli operators
. For example, one qubit observable can be decomposed as follows:
Similarly, a two qubit observable can be expressed as a linear combination of 16 basis operators . Next, if we want to determine the expected value for a quantum state
for this observable, the expected value
is:
Given the previous example of a one-qubit observable, this equation can be decomposed as.
Most quantum computers typically measure on a basis, but each Pauli gate can be added to the quantum circuit corresponding to the quantum state
to obtain measurements on each Pauli basis. Once the expected values for each term are determined, the overall expected value can be calculated using a linear combination of the terms.
In the implementation of the our edge-server, the pre-processing adds the measurement of each term of the observable by the Pauli operator to the input quantum circuit. In the post-processing after the processed at the quantum device, the expected value of each term is obtained from the measurement results of each quantum circuit, and the expected value of the entire observable is calculated by linearly combining the results.
Quantum Error Mitigation
In today's noisy quantum computers (NISQ devices), quantum error mitigation is an important technology to improve the accuracy of calculation results. Quantum computers are prone to errors due to environmental noise and gate imperfections. Quantum error mitigation aims to achieve more accurate calculation results by mitigating these errors rather than correcting them completely.
There are various methods for quantum error mitigation, such as zero-noise extrapolation(ZNE) and probabilistic error cancellation(PEC), but our edge-server implements the readout error mitigation function.
In the readout error mitigation, the sampling result with the measurement error can be considered as the product of the ideal sampling result
and the error matrix
, which can be obtained in a noiseless world.
The element of the error matrix
represents the probability of obtaining a measurement result of
if the true state is
, and is expressed as
.
For example,
in a two-qubit device is following:
By multiplying both sides by the inverse matrix of
, the ideal sampling result
without any measurement error is obtained.
However, as it is, may contain negative counts, so we have corrected this by making the pseudo probability distribution closer to the nearest neighbor probability distribution. Our edge-server implements this process after the quantum device is executed.
Summary
In this article, we explained the background of making the cloud service of quantum computer available as OSS and the outline of the source code. The development team, including Fujitsu, will continue to develop quantum technology with the aim of realizing universally usable quantum technology and standardizing the quantum cloud platform.