Skip to content

AQPE implementation that does not take advantage of the Signaloid compute engine and instead uses RFPE to approximate Bayesian inference.

License

Notifications You must be signed in to change notification settings

signaloid/Signaloid-Demo-Quantum-AQPE-NoUx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Add to signaloid.io] [Add to signaloid.io]

A Traditional Accelerated Quantum Phase Estimation (AQPE)

This repository contains an implementation of the classical part of the Accelerated Quantum Phase Estimation (AQPE) subroutine of the Accelerated Variational Quantum Eigensolver (AVQE) based on work by Cruise et al. 1 and Wiebe et al. 2. For phase estimation, the implementation uses an efficient approximation to Bayesian inference called Reduction Filtering Phase Estimation (RFPE).

The repository Signaloid-Demo-Quantum-AQPE contains an implementation of AQPE that takes advantage of the capabilities of Signaloid's compute engine and replaces RFPE with a Bayesian inference operation provided by Signaloid's compute engine.

The AQPE Algorithm

The AQPE algorithm is a method to estimate the eigenphase $\phi$ corresponding to the eigenvector $\ket{\phi}$ of a single-qubit quantum gate represented by the unitary matrix $U$, that is, $U\ket{\phi} = e^{i\phi}\ket{\phi}$. AQPE uses the quantum circuit shown below to obtain the evidence that it then uses in estimating the value of $\phi$.

image

AVQE is a generalization of the standard Variational Quantum Eigensolver (VQE). AVQE replaces the Quantum Expectation Estimation (QEE) subroutine with the AQPE subroutine and it offers a bridge between AVQE and the classical QPE algorithm by Kitaev et al. 3. It does that by introducing a parameter, $\alpha \in [0,1]$, which enables a tradeoff between the required quantum circuit depth $D$ and the number of required quantum circuit measurements $N$, to acheive a specified precision $p$ in estimating the value of the phase $\phi$.

Algorithm Quantum Circuit Depth, $D$ Number of Quantum Circuit Measurements, $N$
AVQE $O(p^{-\alpha})$ $O(p^{{-2(1 - \alpha)}})$ for $\alpha \in [0,1)$, $O(\mathrm{log}(p^{-1}))$ for $\alpha = 1$
VQE $O(1)$ $O(p^{-2})$
Kitaev's QPE $O(p^{-1})$ $O(1)$

The table above shows the requirements for the quantum circuit depth $D$ and the number of quantum circuit measurements $N$ of each algorithm (AVQE, VQE, and Kitaev's QPE). For the quantum circuit depth, AVQE requires that $D = O(p^{-\alpha})$ for $\alpha \in [0,1]$, and for the number of quantum circuit measurements, AVQE requires that $N = O(p^{{-2(1 - \alpha)}})$ for $\alpha \in [0,1)$ and $N = O(\mathrm{log}(p^{-1}))$ for $\alpha = 1$. When $\alpha = 0$, AVQE requirements exactly match that of VQE which has $D = O(1)$ and $N = O(p^{-2})$. On the other hand, when $\alpha = 1$, AVQE requirements match (upto a logarithmic factor for $N$) that of Kitaev's QPE which has $D = O(p^{-1})$ and $N = O(1)$.

With the contemporary NISQ-era quantum computers being capable of maintaining qubit coherence for quantum circuit depths of only few hundreds, implementing Kitaev's QPE approach is out of question for low values of $p$ (e.g., $p \leq 10^{-3}$ for which $D \geq O(10^3)$). On the other hand, the high number of required quantum circuit measurements for VQE makes it prohibitive for low values of $p$ (e.g., $p \leq 10^{-3}$ for which $N \geq O(10^6)$). AVQE allows one to achieve a trade-off between $D$ and $N$, where one would choose $\alpha > 0$ for a given maximum depth $D_{\mathrm{max}}$ that an available NISQ computing machine can sustain and would require less number of quantum circuit measurements compared to VQE.

An interesting use-case for NISQ era

After clicking on the "add to signaloid.io" button at the top of this README, you will be connected to the Repositories Tab on the Signaloid Cloud Developer Platform. Next, click on the Screenshot 2023-06-29 at 22 55 31 button to set the command-line arguments to -p 1e-4 -a 0.5. This sets $\alpha = 0.5$ and the estimation precision to $10^{-4}$. For these values, the required quantum circuit depth is $D = 100$ and the required number of shots or measurements per quantum circuit mapped to a quantum computer is $N = 39996$. This depth is achievable by NISQ-era quantum computers.

Usage

[-t <target_phase : double in [-pi, pi]>] (Default: pi / 2)
[-p <precision_in_phase_estimation : double in (0, inf)>] (Default: 1e-4)
[-a <alpha : double in [0,1]>]  (Default: 0.5)
[-n <number_of_evidence_samples_per_iteration : int in [1, inf)>] (Default: 1 / precision^{alpha})
[-m <number_of_prior_test_samples_per_iteration : int in (0, inf)>] (Default: 1000)
[-r <number_of_repetitions : size_t in (0, inf)>] (Default: 1)
[-v] (Verbose mode: Prints details of each repeated AQPE experiment to stdout.)
[-h] (Display this help message.)

Repository Tree Structure

.
├── LICENSE
├── README.md
├── gsl
├── include
│   └── gsl
├── libs
│   ├── libgsl.a
│   └── libgslcblas.a
└── src
    ├── README.md
    ├── main.c
    ├── utilities.c
    └── utilities.h

References

Footnotes

  1. J. R. Cruise, N. I. Gillespie, and B. Reid: Practical Quantum Computing: The value of local computation. arXiv:2009.08513 [quant-ph], Sep. 2020. Available Online: http://arxiv.org/abs/2009.08513.

  2. N. Wiebe and C. Granade: Efficient Bayesian Phase Estimation. Phys. Rev. Lett. 117, 010503, June 2016. Avlaialable Online: https://arxiv.org/abs/1508.00869.

  3. A. Y. Kitaev, A. Shen, and M. N. Vyalyi: Classical and Quantum Computation. American Mathematical Society, 2002.

About

AQPE implementation that does not take advantage of the Signaloid compute engine and instead uses RFPE to approximate Bayesian inference.

Topics

Resources

License

Stars

Watchers

Forks