QunaSys / quantum-algorithm-grand-challenge-2024

10 stars 10 forks source link

Quantum Algorithm Grand Challenge

Table of Contents

  1. Overview of Quantum Algorithm Grand Challenge
  2. Introduction
  3. Problem description
  4. Evaluation
  5. Implementation
  6. How to submit
  7. Description of the Provided Program
  8. Available Packages
  9. Notes and Prohibited Items
  10. Terms

Overview of Quantum Algorithm Grand Challenge

Quantum Algorithm Grand Challenge (QAGC) is a global online contest for students, researchers, and others who learn quantum computation and quantum chemistry around the world.

Through this challenge, we aim to explore practical uses of Noisy Intermediate-Scale Quantum (NISQ) devices, visualize bottlenecks in NISQ device utilization, and create metrics to benchmark NISQ algorithms.

Date

From February 1, 2024, 0:00 (JST) to June 30, 2024, 23:59 (JST)

Web-site

https://www.qagc.org/

Awards

Currently, QunaSys is planning to apply to hold a workshop to be hosted by QunaSys at IEEE Quantum Week 2024. IEEE Quantum Week 2024 will be held as an in-person event with virtual participation on Sep 15–20 at Palais des Congrès Montréal, Québec, Canada. As in previous years, if applications are approved, the top three teams will be invited to present their algorithms at this workshop. We plan to share the details with participants as soon as they are finalized.

For more information on IEEE Quantum Week 2024, please visit the website https://qce.quantum.ieee.org/2024/.

Introduction

As Quantum Computing technology evolves with qubit capacity regularly duplicating, we need to understand how to make better use of NISQ devices and create algorithms that will enable industrial applications. To identify how to shape the direction for promoting the NISQ algorithm for practical industrial application, it is important to clarify the evaluation criteria to compare the algorithm's performance and define the key factors to take into account.

We hold a global online contest, the QAGC, to explore practical uses for NISQ devices, visualize bottlenecks in NISQ device utilization, and create a metric for benchmarking the NISQ algorithms.

Background

The materials around us are constructed from molecules and the microscopic behavior is dominated by quantum mechanics. Quantum chemistry is widely used to understand the chemical behavior of these materials in not only academic studies but also material design in industries.

Quantum chemistry is considered one of the most promising fields for considering practical industrial applications of NISQ devices and algorithms. However, although various NISQ algorithms have been proposed in recent years, it is still far from practical industrial applications.

For practical industrial applications of NISQ algorithms, it is important to develop new useful NISQ algorithms and define evaluation criteria for accurately comparing the performance of various algorithms and define the key factors to take into account.

Based on these situations, the focuses of QAGC are on the industrial application and defining evaluation criteria for appropriate performance comparison of NISQ algorithms. We have prepared a simulator that reflects the features of NISQ devices and a suitable model for the problem to achieve these goals. Below, we will explain each of them.

Model description

The ground-state energy of a molecule is an important quantity for understanding its properties and behavior, and many quantum chemistry studies focus on the ground-state energy of individual atoms or molecules.

In QAGC, the task of participants is to calculate the ground-state energy of a model (Hamiltonian) which we have prepared. From the focus of QAGC, the Hamiltonian should have some properties as follows:

We have prepared a Hamiltonian that satisfies all of these properties. The detail of the Hamiltonian and the problem statement in QAGC is written in Problem.

Simulator

In order to explore the practical application of NISQ devices and to visualize the bottlenecks in their use, it is necessary to perform simulations that reflect the features of NISQ devices in systems with enough qubits to address practical problems.

In QAGC, the participants need to use a sampling simulator we have provided. In this sampling simulator, quantum circuits are internally converted to Matrix Product State (MPS) and sampled using the MPS simulator, which is faster than ordinary simulators. This enables sampling simulation at 28 qubits, which is difficult to achieve with ordinary simulators. This simulator is used by calling MPS simulator in ITensor through QURI Parts.

In addition to this, noise is an important feature of NISQ devices, and it is necessary to consider how to deal with noise when considering the practical use of NISQ devices. Therefore, in this simulator, the approximation error in converting the quantum circuit to MPS is regarded as noise, and a simulation with noise at 28 qubits is performed. It should be noted that the noise of this simulator is essentially different from the noise of the NISQ device due to the above-mentioned origin.

Also, when sampling within the algorithm, the total number of shots is limited to no more than $10^7$.

Problem description

Fermi-Hubbard Model

Below is an explanation of the Hamiltonian used in QAGC. For further details, please refer to the following paper. https://arxiv.org/abs/2402.11869

The Fermi-Hubbard model is a model used to describe the properties of strongly correlated electron systems, which are solids with strong electron correlation effects. It is used to explain important physical phenomena such as magnetism, Mott insulators, and high-temperature superconductors.

In QAGC, we deal with a one-dimensional orbital rotated Fermi-Hubbard model with periodic boundary conditions. The Hamiltonian of one-dimensional Fermi-Hubbard model is as follows:

$$ H = - t \sum{i=0}^{N-1} \sum{\sigma=\uparrow, \downarrow} (a^\dagger{i, \sigma} a{i+1, \sigma} + a^\dagger{i+1, \sigma} a{i, \sigma}) - \mu \sum{i=0}^{N-1} \sum{\sigma=\uparrow, \downarrow} a^\dagger{i, \sigma} a{i, \sigma} + U \sum{i=0}^{N-1} a^\dagger{i, \uparrow} a{i, \uparrow} a^\dagger{i, \downarrow} a_{i, \downarrow}, $$

where $t$ is the tunneling amplitude, $\mu$ is the chemical potential, and $U$ is the Coulomb potential. For the case of half-filling, i.e. the number of electrons is equal to the number of sites, the exact value of the ground-state energy for this Hamiltonian can be calculated by using Bethe Ansatz method.

This time we consider the orbital rotated one-dimensional Fermi-Hubbard model. The orbital rotation means the linear transformation of the creation operator $a_i^\dagger$ and annihilation operator $a_i$ by using unitary matrices

$$ \tilde ci^\dagger = \sum{k=0}^{2N-1} u_{ik} c_k^\dagger, \quad \tilde ci = \sum{k=0}^{2N-1} u_{ik}^* c_k. $$

where we label the creation operator $a_{i, \sigma}^\dagger$ as follows:

$$ a{i, \uparrow}^\dagger = c{2i}^\dagger, \quad a{i, \downarrow}^\dagger = c{2i + 1}^\dagger. $$

The annihilator operator is labeled in the same way.

By performing this spin-involved orbital rotation, the 1D FH Hamiltonian can be expressed as

$$ \tilde{H} = \sum{p, q =0}^{2N-1}h{pq} c^\dagger_p cq + \frac{1}{2}\sum{p, q, r, s =0}^{2N-1}h_{pqrs} c^\dagger_p c_qc^\dagger_r c_s. $$

Here, the coefficients $h{pq}$, $h{pqrs}$ are the one-body and two-body coefficients, respectively, and they are expressed as follows:

$$ h{pq} = -\sum{i =0}^{N-1}(u{2i,p} u{2i+2,q}^ + u{2i+2,p} u{2i,q}^ + u{2i+1,p} u{2i+3,q}^ + u{2i+3,p} u{2i+1,q}^ + \mu \delta_{pq}), $$

$$ h{pqrs} = 2 U \sum{i=0}^{N-1} u{2i,p} u{2i,q}^ u{2i+1,r} u{2i+1,s}^. $$

This form is the same as the second quantized molecular Hamiltonian in quantum chemistry and the number of terms is $\mathcal{O}(N^4)$ which is the same as the molecular Hamiltonian.

After performing orbital rotation, the Hartree-Fock calculation can be performed similarly to the molecular Hamiltonian. The resulting Hartree-Fock state becomes:

$$ |HF\rangle = |00\dots 0011\dots 11\rangle $$

where electrons are filled from the bottom up for a number of sites.

For QAGC, we will provide the Hamiltonian obtained by orbital rotation using a real orthogonal matrix. By using a real orthogonal matrix, the Hamiltonian becomes real and it become more similar to the actual molecular Hamiltonian.

Problem statement

Find the energy of the ground state of the one-dimensional orbital rotated Fermi-Hubbard model.

$$ \tilde{H} = - t \sum_{i=0}^{2N-1}(\tilde c^\daggeri \tilde c{i+1} + \tilde c^\dagger_{i+1} \tilde ci) - \mu \sum{i=0}^{2N-1} \tilde c^\dagger_i \tilde ci + U \sum{i=0}^{N-1} \tilde c^\dagger{2i} \tilde c{2i} \tilde c^\dagger{2i + 1} \tilde c{2i + 1} $$

The value of each parameter is $N = 14,\ t=1, U=3,\ \mu=U/2 = 1.5$.

For QAGC, we prepared an orbital rotated Hamiltonian with the random real orthogonal matrix $u$ and performed Hartree-Fock calculation.

In the hamiltonian folder, in addition to the 28 qubit Hamiltonian, we also prepared 4, 12, and 20 qubit Hamiltonians in the format .data. Participants can use these Hamiltonians in implementing their algorithms.

Evaluation

First, the submitted answers are checked for compliance with the prohibited items. Then, we calculate the score based on the answers, and the ranking is determined.

During the evaluation, Hamiltonians constructed using a real orthogonal matrix different from the one used to construct the Hamiltonian provided to the participants will be used.

Score

The score $S$ is calculated as the average accuracy computed from each absolute error over 10 runs of the algorithm, rounded to the nearest $10^{-8}$. The smaller the score, the higher the ranking you can achieve.

For each run, the absolute error is calculated as follows:

$$ e_i = \left|Ei - E{\mathrm{exact}}\right|. $$

Here $Ei$ is the output result of the $i$ th algorithm and $E{\mathrm{exact}}$ is the exact value of the ground-state energy.

The score is determined as follows:

$$ S = \frac{1}{10}\sum_{i=1}^{10}e_i $$

Limitation by the number of shots

Reducing the number of shots is crucial for considering the industrial application of NISQ algorithms. To reflect this, participants will be imposed a limit on the number of shots.

For the QAGC, the total number of shots is limited to $10^7$.

Limitation by Run Time During the Evaluation

During the evaluation period by the management, the submitted algorithm must be completed within one week ( $6\times10^5$ sec) on a computer with the following specifications. If the evaluation period exceeds this limit and is not completed, it will be forcibly stopped and the score at that time will be the final score.

Maximum Usable Qubits

In QAGC, the number of the maximum usable qubits has been set to 55 to prevent a substantial increase in the number of shots resulting from running two same 28-qubit circuits in parallel. Within this limit, you are free to add more qubits, but the calculation must be completed within the time limit.

Implementation

Here, we will explain the necessary items for participants to implement their answer code.

Participants need to write their algorithms in answer.py.

We have prepared an answer example in example_***.py, so please refer to it.

Below, we will explain the sampling function and how to use the Hamiltonian of the problem.

Participants can calculate the score by running evaluator.py.

Since we are dealing with a large qubits system such as 28 qubits, running evaluator.py using the code in example_***.py takes one or two days for a single execution.

How to submit

The participants's code will be submitted as an issue using this template summarizing your project. Specifically, this issue should contain:

  1. Team name: Your team's name
  2. Team members: Listup all member's name
  3. Project Description: A brief description of your project (1-2 paragraphs).
  4. Presentation: A link of the presentation with slides of your team’s hackathon project.
  5. Source code: A link to the final source code for your team's hackathon project (e.g., a GitHub repo).

The score will be calculated by the management side, and the rankings will be determined and published on the QAGC web site.

Here are some points to note when submitting.

Description of the Provided Program

We have provided some codes for QAGC. The descriptions of each code are as follows.

The code in problem is structured as follows

The code in utils is structured as follows.

Available Packages

The following Python software library can be used in QAGC.

QURI Parts is an open-source quantum computing library that is modular, efficient, and platform-independent, developed by QunaSys.

All codes we have prepared are written by using QURI Parts.

In QURI Parts, there are codes to convert circuits of Braket and circuits and operators of Qiskit and Cirq to QURI Parts circuits and operators. Therefore, when implementing with Braket, Qiskit, and Cirq, these conversion codes can be used to take advantage of the sampling features provided.

Below is an example of code that converts the circuit and operator of Cirq to the circuit and operator of QURI Parts. We also have provided some example codes of these conversion codes.

from quri_parts.cirq.circuit import circuit_from_cirq
from quri_parts.cirq.operator import operator_from_cirq_op

quri_parts_circuit = circuit_from_cirq(cirq_circuit)
quri_parts_operator = operator_from_cirq_op(cirq_operator)

Version

The version of the main package used in the challenge for participants will be fixed as follows:

python >= 3.9.8, <=3.11

quri-parts == 0.16.1

quri-parts-braket==0.16.1
quri-parts-cirq==0.16.1
quri-parts-itensor==0.16.1
quri-parts-openfermion==0.16.1
quri-parts-qiskit==0.16.1

qiskit == 0.41.1
cirq == 1.1.0
amazon-braket-sdk == 1.66.0
openfermion == 1.5.1
numpy == 1.23.5
juliacall >= 0.9.12

Please refer to the requirements.txt in the repository. If you use a version other than the specified one, or use other packages, please specify the name of that package and its version in the issue to be registered when submitting.

Notes and Prohibited Items

Notes on Evaluation

The validity of the final answer will be judged by the judge based on whether it falls under the prohibited answers below. If it is deemed valid, a score will be calculated. The final decision on the validity of the answer and the score will be made by the operator.

Prohibited Items

Terms

Conditions of Participation in the Quantum Algorithm Grand Challenge

I, or our company (the “Participant”), agree to the following conditions of participation (the "Terms") and will participate in the Quantum Algorithm Grand Challenge (“QAGC”) conducted or operated by QunaSys Inc. (“QunaSys”). If any of our employees participate in the QAGC, they will also comply with these Terms.

  1. The purpose of the QAGC is to engage the Participant in practical problem-solving learning by collaborating with themselves or other participants and utilizing the challenges, programs, or data ("Challenge Data,") provided by QunaSys.

  2. The Participants are expected to analyze the Challenge Data, create responses to the challenges, and develop or modify programs.

  3. All intellectual property rights arising from the challenge data provided by QunaSys belong exclusively to QunaSys.

  4. The intellectual property rights to the results created or generated by the Participant using the Challenge Data (The "Results") belong to the respective the Participant. The Results include, but are not limited to, new ideas, responses to challenges, and programs.

  5. The Participants are required to submit the Results to QunaSys by the end of the QAGC.

  6. QunaSys will not use, exploit, or implement the Results beyond the scope of considering awards in the QAGC or the purpose of operating QAGC.

  7. Unless the Participants explicitly refuse in advance, the Results will be made publicly available via Github.

  8. The Participant agrees not to use the Challenge Data for ADAPT_QSCI provided by QunaSys, including but not limited to example_adaptqsci.py, for purposes other than those set forth herein. Additionally, the Challenge Data contains patents owned by QunaSys, and these patents are authorized for use by the Participants solely to achieve the purpose stated herein and are not permitted for any other purposes.

  9. QunaSys will award a prize to the Participants who have been selected as winners based on the evaluation of the Results.

  10. The Participant must comply with all laws, regulations, and public order and morals and must not infringe upon any third-party intellectual property rights or any other rights in participating in the QAGC.

  11. The Participant shall resolve any disputes arising from the QAGC independently and shall not seek compensation or indemnification from QunaSys.

  12. If the Participant violates any provisions of these Terms and causes damage to QunaSys or other participants, they shall be liable to compensate for such damages.

  13. If the Participant is a legal entity, the responsibility for any violations of these Terms by employees who actually participate in the project will be borne by that legal entity.