# 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.

129 questions
Filter by
Sorted by
Tagged with
50 views

### Role of qubit registers in HHL circuit

I'm trying to figure out how the HHL algorithm works from reading Dervovic's paper and IBM's tutorial. Dervovic shows the following HHL circuit in Fig 5: whereas IBM uses: I want to clarify the IBM ...
71 views

### Can we efficiently run HHL on a computational basis state without violating the BBBV theorem?

Recall that the linear systems algorithm of Harrow, Hassidim, and Lloyd purports to find a quantum state $|x\rangle$ proportional to $\vec x$, where $\vec x$ satisfies $A\vec x=\vec b$. In addition ...
43 views

### What is the total number of qubits required for the Harrow-Hassidim-Lloyd algorithm?

I am fairly new to Quantum Computing and I know a bit of Linear Algebra. I am currently working on the HHL algorithm, I'm having confusion as to how many qubits are actually required in the circuit ...
42 views

### How to achieve the controlled rotation in the HHL algorithm

I'm trying to implement the HHL algorithm generally for any 2 x 2 hermitian matrix, but I'm having trouble with the implementation of the controlled rotation of the ancilla qubit. I've read very many ...
43 views

### We take the reciprocal $\lambda^{-1}$ of eigenvalues in HHL - but what's stopping us from raising them to a positive exponent $\lambda^m$?

The HHL algorithm generally can be thought of as diagonalizing our matrix $A$ with the quantum phase estimation algorithm, and applying a specific function $f(\lambda)=\lambda^{-1}$ to the eigenvalues ...
96 views

### Determining the number of qubits to represent the eigenvalues in HHL algorithm?

I am trying to understand how well the HHL algorithm would scale. Therefore my first inquiry is how the number of qubits scale with the size of the problem ie the size of the Matrix A in the linear ...
1 vote
65 views

64 views

### How is $\vec{b}$ loaded in terms of computational basis if we don't know the eigenvectors $\vec{u}_i$ of A?

In HHL, vector $\vec{b}$ is assumed to be decomposed in the eigenbasis {$u_i$}$_{i=1}^n$ of a Hermitian matrix $A$. However, as we do not calculate explicitly the eigenvectors $u_i$ in course of the ...
559 views

### Why was the HHL algorithm removed from the qiskit library?

I am a beginner in quantum computing and I was meddling with HHL algorithm for my class project. Turns out the linear solver algorithms (mainly HHL algorithm) are removed from qiskit library (see ...
1 vote
65 views

### How to construct the matrix in the equation $Ax=b$ in the HHL algorithm?

I am trying to apply the HHL algorithm to a fluid mechanics problem, but I can't figure how to construct the matrix for the equation $Ax=b$. Specifically, I am trying to reproduce this paper in code ...
1 vote
77 views

### HHL phase estimation step

I have got an HHL circuit that looks as follows: In the phase estimation part we are trying to find the eigenvalues of the matrix A. But what is the role of the piece of circuit hightlighted below? ...
90 views

### HHL Algorithm: How to compute the signs of the solution vector

Let us assume we have used the HHL algorithm to approximately prepare $|x\rangle$, where $|x\rangle$ is a normalized quantum state corresponding to $\vec{x}$, the solution of a system of linear ...
64 views

### HHL Algorithm for Classical Syndrome Decoding

Classical Syndrome decoding involves finding the e vector for the given syndrome s and Parity Check matrix H i.e., H.e' = s. This while implemented trying HHL Quantum Algorithm gives error after ...
114 views

91 views

### HHL for the pseudoinverse in Qiskit

The HHL algorithm can be modified to compute the pseudoinverse of $A$ as is shown here and here. Is there anyway to do this in Qiskit without coding the entire thing manually?
1 vote
84 views

### Confusing notation in Block-Encoding

I'm reading the lecture notes from Ronald de Wolf and got confused at the part where it introduces Block encoding, specifically by this notation at page 76: More generally we can define an $a$-qubit ...
47 views

### Simulation of algorithms with QFT on a classical computer

In paper The Quantum Fourier Transform Has Small Entanglement the authors showed that strong entanglement of qubits caused by QFT comes mainly from ordering the qubits. QFT itself prepares only weak ...
195 views

### HHL algorithm: how running the process $N$ times gives the vector components of the solution?

In the HHL paper the authors have mentioned that if the user wants to get all the components of vector $\vec{x}$, one needs to run the process at least $N$ times, where $N$ is the dimension of the ...
82 views

### What useful information can be efficiently extracted from solutions provided by the HHL-algorithm?

The result of the HHL-algorithm is the (amplitude-encoded) solution vector $|x\rangle$. I was wondering, which useful information could be extracted from this solution without loosing the algorithms ...
1 vote
120 views

### Amplitude Amplification applied to HHL Algorithm

I’m trying to understand and implement the amplitude amplification algorithm described in the HHL paper. I’m using the cirq implementation of the HHL algorithm as my starting point. I have a couple of ...
1 vote
95 views

### Changing the eigenvalues used in HHL algorithm

For an HHL algorithm implemented exactly as depicted in Figure 2 of this paper by Dutta et. al (https://arxiv.org/abs/1811.01726), how do I go about changing the eigenvalues that they use? Obviously, ...
157 views

### Implementation of conditional Rotation on ancilla qubit in HHL

In HHL algorithm, after we have encoded the eigenvalues onto the clock register qubits, we apply conditional rotation on ancilla qubit such that it changes from $|0\rangle$ to: To achieve this ...
131 views

### I think I’m having endianness problems replicating the results of this paper?

So I am trying to implement the HHL algorithm depicted in this paper titled 'Quantum Circuit Design for Solving Linear Systems of Equations' by Cao et. al (https://arxiv.org/abs/1110.2232v2), but if I ...
1 vote
49 views

### What is the implementation of AQE on classic?

I want run the HHL, but if the matrices are big, I need to use HHL hybrid, but I was not able to found an implementation or pseudo algorithm of AQE or HHL hybrid. Any solution?
182 views

### HHL for non power of 2 matrix

I'm trying to see how HHL does on a series of matrices coming from a linear problem I'm interested in. These matrices are always square, real, and symmteric. They are not, however, very often exactly ...
167 views

### Representation of a vector in the HHL algorithm

Reading about the HHL algorithm, which is used to solve the equation $Ax=b$, on Wikipedia, they say to represent $b$ as $|b\rangle=\sum_{i \mathop =1}^N b_i|i\rangle.$ I'm assuming $b$ is a vector ...
68 views

### How to extract solution from HHL statevector on qskit?

I want to extract the HHL solution from the StateVector. I am doing this on a $4\times4$ matrix. For a $2$ by $2$ the solution is available in the StateVector $8$, $9$. However for a $4$ by $4$ matrix ...
168 views

345 views

### HHL algorithm for linear systems with a real matrix and a real right side

HHL algorithm can be used for solving linear system $A|x\rangle=|b\rangle$. If we put $|b\rangle$ (to be precise its normalized version) into the algorithm and measuring ancilla to be $|1\rangle$ we ...
77 views

### What are the correct eigenvalues to use in controlled rotation in HHL?

I'm studying the HHL algorithm from the qiskit textbook, but I don't understand what $\lambda$ we have to use. If my matrix $A$ has eigenvalues that can be written in a binary representation, then, ...
1 vote