symop.polynomial.channels.models.beamsplitter¶
Beamsplitter models for CCR polynomial representations.
This module provides helpers for applying a two-mode beamsplitter unitary to ket, density, and operator polynomial objects.
This implementation performs a mode-expanding substitution: each input mode is mapped to a superposition of output-path modes.
This is required for correct Hong-Ou-Mandel behavior when mode identity includes envelope and path.
Functions
|
Apply a 50:50 beamsplitter to a density polynomial. |
|
Apply a 50:50 beamsplitter to a ket polynomial. |
|
Apply a 50:50 beamsplitter to an operator polynomial. |
|
Apply a two-mode beamsplitter to a density polynomial. |
|
Apply a two-mode beamsplitter to a ket polynomial. |
|
Apply a two-mode beamsplitter to an operator polynomial. |
- _beamsplitter_substitution(*, mode0: ModeOp, mode1: ModeOp, out0: Path, out1: Path, theta: float, phi_t: float, phi_r: float) Callable[[LadderOp], list[tuple[complex, LadderOp]]]¶
Construct the ladder-operator substitution for a two-mode beamsplitter.
- Parameters:
- Returns:
Substitution function mapping each input ladder operator to a linear combination of output-path ladder operators.
- Return type:
SubstFn
Notes
The induced transformation on creation operators is
\[ \begin{align}\begin{aligned}\begin{split}\hat a_0^\dagger &\mapsto t\,\hat a_{0,\mathrm{out0}}^\dagger + r\,\hat a_{0,\mathrm{out1}}^\dagger, \\\end{split}\\\hat a_1^\dagger &\mapsto r\,\hat a_{1,\mathrm{out0}}^\dagger - t\,\hat a_{1,\mathrm{out1}}^\dagger,\end{aligned}\end{align} \]where
\[t = \cos(\theta)e^{i\phi_t}, \qquad r = \sin(\theta)e^{i\phi_r}.\]Annihilation operators are transformed by the corresponding conjugate coefficients.
- beamsplitter_50_50_densitypoly(rho: DensityPoly, *, mode0: ModeOp, mode1: ModeOp, out0: Path, out1: Path) DensityPoly¶
Apply a 50:50 beamsplitter to a density polynomial.
- Parameters:
rho (
DensityPoly) – Input density polynomial.mode0 (
ModeOp) – First input mode.mode1 (
ModeOp) – Second input mode.out0 (
Path) – Output path for the first output arm.out1 (
Path) – Output path for the second output arm.
- Returns:
Rewritten density polynomial after a balanced beamsplitter transformation.
- Return type:
DensityPolyProtocol
Notes
This is a convenience wrapper around
beamsplitter_densitypoly()with\[\theta = \frac{\pi}{4}.\]
- beamsplitter_50_50_ketpoly(poly: KetPoly, *, mode0: ModeOp, mode1: ModeOp, out0: Path, out1: Path) KetPoly¶
Apply a 50:50 beamsplitter to a ket polynomial.
- Parameters:
poly (
KetPoly) – Input ket polynomial.mode0 (
ModeOp) – First input mode.mode1 (
ModeOp) – Second input mode.out0 (
Path) – Output path for the first output arm.out1 (
Path) – Output path for the second output arm.
- Returns:
Rewritten ket polynomial after a balanced beamsplitter transformation.
- Return type:
Notes
This is a convenience wrapper around
beamsplitter_ketpoly()with\[\theta = \frac{\pi}{4}.\]
- beamsplitter_50_50_oppoly(op: OpPoly, *, mode0: ModeOp, mode1: ModeOp, out0: Path, out1: Path) OpPoly¶
Apply a 50:50 beamsplitter to an operator polynomial.
- Parameters:
op (
OpPoly) – Input operator polynomial.mode0 (
ModeOp) – First input mode.mode1 (
ModeOp) – Second input mode.out0 (
Path) – Output path for the first output arm.out1 (
Path) – Output path for the second output arm.
- Returns:
Rewritten operator polynomial after a balanced beamsplitter transformation.
- Return type:
OpPolyProtocol
Notes
This is a convenience wrapper around
beamsplitter_oppoly()with\[\theta = \frac{\pi}{4}.\]
- beamsplitter_densitypoly(rho: DensityPoly, *, mode0: ModeOp, mode1: ModeOp, out0: Path, out1: Path, theta: float, phi_t: float = 0.0, phi_r: float = 0.0) DensityPoly¶
Apply a two-mode beamsplitter to a density polynomial.
- Parameters:
rho (
DensityPoly) – Input density polynomial.mode0 (
ModeOp) – First input mode.mode1 (
ModeOp) – Second input mode.out0 (
Path) – Output path for the first output arm.out1 (
Path) – Output path for the second output arm.theta (
float) – Beamsplitter mixing angle.phi_t (
float) – Transmission phase.phi_r (
float) – Reflection phase.
- Returns:
Rewritten density polynomial after the beamsplitter transformation.
- Return type:
DensityPolyProtocol
Notes
The transformation is applied independently to the ladder operators appearing in the density polynomial and expanded linearly.
- beamsplitter_ketpoly(poly: KetPoly, *, mode0: ModeOp, mode1: ModeOp, out0: Path, out1: Path, theta: float, phi_t: float = 0.0, phi_r: float = 0.0) KetPoly¶
Apply a two-mode beamsplitter to a ket polynomial.
- Parameters:
poly (
KetPoly) – Input ket polynomial.mode0 (
ModeOp) – First input mode.mode1 (
ModeOp) – Second input mode.out0 (
Path) – Output path for the first output arm.out1 (
Path) – Output path for the second output arm.theta (
float) – Beamsplitter mixing angle.phi_t (
float) – Transmission phase.phi_r (
float) – Reflection phase.
- Returns:
Rewritten ket polynomial after the beamsplitter transformation.
- Return type:
Notes
The transformation is implemented by substituting each selected ladder operator with its beamsplitter image and expanding linearly.
Terms that contain annihilation operators after rewriting are discarded, so the result remains a valid creators-only ket polynomial (up to the identity term).
- beamsplitter_oppoly(op: OpPoly, *, mode0: ModeOp, mode1: ModeOp, out0: Path, out1: Path, theta: float, phi_t: float = 0.0, phi_r: float = 0.0) OpPoly¶
Apply a two-mode beamsplitter to an operator polynomial.
- Parameters:
op (
OpPoly) – Input operator polynomial.mode0 (
ModeOp) – First input mode.mode1 (
ModeOp) – Second input mode.out0 (
Path) – Output path for the first output arm.out1 (
Path) – Output path for the second output arm.theta (
float) – Beamsplitter mixing angle.phi_t (
float) – Transmission phase.phi_r (
float) – Reflection phase.
- Returns:
Rewritten operator polynomial after the beamsplitter transformation.
- Return type:
OpPolyProtocol
Notes
This applies the same mode-expanding substitution used for ket and density polynomials, but without imposing ket-specific creator-only constraints.