Simple questions about QSVT

I have read the QSVT tutorial QSVT in Practice | PennyLane Demos and I have a question.

I have now understood the basic ideas of qsvt to simulate an polynomial function, but I don’t understand how this can be expanded to perform a matrix function, for example, from the original sum_even_odd_circ() function to the latter linear_system_solver_circuit() . Is there any mathematical theory to consider?

Also, I would like to now how can I expand the original circuit that writes:

block_encoding = qml.BlockEncode(x, wires=[0])
projectors = [qml.PCPhase(angle, dim=1, wires=[0]) for angle in phi_qsvt]

poly_x = qml.matrix(qml.QSVT, wire_order=[0])(block_encoding, projectors)
qsvt_y_vals.append(np.real(poly_x[0, 0]))

so that I may do it in an easier way?

Thanks very much.

Hi @Chenjia , welcome back to the Forum!

I’ll try to write up an explanation that makes it clearer how QSVT connects to solving a linear system.

In the meantime, what do you mean by “expanding the original circuit”? Could you please clarify with an example or description?

Sorry for the late reply.

In the first section of the demo it wrote we may use pyqsp package to obtain the phases of the QSVT circuit, but the demo didn’t use it to solve the linear equations. So I’m wondering if I can use the circuit to solve the equations, and I would like to know if there’s some mathematical relationships I can refer to.

I’m currently reading the paper mentioned in the demo and trying to figure it out myself. And I still appreciate all of the timely assistance you offered!

Hi @Chenjia, thanks for clarifying!

The demo has a note in green that shows how pyqsp can be used to calculate the phi_pyqsp angles. If you look carefully you’ll notice that these only depend on kappa. So as long as kappa is such that the domain [\frac{1}{k},1] contains the smallest singular value of the target matrix, then you shouldn’t have any trouble using the angles you calculated before.

If you then look at the last section where they solve the Linear System with QSVT, you’ll notice that the qnode (linear_system_solver_circuit(phi) ) uses real_u(A.T, phi). It’s not very clear in the demo, but this uses the same phi that was defined in the Phase Angles from Optimization section!

In the end it’s all connected, and what the demo shows in the first sections is indeed used in the last one.

Let me knows if this answers your questions of if you still have standing questions. This is a very interesting topic but can be quite confusing so your questions may help others in the future!

Thank you so much! I will try understanding it.

1 Like