Implementation of a quantum algorithm for solving linear equations

Abstract

A quantum algorithm that solves linear systems of equations were proposed by Harrow, Hassidim and Lloyd (HHL) and was implemented in this study using Cirq which is a library in Python used for implementing quantum circuits. Four cases of the quantum circuit implementation were studied: |b〉 is either |0〉 or |+〉, and the number of controlled rotations is either four or six. It has been observed that for larger number of trials per observable, the variance or the fluctuation of the simulated value from the theoretical one becomes smaller. However, the effects of the number of controlled rotations or circuit size to the measured values were not observed.