# Matrix representation of continuous-variable gates

In the introduction to continuous-variable quantum computing by Strawberry Fields (Xanadu), it lists the primary CV gates (rotation, displacement, squeezing, beamsplitter, cubic phase) along with their unitary: What are the matrix representations of these gates?

• You usually don't want to use matrix representations, since working with transformations in terms of creation/annihiliation operators, and acting with them on the latter, is usually the far more powerful and easy to deal with formalism. Jul 13 '18 at 20:52
• @NorbertSchuch Thanks for the comment. New to CV & still (obviously) have much to learn! Creation/annihilation operators definitely interest me. Do you have any good suggestions on learning more? Jul 13 '18 at 20:55
• Start learning basic quantum mechanics, then the harmonic oscillator, then the 2nd quantization description. Pretty much any introductory quantum mechanics book is fine. In principle, one can also learn this purely algebraically (without knowing "normal" QM) but I'm not sure if there is any good reference, or whether that is even a good idea from a physics education point of view. (Clearly, knowing more about your background would help.) Jul 13 '18 at 20:58

## Background

Often, in quantum optics, the Heisenberg picture is used, where instead of considering equations of motion of states, equations of motions of operators are looked at instead. When considering creation/annihilation operators, this is often considerably easier as the matrices that determine the evolution (assuming it can be written in terms of matrices) are, for one, finite.

The Heisenberg equations of motions are calculated using $$\frac{dA}{dt} = \frac i\hbar \left[H, A\right] + \frac{\partial A}{\partial t},$$ for an operator $A$ evolving under a Hamiltonian $H$.

Here, the operator $a_j \left(a_j^\dagger\right)$ is the annihilation (creation) operator for spatial mode $j$. For a single mode, this allows for an effective Hamiltonian (acting on the operators) to be written as $$i\frac{d}{dt}\begin{pmatrix}a \\ a^\dagger\end{pmatrix} = H_{\text{eff}}\begin{pmatrix}a \\ a^\dagger\end{pmatrix}.$$ This naturally extends to writing their transformation as $$\begin{pmatrix}b \\ b^\dagger\end{pmatrix} = M\begin{pmatrix}a \\ a^\dagger\end{pmatrix}$$ for input modes $a \left(a^\dagger\right)$ and output modes $b \left(b^\dagger\right)$.

When it exists, this transformation matrix $M$ can be calculated using $U^\dagger A_jU = \sum_{k}M_{jk}A_k$ for unitary evolution $U$. For the Unitaries in the question, this gives:

## Transformations

Displacement $$D_j\left(\alpha\right):\begin{pmatrix}b_j\\b_j^\dagger\\I\end{pmatrix} = \begin{pmatrix}1 && 0 && \alpha\\0&&1&&\alpha^*\\0&&0&&1\end{pmatrix} \begin{pmatrix}a_j\\a_j^\dagger\\I\end{pmatrix}$$

Rotation $$R_j\left(\phi\right):\begin{pmatrix}b_j\\b_j^\dagger\end{pmatrix} = \begin{pmatrix}e^{-i\phi} && 0\\0&&e^{i\phi}\end{pmatrix} \begin{pmatrix}a_j\\a_j^\dagger\end{pmatrix}$$

Squeezing $$S_j\left(\xi=re^{i\theta}\right):\begin{pmatrix}b_j\\b_j^\dagger\end{pmatrix} = \begin{pmatrix}\cosh r && -e^{i\theta}\sinh r\\-e^{-i\theta}\sinh r&&\cosh r\end{pmatrix} \begin{pmatrix}a_j\\a_j^\dagger\end{pmatrix}$$

Beamsplitter $$B_{jk}\left(\zeta = te^{i\varphi}\right):\begin{pmatrix}b_j\\b_k\\b_j^\dagger\\b_k^\dagger\end{pmatrix} = \begin{pmatrix}t && re^{-i\varphi}&&0&& 0\\re^{i\varphi}&&t&&0&&0\\0&&0&&t&&re^{i\varphi}\\0&&0&&re^{-i\varphi}&&t\end{pmatrix} \begin{pmatrix}a_j\\a_k\\a_j^\dagger\\a_k^\dagger\end{pmatrix},$$ where $r=\cos\left|\zeta\right|$.

Cubic Phase

Unfortunately, this is too nonlinear to write in the above way in matrix form. As $x = \frac{1}{\sqrt 2}\left(a+a^\dagger\right)$, even to first order, $V^\dagger a^\dagger V$ will include terms such as $\left[a^3, a^\dagger\right] = 3a^2$, which cannot be written in terms of $\alpha a^\dagger+\beta a+\gamma$.

• @Mithrandir2, how do these even relate to the operators in the original question? For example for D, you have bj = aj + alpha, how does this even relate to the form given in the original question? Aug 2 '18 at 9:20
• @user1271772 for that example, it's $b_j = D^\dagger a_j D$ (and the others follow in the same way) Aug 2 '18 at 10:48
• I'm now confused even more. I have no idea what's going on here. @meowzz, since you un-accepted my answer and accepted this one, I presume you understand what's going on? What is the matrix representation for D using this method? In my method you plug the matrices for $a$ and $a^\dagger$ that I gave, into the formula you gave for D, and voila. Contrarily in this answer, I don't see what the matrix is for D. Is it the 3x3 matrix? That gives bj = aj + alpha. I'm sorry I don't understand. Mithrandir2: I'm not saying your answer is wrong, I'm just trying to understand it. Aug 2 '18 at 19:19
• What do you mean by "too nonlinear"? It is simply nonlinear, that's why it doesn't fit the framework. Aug 2 '18 at 20:44
• @Mithrandir24601 The underlying process for squezzing is nonlinear (which involves a pump and so on). But the effective Hamiltonian you get in "linear optics". This is pretty much standard. "Gaussian" refers to the fact that exponentials of quadratic "things" (like Hamiltonians) are Gaussians (in the sense of the Gaussian distribution), which describes thermal states, time evolution, and so on, of these systems. Aug 2 '18 at 21:47

The CV model is a natural fit for simulating bosonic systems (electromagnetic fields, harmonic oscillators, phonons, Bose-Einstein condensates, or optomechanical resonators) and for settings where continuous quantum operators – such as position & momentum – are present.

Which means you can have many different different matrix representations for the CV gates. They then point out:

The most elementary CV system is the bosonic harmonic oscillator.

This means that for any values of the scalar (non-matrix) parameters $\alpha, \gamma, \phi, z, \theta, \gamma$, you can just calculate the formula they gave you, using the following matrix representations for the creation and annihilation operators for a bosonic harmonic oscillator:

The number operator $\hat{n}$ is just $a^\dagger a$.

Keep in mind that any matrix representation is basis-dependent, meaning that you can take these matrix representations and (for example) diagonalize them, and they would be a perfectly valid matrix representation in a new basis. However the matrices I gave you here are quite "standard" for quantum harmonic oscillators.

• Would it be possible to generalize the "many many, different different" representations somehow (primarily interested in squeezed states)? Jul 13 '18 at 0:37
• What you have here is the matrix representation for the CV gates of a bosonic harmonic oscillator. What else do you want the matrix representation for? A particular Bose-Einstein condensates? What do the creation and annihilation operators look like? Jul 13 '18 at 11:46
• "What do the creation and annihilation operators look like?" I may make this a new question. I would like the matrix representation for the squeeze gate. I can also make that it's own question. Jul 13 '18 at 14:41
• But @meowzz, there will be many matrix representations depending on what type of CV system you're considering. For example above we have the answer for the case where the CV system is a harmonic oscillator. If it's an anharmonic oscillator, it will be a different matrix entirely! CV quantum computing is not the same as "standard QC" where gates like CNOT have a simple matrix representation. Jul 13 '18 at 15:53
• What do you mean by "the same"? All what matters are the algebraic properties of $a$, namely $[a,a^\dagger]=1$. Everything can be derived from there, including the representation theory on Fock spaces. So yes, everything touched upon by the question, and all the math, is the same. That's the power of the algebraic approach, and one should use it rather than makeing things look more complicated than they are. Jul 14 '18 at 14:15