I have a question about the recent Quantum Singular Value Transformation (QSVT) tutorial. Let’s assume that I have a block encoding of matrix A. I would like to know how to calculate the angles needed for the projector-controlled phase gates when applying QSVT to block encodings of A^2, A^3, A^4, and so on. Additionally, I noticed that the definition of the projector-controlled phase gates in PennyLane is different, specifically in the sign of one phase angle, from what was defined in the tutorial Intro to QSVT. I’m curious to know which definition is the correct one.

Hi @sassan_moradi,

Thanks for your question!

The angles for the Projector controlled phase gates depend on the convention used for the block encoding. Currently, we support two conventions, the first is the default convention used in the `qml.BlockEncode`

class, and the so called “Wx” convention (Eq. 1 2021 Chuang et al.,). There are a few techniques for determining the phase angles for a given polynomial transformation in the literature (see for example 2018 Chuang et al.,). Alternatively, you could also just train your quantum circuit to learn the optimal phase angles. We will be releasing a tutorial on how to do this soon, so stay tuned!

Regarding the sign of the phase angles in the projector-controlled phase gates, there is no mistake. The gate itself depends on the subspace we are applying the phase shift onto. In the “Intro to QSVT” tutorial we block encode a 2x2 matrix, so we are applying phases on the top left 2x2 block. In the documentation, we are projecting into the top left 3x3 block. That definition would be used, for example, if we were working with a 3x3 block encoded matrix.

I hope this answers your question. Let us know if you have any other questions.

Cheers,

Many thanks for your useful response.