QSVT in Pennylane

Dear Pennylane Forum,

I’m a PhD student in Mathematical Engineering and I am studying QSVT for a research project.

I have read the article about it, but I would like to ask you a few questions about the code for implementing the algorithm.

More precisely:

  1. Why does the formula used for QSVT in pennylane (qml.QSVT — PennyLane 0.40.0 documentation) is different from the one defined in the paper a Grand Unification of Quantum Algorithms? In particular it has one more “phase” term.

  2. Why in pennylane do I need to specify the block encoding technique when I use qml.qsvt?

  3. QSVT should be able to work properly also when the input matrix isn’t Hermitian, but in one of your demos (QSVT in Practice | PennyLane Demos) the matrix used for inversion is symmetric. Is pennylane compatible only with Hermitian matrices?

Thanks in advance.

Best regards

Hi @AleZecchi94 ,

Welcome to the Forum!

You may already be aware of this but I want to clarify it just in case. We have something confusing which is that we have a qml.qsvt function (lowercase) and a qml.QSVT class (uppercase). So it’s good to make the distinction between both. In the QSVT in Practice demo the QSVT class is used, while the Intro to QSVT demo uses the qsvt function.

Now regarding your questions:

  1. I’m not sure, I’ll get back to you on this.
  2. You need to specify it because you need to block-encode your matrix, so PennyLane needs to know what type of block encoding you want to use. Does this answer your question? Can you please rephrase your question in case this doesn’t answer it?
  3. If you’re using the qml.qsvt function then yes, it only works with Hermitian matrices.

I hope this helps.

Good questions @AleZecchi94 !

The way QSVT is implemented in PennyLane historically is starting from the QSP formulation. Specifically, QSVT is built from the reflection convention. As you can see in Appendix A.2, if that is the path you take, that extra rotation will appear at the end.

On the other hand, if I am not mistaken, the matrix must be hermitian but if it is not, you could do a “Hermitification”: the process by which you encode a non-Hermitian matrix into a larger one that is

I hope that helps! :grinning_face_with_smiling_eyes: