# sf.ops.Vgate¶

class Vgate(gamma)[source]

Bases: strawberryfields.ops.Gate

Cubic phase gate.

$V(\gamma) = e^{i \frac{\gamma}{3 \hbar} \hat{x}^3}$

Warning

• The cubic phase gate has lower accuracy than the Kerr gate at the same cutoff dimension.

• The cubic phase gate is non-Gaussian, and thus can only be used in the Fock backends, not the Gaussian backend.

Parameters

gamma (float) – parameter

Warning

The cubic phase gate can suffer heavily from numerical inaccuracies due to finite-dimensional cutoffs in the Fock basis. The gate implementation in Strawberry Fields is unitary, but it does not implement an exact cubic phase gate. The Kerr gate provides an alternative non-Gaussian gate.

Definition

$V(\gamma) = \exp\left(i \frac{\gamma}{3 \hbar} \x^3\right), \quad V^\dagger(\gamma) \a V(\gamma) = \a +i\frac{\gamma}{2\sqrt{2/\hbar}} (\a +\ad)^2$

It transforms the phase space as follows:

$\begin{split}V^\dagger(\gamma) \x V(\gamma) &= \x,\\ V^\dagger(\gamma) \p V(\gamma) &= \p +\gamma \x^2.\end{split}$
 H Returns a copy of the gate with the self.dagger flag flipped. measurement_deps Extra dependencies due to parameters that depend on measurements. ns
H

Returns a copy of the gate with the self.dagger flag flipped.

H stands for hermitian conjugate.

Returns

formal inverse of this gate

Return type

Gate

measurement_deps

Extra dependencies due to parameters that depend on measurements.

Returns

dependencies

Return type

set[RegRef]

ns = 1
 apply(reg, backend, **kwargs) Ask a backend to execute the operation on the current register state right away. decompose(reg, **kwargs) Decompose the operation into elementary operations supported by the backend API. merge(other) Merge the operation with another (acting on the exact same set of subsystems).
apply(reg, backend, **kwargs)

Ask a backend to execute the operation on the current register state right away.

Like Operation.apply(), but takes into account the special nature of p and applies self.dagger.

Returns

Gates do not return anything, return value is None

Return type

None

decompose(reg, **kwargs)

Decompose the operation into elementary operations supported by the backend API.

Like Operation.decompose(), but applies self.dagger.

merge(other)

Merge the operation with another (acting on the exact same set of subsystems).

Note

For subclass overrides: merge may return a newly created object, or self, or other, but it must never modify self or other because the same Operation objects may be also used elsewhere.

Parameters

other (Operation) – operation to merge this one with

Returns

other * self. The return value None represents the identity gate (doing nothing).

Return type

Operation, None

Raises

MergeFailure – if the two operations cannot be merged