Is it possible in SF to control each amplitude in a way like it is done in qubit (computational base state) case? For example, is it possible for one mode and coherent state to perform point-wise multiplication of each Fock state with some arbitrary phase, i.e to change relative phase like in case of Z gate (qubits)? In general, if I encodes some input vector into the one mode Fock state with, for example, cutoff_dim": 10, is it possible to acess every particular amplitude of the Fock state in order to perform some change of relative phase. Thank you in advance.
Thanks for the question :). Just to understand more, are you looking to manipulate the quantum state vector directly, or are you interested in a series of gates one would apply in order to introduce these relative phases (a more “hardware-native” viewpoint)?
If it’s the former, I don’t think we have functionality for that directly in SF. However, you can use SF to generate the input state to be manipulated, call the ket function, and do the relative phase multiplication manually (using numpy or tensorflow).
If it’s the latter, you can introduce relative phases on the Fock states with different base photonic operations (depending on what relative phases you are looking for, these may or may not give you what you want).
For instance, the rotation Rgate with introduce the phase e^{i\theta n} on each Fock state \vert n \rangle. Similarly, the Kerr effect Kgate introduces a relative phase e^{i\kappa n^2} on each Fock state \vert n \rangle.
By combining these two, you can start to build up other relative phases, but they will contain some inherent dependence on the value of \vert n\rangle.
Thank you very much @nathan for response. It is much clearer now. 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. 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. What I’m seek are actually gates to control each base state amplitudes, but every gate in SF are phase-space related. I’m not an expert so I’m wondering is it this actually possible? Thank you very much for your help.
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.
What you said is now perfectly make sense to me. This is actually what I was confused about, especially about the eigenstate of the rotation gate. This helps me a lot to better understand the photonic QC. I will surly have some other questions as I try to build my algorithm, but for now your explanation shed lite on some important questions about how CV works. Thank you again.