1
$\begingroup$

I was studying the VQLS from the tutorial :https://github.com/qiskit-community/qiskit-textbook/blob/main/content/ch-paper-implementations/vqls.ipynb I am kind of stuck to understand how to convert a non-unitary matrix into quantum circuit as done in the tutorial because it is practically impossible for anyone to think like that as shown below: $$ A=0.45Z_3+0.55{\mathbb I} $$ Also, how would the circuit look like? It would be really great if someone can help me understand this concept because it practically imposssible to implement this without any API or algorithm? Also, what would be complexity of the algorithm because what I think is that it very easy to solve this on classical computer than on quantum computer?

$\endgroup$

3 Answers 3

1
$\begingroup$

One thing that you can try and do is embed the matrix $A$ inside a larger matrix which is unitary. For example, you're looking for $$ A=\begin{bmatrix} 1 & 0 \\ 0 & 0.1 \end{bmatrix} $$ so why not try $$ U_A=\begin{bmatrix} 1 & 0 & 0 \\ 0 & 0.1 & \sqrt{0.99} \\ 0 & \sqrt{0.99} & -0.1 \end{bmatrix}. $$ You then implement $A$ by applying $U_A$ (on a 3-dimensional system, but prepared in your 2-dimensional subspace), and then applying a measurement with projectors $$ P_{\text{good}}=|0\rangle\langle 0|+|1\rangle\langle 1|,\qquad P_{\text{bad}}=|2\rangle\langle 2|. $$ If you get the good answer, then you have successfully implemented the evolution you wanted. If you get the bad answer, you have failed.

A 3-dimensional subspace is the smallest required to make this work. For an implementation on qiskit, I'm imagining that you want to describe it in terms of qubits, so you probably need to add an extra level, perhaps something like $$ U_A=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0.1 & i\sqrt{0.99} & 0 \\ 0 & i\sqrt{0.99} & 0.1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}, $$ which I have chosen to write in the form of a partial swap, which therefore has a well understood decomposition in terms of standard gates.

$\endgroup$
1
  • $\begingroup$ Thank you for response @DaftWullie. Somehow, the VLQS algorithm employ some different technique than this. Some researcher in this video tried explaining this concept youtube.com/watch?v=zgELTGM0FaU but somehow his explanation is not correct totally. $\endgroup$
    – Manu
    Commented Sep 17 at 12:53
1
$\begingroup$

@DaftWullie answer is perfectly fine if you need to a quantum circuit for $A$. However, in the context of VQLS this quantum circuit is not required.

In variational quantum algorithms we need to construct a cost function that can be evaluated with a low-depth parameterized quantum circuit.

Recall that, $A$ is a linear combination of unitaries,

$$A = \displaystyle\sum_{n} c_n \ A_n$$

In VQLS, to evaluate the cost function we compute every possible term $\langle 0 | V(k)^{\dagger} A_m^{\dagger} A_n V(k) |0\rangle$ where $V(k)$ is the unitary of the ansatz.

$\endgroup$
1
  • $\begingroup$ Thank you for the reponse @Egretta.Thula for the response. Can you explain this with an example? $\endgroup$
    – Manu
    Commented Sep 17 at 12:55
1
$\begingroup$

let us consider ]1

it can be written the linear combination of ]2

$\endgroup$
1
  • $\begingroup$ Thank you @Geetha for the response. It would be really helpful if you can explain your algorithm? $\endgroup$
    – Manu
    Commented Oct 1 at 3:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.