Hi @Ljubomir_Budinski,

A few points, answered in no particular order:

What I’m trying to do is to encode my input vector into the state vector of one mode with the cuttioff 10, and then do the point-wise multiplication of each amplitude corresponding to the Fock base state with some vector containing the phases (respecting the unitarity of course). If I have one mode with 10 cuttoff in which coherent state is build by using the displacement gate, I will end up with 10 probabilities each corresponding to n state ( n occupation number). What I was trying to do is to now introduce a relative phase in front of each n basis state, something like diagonal gate in qubit representation.

What you describe is certainly possible, since the continuous-variable model is universal. However, just like in the qubit model, while there are some gates that are naturally “diagonal” in the computational basis (here, the photon-number basis), to apply a fixed collection of local phases to each basis state will involve a specific (likely complicated) unitary.

How to achieve such a unitary with the supplied universal gate set is in general a complex task, and requires one to compile or decompose that fixed unitary (you can see one strategy for photonic gate decomposition here). If, however, your local phases have structure, you may be able to construct something “by hand” using Rgates and Kgates.

From what I know, and please correct if I’m wrong, the rotation gate is the phase-space gate, meaning it will introduce a global phase in front of entire state and not particular base state

The photon-number states are actually the eigenstates of the rotation gate, whose eigenvalues are distinct, given by e^{i\theta n}. So applying the Rgate to a superposition of photon-number states would lead to each element having a different phase. You can find this without invoking the phase-space picture.

Hope that helps you a bit