Hello.

I need some help, I cannot understand the exact meaning of Heisenberg Representation M matrix. How does the Operation (Rotation) go from the second quantized form (above the “detail”) to the M-matrix, which is actually 3 by 3 matrix. Why it is not the 2*2 matrix?

To my knowledge, the MZI’s matrix takes the form like this(I will attach another picture in my following reply due to the limitation to the new users about number of posting pictures), which means there should be some complex number, but in the function qml.templates.Interferometer(this function is used for Optimizing a quantum optical neural network,https://pennylane.ai/qml/demos/qonn.html) it consists of real numbers.

Could you please help to answer the questions above.

Thanks.