qml.devices.default_gaussian

The default.gaussian device is a simulator for Gaussian continuous-variable quantum computations, and can be used as a template for writing PennyLane devices for new CV backends.

It implements the necessary Device methods as well as all built-in continuous-variable Gaussian operations, and provides a very simple simulation of a Gaussian-based quantum circuit architecture.

Classes

DefaultGaussian(wires, *[, shots, hbar, …])

Default Gaussian device for PennyLane.

Functions

beamsplitter(theta, phi)

Beamsplitter.

coherent_state(a[, phi, hbar])

Returns a coherent state.

controlled_addition(s)

CX gate.

controlled_phase(s)

CZ gate.

displaced_squeezed_state(a, phi_a, r, phi_r)

Returns a squeezed coherent state

displacement(state, wire, alpha[, hbar])

Displacement in the phase space.

fock_expectation(cov, mu, params[, hbar])

Calculates the expectation and variance of a Fock state probability.

fock_prob(cov, mu, event[, hbar])

Returns the probability of detection of a particular PNR detection event.

gaussian_state(cov, mu[, hbar])

Returns a Gaussian state.

homodyne([phi])

Function factory that returns the Homodyne expectation of a one mode state.

identity(*_, **__)

Returns 1.

interferometer_unitary(U)

InterferometerUnitary

partitions(s[, include_singles])

Partitions a sequence into all groupings of pairs and singles of elements.

photon_number(cov, mu, params[, hbar])

Calculates the mean photon number for a given one-mode state.

poly_quad_expectations(cov, mu, wires, …)

Calculates the expectation and variance for an arbitrary polynomial of quadrature operators.

quadratic_phase(s)

Quadratic phase shift.

rotation(phi)

Rotation in the phase space.

set_state(state, wire, cov, mu)

Inserts a single mode Gaussian into the state representation of the complete system.

squeezed_cov(r, phi[, hbar])

Returns the squeezed covariance matrix of a squeezed state.

squeezed_state(r, phi[, hbar])

Returns a squeezed state.

squeezing(r, phi)

Squeezing in the phase space.

thermal_state(nbar[, hbar])

Returns a thermal state.

two_mode_squeezing(r, phi)

Two-mode squeezing.

vacuum_state(wires[, hbar])

Returns the vacuum state.

Contents

Using PennyLane

Development

API

Internals