API Reference
Complete Python API documentation for the Integrated CV Squeezer simulation framework
Module Overview
class SqueezerSimulator
Core ModuleMain simulation class for integrated squeezed light generation. Supports both SiN Kerr (χ³) and TFLN OPA (χ²) platforms with full loss modeling.
from cv_squeezer import SqueezerSimulator
# Initialize for SiN platform
sim = SqueezerSimulator(
platform="sin", # "sin" or "tfln"
wavelength=1550e-9, # Operating wavelength (m)
temperature=300, # Temperature (K)
)
# Calculate squeezing
result = sim.calculate_squeezing(
pump_power=50e-3, # Pump power (W)
escape_efficiency=0.85, # Cavity escape efficiency
)
Constructor
__init__(platform, wavelength, temperature=300, **kwargs)
platform (str): Platform type - "sin" or "tfln"
wavelength (float): Operating wavelength in meters
temperature (float): Operating temperature in Kelvin
**kwargs: Platform-specific parameters
Methods
calculate_squeezing(pump_power, escape_efficiency, **kwargs)
Returns dict
Calculate squeezing and anti-squeezing levels in dB.
pump_power (float): Input pump power in Watts
escape_efficiency (float): Cavity escape efficiency (0-1)
Returns: {"squeezing_dB": float, "antisqueezing_dB": float, "r": float}
spectrum(frequencies, pump_power, escape_efficiency)
Returns ndarray
Calculate frequency-dependent squeezing spectrum S(Ω).
frequencies (ndarray): Sideband frequencies in Hz
Returns: Array of squeezing levels in dB at each frequency
apply_loss(variance, total_efficiency)
Returns float
Apply optical loss to squeezed variance: V_out = η×V_in + (1-η)
variance (float): Input variance (1 = shot noise)
total_efficiency (float): Total optical efficiency (0-1)
get_covariance_matrix(r, theta=0)
Returns CovarianceMatrix
Get covariance matrix representation of squeezed state.
r (float): Squeezing parameter
theta (float): Squeezing angle in radians
class RingResonator
SiN PlatformDesign and simulate silicon nitride microring resonators for Kerr squeezing via four-wave mixing.
from cv_squeezer.platforms import RingResonator
ring = RingResonator(
radius=50e-6, # Ring radius (m)
width=1.2e-6, # Waveguide width (m)
height=800e-9, # Waveguide height (m)
gap=200e-9, # Coupling gap (m)
n2=2.4e-19, # Kerr coefficient (m²/W)
)
# Calculate resonator properties
props = ring.calculate_properties()
print(f"Q factor: {props['Q_total']:.0f}")
print(f"FSR: {props['FSR']/1e9:.2f} GHz")
Methods
calculate_properties()
Returns dict with Q_total, Q_intrinsic, Q_coupling, FSR, finesse, linewidth
escape_efficiency()
Calculate escape efficiency η_esc = κ_ex / (κ_ex + κ_i)
fwm_gain(pump_power, detuning=0)
Calculate four-wave mixing parametric gain coefficient
transmission_spectrum(wavelengths)
Calculate through-port transmission vs wavelength
optimize_coupling(target_escape_eff)
Find coupling gap for desired escape efficiency
class OPAWaveguide
TFLN PlatformDesign thin-film lithium niobate waveguides for optical parametric amplification and high-level squeezing.
from cv_squeezer.platforms import OPAWaveguide
opa = OPAWaveguide(
length=10e-3, # Waveguide length (m)
width=1.5e-6, # Ridge width (m)
film_thickness=600e-9, # LN film thickness (m)
poling_period=4.5e-6, # QPM period (m)
d_eff=27e-12, # Effective nonlinearity (m/V)
)
# Calculate gain
gain = opa.parametric_gain(pump_power=5e-3)
print(f"Parametric gain: {gain:.1f}")
Methods
parametric_gain(pump_power)
Calculate OPA gain G = cosh²(gL) where g ∝ √P_pump
phase_mismatch(wavelength, temperature)
Calculate phase mismatch Δk including QPM compensation
squeezing_vs_length(lengths, pump_power)
Calculate squeezing as function of waveguide length
temperature_tuning_curve(temperatures)
Calculate phase matching wavelength vs temperature
bandwidth(pump_power)
Calculate gain bandwidth for given pump power
class CovarianceMatrix
Gaussian StatesManipulate and analyze Gaussian quantum states using covariance matrix formalism.
from cv_squeezer.quantum import CovarianceMatrix
import numpy as np
# Create squeezed state covariance matrix
r = 1.15 # ~10 dB squeezing
sigma = CovarianceMatrix.squeezed_vacuum(r, theta=0)
# Apply 50:50 beamsplitter with vacuum
sigma_mixed = sigma.beamsplitter(CovarianceMatrix.vacuum(), eta=0.5)
# Get quadrature variances
var_x, var_p = sigma.variances()
print(f"ΔX² = {var_x:.3f}, ΔP² = {var_p:.3f}")
Class Methods (State Creation)
CovarianceMatrix.vacuum()
Create single-mode vacuum state: σ = ½ I₂
CovarianceMatrix.squeezed_vacuum(r, theta=0)
Create squeezed vacuum with squeezing parameter r and angle θ
CovarianceMatrix.thermal(n_bar)
Create thermal state with mean photon number n̄
CovarianceMatrix.two_mode_squeezed(r)
Create two-mode squeezed (EPR) state
Instance Methods (Operations)
beamsplitter(other, eta)
Mix with another mode via beamsplitter with transmissivity η
apply_loss(efficiency)
Apply optical loss (beamsplitter with vacuum)
rotate(theta)
Apply phase-space rotation by angle θ
variances()
Return (var_X, var_P) quadrature variances
purity()
Calculate state purity μ = 1/√det(σ)
wigner(x_range, p_range, resolution=100)
Compute Wigner function on specified grid
class LossBudget
AnalysisTrack and analyze optical loss contributions and their impact on detected squeezing.
from cv_squeezer.analysis import LossBudget
budget = LossBudget()
# Add loss sources
budget.add_loss("Escape efficiency", 0.85)
budget.add_loss("Fiber coupling", 0.90)
budget.add_loss("Filter insertion", 0.95)
budget.add_loss("Detector QE", 0.93)
# Analyze
total_eff = budget.total_efficiency() # 0.67
detected_sq = budget.detected_squeezing(source_sq_dB=-10)
# Visualize
budget.plot_waterfall()
class SpectralAnalyzer
AnalysisAnalyze frequency-dependent squeezing spectra and sideband correlations.
from cv_squeezer.analysis import SpectralAnalyzer
analyzer = SpectralAnalyzer(
linewidth=50e6, # Cavity linewidth (Hz)
gain=5.0, # Parametric gain
escape_efficiency=0.85
)
# Get spectrum
freqs = np.linspace(0, 200e6, 1000)
sq_spectrum = analyzer.squeezing_spectrum(freqs)
# Get 3dB bandwidth
bw = analyzer.bandwidth_3dB() # Returns Hz
Utility Functions
cv_squeezer.utils.dB_to_variance(dB)
Convert dB squeezing to variance: V = 10^(dB/10)
cv_squeezer.utils.variance_to_dB(variance)
Convert variance to dB: dB = 10 × log₁₀(V)
cv_squeezer.utils.r_to_dB(r)
Convert squeezing parameter to dB: dB ≈ 8.686 × r
cv_squeezer.utils.dB_to_r(dB)
Convert dB squeezing to squeezing parameter r
cv_squeezer.utils.efficiency_product(*efficiencies)
Calculate total efficiency from chain of efficiencies
Physical Constants
from cv_squeezer import constants
constants.c # Speed of light: 299792458 m/s
constants.h # Planck constant: 6.626e-34 J·s
constants.hbar # Reduced Planck: 1.055e-34 J·s
constants.epsilon_0 # Vacuum permittivity: 8.854e-12 F/m
constants.k_B # Boltzmann constant: 1.381e-23 J/K
# Material parameters
constants.n2_SiN # SiN Kerr coefficient: 2.4e-19 m²/W
constants.d33_LN # LN d₃₃ coefficient: 27e-12 m/V
constants.n_SiN # SiN refractive index: 1.99
constants.n_LN_o # LN ordinary index: 2.21
constants.n_LN_e # LN extraordinary index: 2.14