# How to design the circuit of VQLS?

I am very confused about how to design the VQLS circuit. For example, I know the A is:

X is pauli matrix. And how to add these three X pauli gates into circuit? I know the overall circuit should look like this:

I don't know how to design it, so...: I think this circuit is error, because I can't get the right result... Thanks for any help!

Note that, $$A_l$$ is followed by $$A_{l^{\color{red} \prime}}^{\dagger}$$ not $$A_l^{\dagger}$$. Otherwise, they will cancel each other and your circuit will be just the ansatz.

• I feel very shame...I misunderstanded these matrix...Al is orginal matrix, A†l is conjugate transpose matrix of Al. So what is the A†l′ ? According to the formual of VQLS, I've only seen these two matrices. Is there something wrong with my understanding? Thanks for your reply! Commented Sep 1, 2022 at 4:18

If you have a general linear system $$Mx=b$$, then a quantum computer can at best solve the corresponding $$A\left|x\right> = \left|b\right>,$$ where $$\left|b\right> = \frac{b}{||b||}$$, $$A=\frac{M}{||M||}$$ is the original matrix normalized so that $$||A|| \leq 1$$ and $$\left|x\right> = \lambda x$$.

For VQLS specifically you must further decompose the matrix as a linear sum of unitary matrices $$A=\sum_{l} c_l A_l$$. In your case, $$A = c_0 A_0 = 0.5 (X \otimes X \otimes X).$$ As $$A_0A_0^{\dagger}=I$$ the operations cancel out indeed and the measurement result will be $$P(0)=1$$.

The circuit you present in your question is only to compute $$\left<\psi|\psi\right>$$ though, which in your case is 1. As you need to evaluate a normalized cost $$C = \frac{\left< \psi | H | \psi \right>}{\left<\psi|\psi\right>}$$ you have to evaluate the Hamiltonian, global or local, $$\left<\psi| H |\psi \right>$$, in which case the $$A_l$$'s never cancel out.

$$A_l$$ = $$A_{l^\prime}^\dagger$$ in your question and you can try it.

• Hi and welcome to Quantum Computing SE. Once you have enough reputation you can post comments. Please use the comment for the short answers like this one. Commented Nov 18, 2022 at 6:40