symop.polynomial.channels.models.pure_loss

Pure-loss channels for symbolic density polynomials.

Implements the bosonic pure-loss channel as a specialization of a unitary dilation: a signal mode is mixed with a vacuum environment mode on a beamsplitter, and the environment is traced out afterward.

Convenience helpers are provided for applying loss to a single mode, multiple modes sequentially, or via mappings from modes to transmissivities.

Functions

pure_loss_densitypoly(rho, *, signal_mode, ...)

Apply a single-mode pure-loss channel to a symbolic density polynomial.

pure_loss_densitypoly_by_mode(rho, *, ...[, ...])

Apply pure loss to several modes specified by mappings.

pure_loss_densitypoly_many(rho, *, specs[, ...])

Apply multiple pure-loss channels sequentially.

Classes

PureLossSpec(signal_mode, env_mode, eta)

Per-mode specification for a pure-loss channel application.

class PureLossSpec(signal_mode: ModeOp, env_mode: ModeOp, eta: float) None

Bases: object

Per-mode specification for a pure-loss channel application.

Parameters:
  • signal_mode (ModeOp)

  • env_mode (ModeOp)

  • eta (float)

signal_mode

Mode to which the pure-loss channel is applied.

env_mode

Environment mode used for the dilation.

eta

Transmissivity \(\eta \in [0, 1]\).

env_mode: ModeOp
eta: float
signal_mode: ModeOp
_require_eta(eta: float) float

Validate transmissivity eta.

Parameters:

eta (float) – Power transmissivity \(\eta\) for the pure-loss channel.

Returns:

eta as a float.

Return type:

float

Raises:

ValueError – If eta is not finite or not in [0, 1].

Notes

Clipping or other parameter preprocessing is expected to happen upstream. This helper performs validation only.

pure_loss_densitypoly(rho: DensityPoly, *, signal_mode: ModeOp, env_mode: ModeOp, eta: float, normalize_trace: bool = True, eps: float = 1e-14) DensityPoly

Apply a single-mode pure-loss channel to a symbolic density polynomial.

Channel definition

The pure-loss channel with transmissivity \(\eta\) is realized as a unitary dilation using a beamsplitter acting on the signal mode and an environment mode prepared in vacuum, followed by tracing out the environment:

\[\mathcal{E}_\eta(\rho) = \mathrm{Tr}_E\!\left[ U_{\mathrm{BS}}(\eta)\; (\rho \otimes |0\rangle\langle 0|)\; U_{\mathrm{BS}}(\eta)^\dagger \right].\]

We use a 2x2 beamsplitter unitary with

\[t = \sqrt{\eta}, \qquad r = \sqrt{1-\eta}.\]
type rho:

DensityPoly

param rho:

Input symbolic density polynomial.

type signal_mode:

ModeOp

param signal_mode:

The mode to which the channel is applied.

type env_mode:

ModeOp

param env_mode:

Environment mode used for the dilation and traced out at the end.

This should be a fresh mode not otherwise part of the retained system, otherwise the final trace would remove genuine system degrees of freedom.

type eta:

float

param eta:

Transmissivity \(\eta \in [0, 1]\).

type normalize_trace:

bool

param normalize_trace:

If True, trace-normalize the reduced output density.

type eps:

float

param eps:

Threshold used by trace normalization when enabled.

returns:

Reduced density polynomial after applying the dilation and tracing out the environment.

rtype:

DensityPoly

Notes

The environment is treated as vacuum implicitly in the same sense as in the generic unitary-dilation primitive: the input density need not explicitly contain operators on env_mode.

Parameters:
  • rho (DensityPoly)

  • signal_mode (ModeOp)

  • env_mode (ModeOp)

  • eta (float)

  • normalize_trace (bool)

  • eps (float)

Return type:

DensityPoly

pure_loss_densitypoly_by_mode(rho: DensityPoly, *, eta_by_mode: Mapping[ModeOp, float], env_by_signal_mode: Mapping[ModeOp, ModeOp], normalize_trace: bool = True, eps: float = 1e-14) DensityPoly

Apply pure loss to several modes specified by mappings.

Parameters:
  • rho (DensityPoly) – Input density polynomial.

  • eta_by_mode (Mapping[ModeOp, float]) – Mapping from signal mode to transmissivity.

  • env_by_signal_mode (Mapping[ModeOp, ModeOp]) – Mapping from signal mode to the corresponding environment mode used in that mode’s dilation.

  • normalize_trace (bool) – If True, trace-normalize after each application.

  • eps (float) – Threshold used by trace normalization when enabled.

Returns:

Output density polynomial.

Return type:

DensityPoly

Raises:

KeyError – If an environment mode is missing for a signal mode.

pure_loss_densitypoly_many(rho: DensityPoly, *, specs: Iterable[PureLossSpec], normalize_trace: bool = True, eps: float = 1e-14) DensityPoly

Apply multiple pure-loss channels sequentially.

This is a convenience wrapper that repeatedly applies pure_loss_densitypoly(), once for each specification.

Parameters:
  • rho (DensityPoly) – Input density polynomial.

  • specs (Iterable[PureLossSpec]) – Iterable of pure-loss specifications.

  • normalize_trace (bool) – If True, trace-normalize after each application.

  • eps (float) – Threshold used by trace normalization when enabled.

Returns:

Output density polynomial after all channel applications.

Return type:

DensityPoly

Notes

Sequential application is the safest default because each dilation introduces its own environment mode, which is traced out immediately.