sf.ops.DisplacedSqueezed

class DisplacedSqueezed(r_d=0.0, phi_d=0.0, r_s=0.0, phi_s=0.0)[source]

Bases: strawberryfields.ops.Preparation

Prepare a mode in a displaced squeezed state.

A displaced squeezed state is prepared by squeezing a vacuum state, and then applying a displacement operator.

\[\ket{\alpha,z} = D(\alpha)\ket{0,z} = D(\alpha)S(z)\ket{0},\]

where the squeezing parameter \(z=re^{i\phi}\).

Parameters
  • r_d (float) – displacement magnitude

  • phi_d (float) – displacement angle

  • r_s (float) – squeezing magnitude

  • phi_s (float) – squeezing angle \(\phi\)

Definition

The displaced squeezed state \(\ket{\alpha, z}\), \(\alpha\in\mathbb{C}\), \(z=re^{i\phi}\) is a displaced and squeezed vacuum state defined by

\[\ket{\alpha, z} = D(\alpha)S(z)\ket{0}\]

Tip

Available in Strawberry Fields as a NumPy array by strawberryfields.utils.displaced_squeezed_state()

In the Fock basis, it has the decomposition

\[|\alpha,z\rangle = e^{-\frac{1}{2}|\alpha|^2-\frac{1}{2}{\alpha^*}^2 e^{i\phi}\tanh{(r)}} \sum_{n=0}^\infty\frac{\left[\frac{1}{2}e^{i\phi} \tanh(r)\right]^{n/2}}{\sqrt{n!\cosh(r)}} H_n \left[ \frac{\alpha\cosh(r)+\alpha^*e^{i\phi}\sinh(r)}{\sqrt{e^{i\phi}\sinh(2r)}} \right] |n\rangle\]

where \(H_n(x)\) are the Hermite polynomials defined by \(H_n(x)=(-1)^n e^{x^2}\frac{d}{dx}e^{-x^2}\). Alternatively, in the Gaussian formulation, \(\bar{\mathbf{r}} = 2 \sqrt{\frac{\hbar}{2}}(\text{Re}(\alpha),\text{Im}(\alpha))\) and \(\mathbf{V} = R(\phi/2)\begin{bmatrix}e^{-2r} & 0 \\0 & e^{2r} \\ \end{bmatrix}R(\phi/2)^T\)

We can use the displaced squeezed states to approximate the \(x\) position and \(p\) momentum eigenstates;

\[\ket{x}_x \approx D\left(\frac{1}{2}x\right)S(r)\ket{0}, ~~~~ \ket{p}_p \approx D\left(\frac{i}{2}p\right)S(-r)\ket{0}\]

where \(z=r\) is sufficiently large.

measurement_deps

Extra dependencies due to parameters that depend on measurements.

ns

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 local 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 local backend to execute the operation on the current register state right away.

Takes care of parameter evaluations and any pending formal transformations (like dagger) and then calls Operation._apply().

Parameters
  • reg (Sequence[RegRef]) – subsystem(s) the operation is acting on

  • backend (BaseBackend) – backend to execute the operation

Returns

the result of self._apply

Return type

Any

decompose(reg, **kwargs)

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

See strawberryfields.backends.base.

Parameters

reg (Sequence[RegRef]) – subsystems the operation is acting on

Returns

decomposition as a list of operations acting on specific subsystems

Return type

list[Command]

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