Hi @ievutec!

At the moment, there is no built-in method to take the Hermitian conjugate of a quantum operation. However, in the case of these two gates, it is simply sufficient to negate the parameter.

For example, for the Kerr interaction:

K(\kappa)^\dagger = \left(e^{i\kappa \hat{n}^2}\right)^\dagger = e^{-i\kappa \hat{n}^2} = K(-\kappa)

since the number operator is self-adjoint (\hat{n}^\dagger = \hat{n}). The same result holds true for the cubic phase gate, as \hat{x}^\dagger = \hat{x}:

V(\gamma)^\dagger = \left(e^{i\gamma\hat{x}^3/3\hbar}\right)^\dagger = e^{-i\gamma\hat{x}^3/3\hbar} = V(-\gamma)

With regards to your second question about the accuracy of truncation; if choosing between the two non-linear CV operations (Kerr and cubic phase), in general, it is always better to use the Kerr interaction.

This is simply due to numerical accuracy — since the number operator \hat{n} is diagonal the Fock basis, computing the matrix exponential and therefore the action of the Kerr interaction is relatively easy and accurate computationally.

The position operator x is not diagonal, and so we need to compute a **truncated** matrix exponential, resulting in the additional numerical error.