Questions tagged [hhl-algorithm]

For questions related to the quantum algorithm for inverting linear systems of equations, developed by Harrow, Hassidim and Lloyd in 2009.

Filter by
Sorted by
Tagged with
2
votes
0answers
22 views

Why is HHL the popular choice to solve QLSP and not the Childs et al. (2017) algorithm?

The Childs et al. (2017) algorithm can solve the quantum linear systems problem (QLSP) in $\operatorname{poly}(\log N, \log(1/\epsilon))$ time while the HHL algorithm solves it in $\operatorname{poly}(...
0
votes
0answers
36 views

HHL algorithm Qiskit version

...
0
votes
1answer
71 views

Given a matrix, how do I proceed with the quantum phase estimation algorithm and choose $\theta$?

Given a matrix, say $\begin{bmatrix} 1.5 & 0.5\\ 0.5& 1.5 \end{bmatrix}$, with eigenvalues $1$ and $2$, how do I proceed with the quantum phase estimation algorithm? In particular, how do I ...
0
votes
1answer
35 views

Qiskit HHL algorithm BrokenProcessPool error

I try to run HHL algorithm on qasm_simulator. I took the example from here. I try to solve 8x8 random matrix and adjust some parameters in create_eigs. ...
3
votes
0answers
19 views

In the HHL algorithm, how large should the eigenvalue estimation register be?

In the HHL algorithm, we need to estimate the eigenvalues of a matrix $A$. The result is stored in a register with $l$ qubits. Let $T = 2^l$. $T$ cannot be too small, otherwise the result would have a ...
1
vote
0answers
52 views

HHL example solution on Qiskit

In the example on the Qiskit page (https://qiskit.org/textbook/ch-applications/hhl_tutorial.html#A.-Some-mathematical-background) section 3 for the HHL algorithm the author is trying to solve the ...
1
vote
1answer
47 views

How to increase matrix size and getting high fidelity for HHL algorithm in Qiskit?

I have followed an example that Qiskit provides here. I tried to increase the matrix size to 16x16 and change num_ancillae and ...
1
vote
0answers
42 views

Implementing the HHL algorithm with negative eigenvalues (Cirq)

How do I implement the HHL with negative eigenvalues? This paper (https://arxiv.org/abs/1803.01486) says that: what if $\lambda<0$? This problem actually does not hard to solve, since we can ...
2
votes
1answer
107 views

Error when running HHL algorithm in Qiskit

I tried to solve a simple system of two simultaneous linear equations in with HHL algorithm in Qiskit. In particular the system is $Ax=b$, where $$ A = \begin{pmatrix} 1.5 & 0.5 \\ 0.5 & 1.5 \...
1
vote
1answer
47 views

How to optimize my HHL algorithm on qiskit?

I am following this HHL tutorial to solve the $Ax=b$ problem and have been using the general (inefficient) approach with the BasicAer simulator that they describe in section 4a. I would now like to ...
1
vote
1answer
48 views

How can I use the quantum volume to design the scale of my experiment?

I am designing an experiment which involves solving a linear system of equations of the form $Ax=b$. To do this, I am using the HHL algorithm on the IBMQ system. My experiment is scalable such that ...
2
votes
1answer
49 views

Is it required to input full matrix when using Qiskit HHL algorithm for sparse matrices?

I am working with a very sparse matrix and it seems inefficient to load the full matrix as input into the Qiskit HHL algorithm. Is it possible to input only the non-zero elements, instead ? I am ...
1
vote
0answers
54 views

Help Understanding Line in Source Code

In Qiskit's implementation of the HHL algorithm, they have the following line at the end of their code that allows them to compute the global phase we need to add on to the solution. ...
7
votes
0answers
127 views

Is HHL still BQP-complete when the matrix entries are only in {0,1}?

I'm studying BQP-completeness proofs of a number of interesting problems of Janzing and Wocjan, and Wocjan and Zhang. Janzing and Wocjan show that estimating entries of matrix powers $(A^m)_{ij}$ with ...
1
vote
0answers
34 views

Comparison of matrix inversion algorithms

Since 2009, many matrix inversion algorithms have appeared. Is there somewhere a table, or recently released overview, comparing the speed of matrix inversion algorithms, like done in this table taken ...
1
vote
0answers
25 views

Using matrix inversion and summation together. How to compute $(A+B^{-1})^{-1}|x\rangle$

I need to compute $(A+B^{-1})^{-1}|x\rangle$, where A and B is hermitian for simplicity. I read out about matrix inversion algorithms (HHL, QSVE,...), and algorithms of summing up of matrices(LCU, Lie–...
2
votes
1answer
95 views

Confusion regarding time complexity in the HHL algorithm

In the paper of HHL algorithm (Quantum algorithm for linear systems of equations), the time complexity of simulating $e^{i A t}$ for a hermitian matrix A is $\tilde{O}\left(\log (N) s^{2} t_0\right)$. ...
1
vote
0answers
46 views

Adding Quantum State Tomography Step in Cirq HHL Algorithm Implementation

Over the past month, I have been learning about the HHL algorithm and am interested in extending the implementation provided here (https://github.com/quantumlib/Cirq/blob/master/examples/hhl.py) to ...
3
votes
1answer
66 views

How do I optimize HHL algorithm in Qiskit?

How do I optimize HHL algorithm in Qiskit? I tried to follow this tutorial on HHL in Qiskit. My project requires solving a very specific type of linear equations $Ax=b$ like the one below. ...
2
votes
1answer
82 views

The maximum depth possible on quantum computers

I hope you don't mind me having two questions. Firstly, I was running a Qiskit HHL simulation on a 12x12 matrix and a 12x1 vector, leading to a 16x16 matrix after expansion, and it resulted in a ...
0
votes
1answer
73 views

Angles of rotation in HHL example

I am trying to implement the 4-qubit example outlined in https://qiskit.org/textbook/ch-applications/hhl_tutorial.html#2.-The-HHL-algorithm (showed in Section 3 of the article). Does anyone know what ...
1
vote
1answer
56 views

In the rotation part of HHL algorithm, how do you decompose $R$ in terms of universal gates?

In this paper, there is a diagram explaining how HHL works, which I attached below: My question is, for the rotation part, how do you write $R$ as a combination of universal set of gates without ...
1
vote
0answers
66 views

New Hybrid-HHL algorithm vs VQLS

A team of researchers has realized hybrid quantum algorithm for solving a linear system of equations with exponential speedup that utilizes quantum phase estimation, the algorithm demonstrates quantum ...
2
votes
1answer
103 views

Problem with HHL algorithm on Qiskit

I try to run HHL algorithm on quantum computer in Qiskit Notebooks on the site. I take it from here https://qiskit.org/textbook/ch-applications/hhl_tutorial.html but it doesn't work. The error message ...
2
votes
1answer
247 views

Problem with controlled rotation in HHL

In HHL algorithm, for subroutine involving controlled rotation, after applying $R_y(\theta)$, where $\theta=2\sin^{-1}\left(\frac{C}{\lambda}\right)$ to the ancilla, the state changes to $\sqrt{1-\...
2
votes
1answer
104 views

Quantum circuit to get expectation values of Pauli matrices, given state $|\psi\rangle$

I'm trying to solve 2 linear equations with the help of HHL algorithm. I've taken $A=\begin{pmatrix} 1.5 & 0.5\\ 0.5 & 1.5\\ \end{pmatrix}$ and $b=\begin{pmatrix} 1\\ 0\\ \end{pmatrix}$. I've ...
6
votes
3answers
427 views

Quantum circuit to implement matrix exponential

I want to build a circuit which will implement $e^{iAt}$, where $ A= \begin{pmatrix} 1.5 & 0.5\\ 0.5 & 1.5\\ \end{pmatrix} $ and $t= \pi/2 $. We see that $A$ can be written as, $A=1.5I+0.5X$. ...
1
vote
0answers
57 views

Explanation of HHL Cirq implementation [closed]

Can someone help me in understanding the program on the link given below? I would really appreciate if someone could give a detailed explanation ... https://github.com/quantumlib/Cirq/blob/master/...
2
votes
1answer
178 views

Implementation of matrix A in HHL algorithm circuit

In HHL algorithm, how do we implement matrix $A$ (where $A|x\rangle = |b\rangle$) in the circuit?
3
votes
5answers
163 views

Any other quantum algorithms than Jozsa-Deutsch decision algorithm, Grover search algorithm, Shor factorization algorithm?

I have been working on implementing Jozsa-Deutsch decision algorithm, Grover search algorithm, Shor factorization algorithm on my home-made 2 qubits device. I am wondering if there are any other ...
7
votes
2answers
433 views

Does the quantum Fourier transform have many applications beyond period finding?

(This is a somewhat soft question.) The quantum Fourier transform is formally quite similar to the fast Fourier transform, but exponentially faster. The QFT is famously at the core of Shor's ...
1
vote
0answers
29 views

How to prepare the three-dimensional register S in HHL?

$\newcommand{\ket}[1]{\left|#1\right>}$ In the original HHL paper, in step 4 of the $U_{\text{invert}}$ subroutine (Appendix A.1), it says to adjoin a three-dimensional register S in the state $\...
2
votes
1answer
73 views

How to encode eigenvalues of matrix $A$ in solving $A\vec{x} = \vec{b}$ using the HHL Algorithm

I am trying to implement multiple parallel subroutines of HHL algorithm, each working on a different set of matrix $A$ (when solving for $x$, in $A\vec{x} = \vec{b}$), to find the expectation values ...
1
vote
1answer
84 views

Where will I find necessary math to understand HHL algorithm?

How can we show that HHL algorithm achieves exponential speedup?
1
vote
1answer
69 views

HHL Algorithm: Relation between Eigenvalues and condition number

I have been going through the original HHL paper (2009), and I see that they call a linear system of equations "well behaved" / "well-conditioned", if $$ |\lambda| \in \left[\frac{1}{\kappa}, 1\right]$...
1
vote
0answers
66 views

Exponentiating Hermitian Matrix for use in QPE/HHL

I am currently trying to understand HHL by implementing a very inefficient Qiskit simulation script that performs HHL on an arbitrary hermitian matrix $A$ and a vector $b$. Because I am currently ...
5
votes
2answers
486 views

How to draw Qiskit's HHL algorithm as a circuit?

Qiskit Aqua has a module that implements the HHL algorithm: https://qiskit.org/documentation/_modules/qiskit/aqua/algorithms/single_sample/hhl/hhl.html How does one draw the implemented circuit? * ...
2
votes
0answers
99 views

Running HHL tutorial on real backend

I tried to follow the HHL tutorial. Since the 8x8 problem is not realistically simulable (I stopped after a few minutes), I tried to make it run on another backend, starting on the easiest example: <...
3
votes
1answer
107 views

Matrix Inversion is BQP-complete proof in HHL and the probability of measuring $T+1 \leq t \leq 2T$

I am continuing to try and fully understand the argument why Matrix inversion is BQP-complete according to the proof given in the HHL paper here, and I have hit another snag. In this question here, ...
3
votes
1answer
158 views

Understanding the filter functions in the HHL algorithm

I am continuing my studies of the HHL algorithm here. In applying the controlled rotation conditioned on the eigenvalues of the matrix, the authors use so called filter functions in order to filter ...
3
votes
1answer
125 views

Apply the conditional Hamiltonian evolution (HHL)

I have a problem with the conditional Hamiltonian. In the original article on HHL (p.3) they wrote that applying the conditional Hamiltonian correspond to: $$ \sum_{\tau=0}^{T-1}|\tau\rangle\langle\...
4
votes
1answer
180 views

Showing that Matrix Inversion is BQP-complete - HHL Algorithm

I am trying to understand an argument that Matrix Inversion is BQP-complete for certain conditions on the matrix. This is explained here on page 39 (this paper is a primer to the HHL algorithm and ...
5
votes
2answers
167 views

Using the HHL algorithm to compute $A |b \rangle$ instead of $A^{-1} |b \rangle$

In the paper "Compiling basic linear algebra subroutines for quantum computers" here, they discuss (page 2 bottom right) using the HHL algorithm to multiply a vector by a matrix. However, after ...
7
votes
2answers
235 views

Clarification of the “Calculations” section of the (HHL09) paper

I am reading this paper entitled "Quantum algorithm for linear systems of equations" and am trying to understand a portion of the algorithm described on page 2 and in more detail in the appendix ...
3
votes
0answers
79 views

How can I express controlled unitary operation in QPE of this implementation of HHL?

I have found this implementation of HHL, and I don't understand why the controlled unitary operation is expressed in the form of $\exp(i t_0 A/2)$ and $\exp(i t_0 A/4)$. The rotation of $\pi$ and $\...
3
votes
0answers
96 views

Is HHL executed in a single run? If yes, how do they carry out controlled rotation without knowing eigenvalues?

Even after reading several papers and almost all HHL related questions and answers here on Quantum Computing Stack Exchange, one thing is yet not clear. In several papers, for illustrating HHL they ...
4
votes
1answer
193 views

Does HHL implementation require a priori eigendecomposition?

I am interested in HHL algorithm and despite all the problems related to current technologies, I am trying to understand how it has to be implemented. I have seen from these two available circuits (...
5
votes
1answer
430 views

Controlled unitary from the HHL algorithm – practical implementation using Qiskit

I have a question about the implementation of the controlled unitary $e^{iAt}$, from the paper Demonstration of a Quantum Circuit Design Methodology for Multiple Regression, using the Qiskit framework....
3
votes
0answers
104 views

What are applications of HHL's “simple example” to determine similar stable states of different quantum processes?

The HHL paper "Quantum algorithm for linear systems of equations" [link] initially describes a "simple example" to illustrate the potential power of their algorithm. They state: Consider a ...
5
votes
1answer
474 views

Quantum algorithm for linear system of equations (HHL) - Final Step: How can I find my vector of solution $|x\rangle$?

I'm working on solving a linear system with the quantum algorithm HHL. I don't understand how I can recover my vector $|x\rangle$ of real solution of the system starting from the states measured with ...