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
1answer
99 views

HHL - the result is correct for one matrix but wrong for another one

I tried to run HHL algorithm in new version of Qiskit (0.29). Firstly I tried to solve a diagonal system 4x4 with matrix [[1,0,0,0],[0,2,0,0],[0,0,3,0],[0,0,0,4]] ...
1
vote
0answers
47 views

Source code for Hybrid-HHL algorithm

How can I get a source code from this paper Hybrid quantum linear equation algorithm and its experimental test on IBM Quantum Experience? I want to implement this algorithm but I do not know how does ...
1
vote
2answers
140 views

Question on qiskit.circuit.library.PiecewiseChebyshev Qiskit circuit library

This question follows the post https://quantumcomputing.stackexchange.com/posts/15070/. I am working on an implementation of HHL algorithm, to do so, I need to map $|\lambda\rangle\mapsto |\arcsin(\...
0
votes
1answer
121 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. ...
1
vote
1answer
56 views

"Classical" phase estimation versus iterative phase estimation

In the article Arbitrary accuracy iterative phase estimation algorithm as a two qubit benchmark, the authors introduced implementation of phase estimation with two qubits only. The trick that bits ...
2
votes
1answer
53 views

Combining Amplitude Amplification with HHL

I'm recently learning about how to apply Grover search techniques to other places. An example I've come across is to amplify the probability of measure a $\lvert 1 \rangle$ of the ancilla qubit in HHL ...
9
votes
2answers
215 views

Quantum implementation of arcsin

I am looking to implement a quantum version of the arcsinus function. Such a problem is motivated by the HHL algorithm where $x\mapsto 1/x$ and $\arcsin$ can be used to get $1/x$ from the ...
1
vote
0answers
28 views

Difference in HLL applications

I am new to Qiskit and I have seen two types of simple 2X2 $Ax=b$ system solutions. I am wondering what the difference is exactly. They both occur on a simulator backend, but the first gives me a ...
2
votes
1answer
211 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 \...
3
votes
2answers
103 views

Source code for a Qiskit algorithm: HHL Algorithm

Is it possible to view the source code of one of the Qiskit's algorithm? Actually, I am trying to find how Qiskit implements the HHL algorithm. I want to see the source code for this algorithm.
5
votes
0answers
84 views

Solving linear system $Ax=b$ with exponential speed-up via binary optimization?

The main disadvantage of HHL algorithm for solving $A|x\rangle = |b\rangle$ is that exponential speed-up is reached only in case we are interested in value $\langle x|M|x\rangle$, where $M$ is a ...
5
votes
0answers
54 views

What is the largest linear system of equations solved using HHL experimentally?

Can someone tell what is the largest system of equations solved using HHL algorithm experimentally? I know the $8$ x $8$ system has been solved experimentally. Has someone gone beyond this to solve $...
3
votes
1answer
71 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 ...
1
vote
1answer
134 views

In the HHL alghoritm, how can I transform my hermitian matrix into a unitary operator?

I'm studying the HHL algorithm and I'm trying to do an his implementation but, there are some points that I don't understand how I can transform my hermitian Matrix into its unitary operator? In ...
3
votes
0answers
44 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
0answers
69 views

Adding Quantum State Tomography Step to HHL Algorithm (Cirq)

Over the past month, I have been learning about the HHL algorithm and am interested in extending the Cirq implementation to include the quantum state tomography step to extract the amplitudes or ...
4
votes
1answer
96 views

I don't understand unitary of ${e^{iAt}}$ from HHL algorithm

I tried to implement the following circuit in the image below but with the red circled gates replaced with a unitary controlled ${e^{iAt/2}}$ and controlled ${e^{iAt/4}}$ The image came from this ...
2
votes
1answer
80 views

Function in Qiskit to get the quantum circuit

Is there any way to view the quantum circuit of pre implemented quantum algorithm in Qiskit? In the Qiskit textbook, there is an example given for HHL algorithm. Is there any function in Qiskit which ...
3
votes
1answer
195 views

Quantum Circuit for $e^{iAt}$ Hamiltonian Simulation in HHL algorithm

In HHL algorithm, there is a step in Quantum Phase Estimation where we have to apply powers of $e^{iAt}$ to the register (see pic). I am not able to understand how to find the quantum circuit ...
1
vote
0answers
68 views

In HHL algorithm, how to find the angle of rotation of ancilla qubits?

In HHL algorithm, after the quantum phase estimation, what is the angle of rotation i.e. what is the value of $\theta$ in R$_y$($\theta$) that is used in rotating ancilla qubit? How to find this angle ...
3
votes
1answer
114 views

HHL algorithm, How to implement exp(iAt) gates?

From this paper Quantum Circuit Design for Solving Linear Systems of Equations, in figure 4 The paper shows what inside operator $e^{-iAt}$ but didn't shows how to connect the control qubit (register ...
1
vote
0answers
55 views

Why does solving linear systems of equations with HHL return imaginary numbers? [closed]

The textbook shows an example system of linear equations $Ax=b$ with $$ A=\begin{pmatrix} -\frac{1}{3} & 1 \\ 1 & -\frac{1}{3} \end{pmatrix} \,\,\,\, b=\begin{pmatrix} 0 \\ 1 \end{pmatrix}. $$ ...
-3
votes
1answer
61 views

Query on the HHL Algorithm in the Qiskit Aqua Library [closed]

This is a question regarding the Qiskit Aqua package. I have been studying HHL algorithm from QISKIT textbook and after understanding the math I finally got to the code part, I am having a hard time ...
3
votes
1answer
89 views

Efficient QFT-based QPEA complexity

The HHL algorithm lies on an implementation of the Quantum Phase Estimation algorithm. One popular implementation is based on the Quantum Fourier Transform which can be divided in three steps. Let $U$ ...
4
votes
1answer
87 views

HHL algorithm, How can I get result from register $|b\rangle$?

From the paper A survey on HHL algorithm: From theory to application in quantum machine learning , I use qasm code from here. I try to follow the example in page 7. with Ax = b and the answer x ...
3
votes
1answer
98 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 ...
2
votes
1answer
129 views

Angles of rotation in HHL example

I am trying to implement the 4-qubit example outlined in showed in section 3 of the qiskit tutorial on the HHL algorithm. Does anyone know what are the 2 angles that the ...
8
votes
2answers
112 views

How to recover the normalization constant of the HHL solution

HHL solves the linear equation $Ax=b$ by the quantum state $|x\rangle=A^{-1} |b\rangle$. However, the quantum state $|x\rangle$ is normalized and thus diffs a normalization constant from the solution ...
3
votes
1answer
73 views

HHL and choice of observable for calculating the expectation value thereof

The chapter about solving linear systems in the qiskit textbook describes the last (6th) step of the HHL algorithm as follows Apply an observable $M$ to calculate $F(x):=\langle x |M|x\rangle$. How ...
8
votes
1answer
227 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 ...
9
votes
3answers
841 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 ...
3
votes
2answers
512 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-\...
3
votes
1answer
166 views

Gate-level implementation of Eigenvalue-Inversion in HHL

I am trying to understand how does the gate-level implementation of eigenvalue-inversion step in the HHL algorithm works. I am following this reference, where it is stated (Lemma 4) that this can be ...
4
votes
1answer
220 views

How to effectively compute eigenvalue rotation in HHL

In the HHL algorithm, how do you efficiently do the $\lambda-$controlled rotation on the ancillary qubit ? It seems to me after reading around some answers that this can be done in two steps : First, ...
6
votes
0answers
76 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}(...
4
votes
0answers
37 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 ...
4
votes
1answer
189 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\...
2
votes
1answer
138 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
0answers
60 views

HHL algorithm Qiskit version

...
2
votes
0answers
84 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
94 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
124 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 ...
6
votes
2answers
633 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? * ...
4
votes
1answer
144 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. ...
1
vote
1answer
163 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
54 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 ...
1
vote
0answers
60 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. ...
9
votes
0answers
174 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 ...
3
votes
0answers
95 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 ...
4
votes
1answer
677 views

HHL algorithm -- controlled-by-eigenvalues rotations

All the references in this question refer to Quantum algorithm for solving linear systems of equations (Harrow, Hassidim & Lloyd, 2009). The question I have is about the step where they apply ...