levisim.multiphysics.multitrap.base¶
Shared state and method dispatch of MultiTrap
MultiTrapBase builds the system (trap physics or toy parameters, the dimensions, the noise correlations), holds the information printing functions, and owns the spectrum entry points (homodyne_spectrum, all_position_power_spectra, …) together with the functions that dispatch a QuantumLinearTheoryMethod to the mixin that implements it:
light_noise_vectors and output_light_noise_vectors (the cavity light, inside and outside)
hybridised_positions and hybridised_position_noise_vector (the mechanical positions)
The dispatch lives here rather than in any one mixin because, for the methods that solve for the positions first (HYBRID_LINEAR_AMPLIFIER_MODEL, NUMERICAL_HYBRIDISATION, POWER_SERIES_HYBRIDISATION), the light comes from the positions, while for ANALYTIC_CAVITY_OUTPUT the intracavity light comes from the output light: the two families of functions call each other across mixins.
The method-specific calculations are in the mixins, which MultiTrap combines with this class:
levisim.multiphysics.multitrap.linear_amplifier_mixin.LinearAmplifierMixin - methods 1-3
levisim.multiphysics.multitrap.hybridisation_mixin.HybridisationMixin - methods 4-5
levisim.multiphysics.multitrap.analytic_mixin.AnalyticMixin - methods 6-7
MultiTrapBase is not meant to be built on its own: its constructor calls setup_linear_amplifier_model_matrices and setup_hybridisation from the mixins.
- class levisim.multiphysics.multitrap.base.MultiTrapBase(**kwargs)[source]¶
Bases:
objectShared state, information printing, spectrum entry points and method dispatch of MultiTrap
Use levisim.multiphysics.multitrap.MultiTrap, which adds the method-specific mixins.
- property drift_eigenvalues¶
Eigenvalues λ of the drift matrix A, sorted by decreasing real part (largest growth first)
Re λ is minus the amplitude damping rate of the normal mode,
|Im λ|its angular frequency. [1/s, complex] (divide Im λ by kHz for the frequency in kHz)
- property stability_tolerance¶
1e-8 of the largest
|A|entryIt ignores round-off in the decay rates of dark modes, which can be as small as the gas damping. [1/s]
- Type:
Largest Re λ still counted as stable
- property max_growth_rate¶
negative (minus the damping of the least-damped mode) for a stable system, positive (the growth rate of the fastest-growing mode, whose amplitude grows as exp(Re λ·t)) for an unstable one [1/s]
- Type:
Largest real part of the drift-matrix eigenvalues, max Re λ
- property is_stable¶
every Re λ ≤ stability_tolerance [bool]
- Type:
Whether the linearised dynamics have a steady state
- property least_stable_mode¶
its angular frequency Ω =
|Im λ|and its growth rate (positive) or minus its damping rate (negative) [2π·Hz, 1/s]- Type:
(Ω, Re λ) of the normal mode with the largest Re λ
- property unstable_modes¶
Ω =
|Im λ|is the mode’s angular frequency and Re λ > stability_tolerance its growth rate. Each conjugate pair of eigenvalues λ, λ* counts once (through the member with Im λ > 0); a purely real eigenvalue (Ω = 0, a static instability) counts on its own. Empty for a stable system. [2π·Hz, 1/s]- Type:
The growing normal modes, as a list of (Ω, Re λ) pairs, fastest-growing first
- property stability_info_str¶
Lines describing the linear stability, as printed in info_str
- property info_str¶
String describing the MultiTrap instance
- property info¶
Prints information on the MultiTrap instance
- property info_per_dimension¶
Prints information on each Dimension instance
- property info_per_trap¶
Prints information on each Trap instance
- property toy_params_info_str¶
String describing the toy model parameters
- property toy_params_info¶
Prints information on the toy parameters
- property g_RMS¶
Root-mean-square of all the dimensions’ light-mech coupling rates [2π·Hz]
- setup_levitated_physics(**kwargs)[source]¶
Setup the physics of many beads levitated in tweezer traps
By default the tweezers and beads are the built-in lists below, cut to the first num_traps: 1064 nm tweezers at θ = 45° with phases φn = 0°, 90°, 20°, 30°, …, 80° and slightly different waists, and beads (default Bead material) of radius 60.1, 60.2, …, 60.9 nm, all at the node. Each list can be replaced through MultiTrap keyword arguments:
tweezers: list of Tweezer instances, one per trap
beads: list of Bead instances, one per trap
trap_kwargs: list of dicts of extra Trap keyword arguments, one per trap, e.g. override_Ω_dict to use measured mechanical frequencies, or cavity_drive_tweezer and cavity_drive_field_ratio for a bead that scatters into the cavity the light of another tweezer than the one trapping it (e.g. a bead in a 976 nm trap, which the cavity does not resonate with, scattering the out-of-focus field ζ·E0 of a 1064 nm tweezer; see Trap.cavity_drive_field). The coherent-scattering couplings then use that tweezer’s wavelength, polarisation angle θ and Rayleigh range, and the cavity frequency follows the cavity-drive tweezers
φn_dict: {n: φn} tweezer phases [rad] for any of the traps n = 1, …, num_traps; they replace the phase of that trap’s tweezer (given or built-in). The Tweezer instances passed in are not modified: a trap whose phase is replaced gets a copy of its tweezer.
photon_recoil: add the photon-recoil heating of each bead to the bath of each of its dimensions (default True with physical parameters; see the PHOTON RECOIL HEATING block of __init__)
If num_traps is not given, it is the length of the first of these lists that is given.
- setup_linearised_coherent_scattering_physics(**kwargs)[source]¶
Setup the linearised properties of tweezers levitating beads which are all coherently scattering into the same cavity
Linearisation splits the optical degrees of freedom into 2 parts
α ≡ a dominant, static, complex valued part a ≡ a small, dynamic, operator valued part a → α + a a† → α* + a† A → A0 + (a† + a) P → P0 + i(a† - a) α = 1/2 (A0 + iP0) α* = 1/2 (A0 - iP0)
To derive α (the mean static cavity photon field), consider the full Hamiltonian
H ≡ H_free + H_int H_free ≡ -ħΔ·a†a
NOTE: all tweezers are now included in a multi-particle setup!
Ed --> Etot = Ed1 + Ed2 + ... = ∑ Ed H_int ≡ ∑ V_CS = Σ -Ed·sin(θ)[cos(Φ)·(...)...]·(A ...) V_CS(0) = -Ed·sin(θ)·cos(Φ).A
Heisenberg’s EoMs + dissipation
da/dt = i[H/ħ, a] - (κ/2)a da/dt = (iΔ - κ/2)a + ∑ i[V_CS/ħ, a]
Static part exists at origin
dα/dt = 0 = (iΔ - κ/2)α + ∑ i[V_CS(0)/ħ, a] i[V_CS(0)/ħ, a] = -iωd·sin(θ)·cos(Φ)·[A, a] = +iωd·sin(θ)·cos(Φ), since [A, a] = -1 dα/dt = 0 = (iΔ - κ/2)α + ∑ iωd·sin(θ)·cos(Φ) α = -∑ iωd·sin(θ)·cos(Φ) / (iΔ - κ/2) α = +∑ ωd·sin(θ)·cos(Φ) · [(-Δ + iκ/2) / (Δ² + (κ/2)²]
- TOY_PARAMETER_KEYS = frozenset({'P', 'T', 'gjn_dict', 'm', 'r', 'toy_gx', 'toy_gxy', 'toy_gxz', 'toy_gy', 'toy_gyz', 'toy_gz', 'toy_Γ', 'use_Γ_formula', 'vth', 'Γjn_dict', 'Ω_model', 'Ωz_to_Ωx_multiplier', 'ρ', 'φ_even_n', 'φ_odd_n', 'φn_dict'})¶
- warn_about_unknown_toy_parameters(params)[source]¶
Logs a WARNING naming any toy_params key that nothing reads
Unknown keys used to be ignored silently, so a renamed or misspelt key (e.g. ‘φ2’ for ‘φ_even_n’, ‘gs’ for ‘gjn_dict’, or ‘Ω_gap’ with the ‘pairs’ model) changed the physics without any message. Parameters of an ΩModel kind other than the chosen one count as unknown, since they have no effect.
- setup_toy_parameters(**params)[source]¶
Setup ‘toy’ parameters to insert into the model directly, without need to calculate them with underlying physics
- light_noise_vectors(method, ω)[source]¶
The noise vectors for the annihilation and creation operators of photons in the shared light mode inside the cavity a(ω), a†(ω)
Dispatches to linear_amplifier_light_noise_vectors (LINEAR_AMPLIFIER_MODEL), analytic_inside_cavity_light_noise_vectors (ANALYTIC_INSIDE_CAVITY), analytic_cavity_output_light_noise_vectors (ANALYTIC_CAVITY_OUTPUT), and otherwise light_noise_vectors_from_positions.
- light_noise_vectors_from_positions(method, ω)[source]¶
The intracavity light noise vectors a(ω), a†(ω) from the hybridised positions
a(ω) = χC(ω) [ i ∑ Gjn·qjn(ω) + √κ·a_in] a†(ω) = χC*(-ω)[-i ∑ Gjn*·qjn(ω) + √κ·a_in†]
(the creation operator couples through the conjugate Gjn*, since qjn is Hermitian), used by the methods that solve for the positions first: HYBRID_LINEAR_AMPLIFIER_MODEL, NUMERICAL_HYBRIDISATION and POWER_SERIES_HYBRIDISATION.
- output_light_noise_vectors(method, ω)[source]¶
The noise vectors for the annihilation and creation operators of photons leaving the cavity accounted for via input-output theory
a_out(ω) = -√κ·a(ω) + a_in(ω) a_out†(ω) = -√κ·a†(ω) + a_in†(ω)
ANALYTIC_CAVITY_OUTPUT has its own closed form (analytic_output_light_noise_vectors); every other method applies the relations above to light_noise_vectors.
- hybridised_positions(method, ω)[source]¶
Column vector of the solutions to the QLT equations of motion for each dimension’s position Each entry in the column vector is a noise vector
Dispatches to linear_amplifier_hybridised_positions (LINEAR_AMPLIFIER_MODEL and HYBRID_LINEAR_AMPLIFIER_MODEL), hybridisation_hybridised_positions (NUMERICAL_HYBRIDISATION and POWER_SERIES_HYBRIDISATION) and analytic_hybridised_positions (both analytic methods). TNT_LINEAR_AMPLIFIER_MODEL has no per-frequency noise vectors and raises ValueError.
- hybridised_position_noise_vector(label, method, ω)[source]¶
The noise vector for the specific hybridised position operator qjn
qjn(ω) = bjn(ω) + bjn†(ω)
- homodyne_quadrature(a_out_hat, a_out_dag)[source]¶
The output-light quadrature selected by the homodyne angle θ = cavity.θhom
h(ω) = A_out(ω)·cos(θ) + P_out(ω)·sin(θ) = a_out(ω)·exp(iθ) + a_out†(ω)·exp(-iθ) with A_out = a_out + a_out† and P_out = i(a_out - a_out†) (the phase quadrature convention used in Tania’s derivation; the opposite sign i(a† - a) would mirror θ → -θ). [same units as the noise vectors]
- homodyne_noise_vector(method, ω)[source]¶
The homodyne quadrature of the output light, defined by the homodyne angle of the cavity
h(ω) = a_out(ω)·exp(iθ) + a_out†(ω)·exp(-iθ) = A_out(ω)·cos(θ) + P_out(ω)·sin(θ) (see homodyne_quadrature), θ = cavity.θhom [1/√Hz]
- heterodyne_noise_vector(method, ω)[source]¶
The output light annihilation operator, whose PSD levisim calls the heterodyne spectrum
S_het(ω) ≡ S_aout,aout(ω) =
〈|a_out(ω)|²〉, as in PRR 8, Eq. (5) and below, i.e. the spectrum in the frame of the local oscillator (Ωhet = 0). NOTE: this is a single PSD, not a sum of cross-spectral densities. A real heterodyne measurement with the local oscillator detuned by Ωhet records the two sidebands S_aout,aout(Ωhet - ω) + S_aout†,aout†(ω + Ωhet) (PRR 8, Sec. IV): a sum of two PSDs at shifted frequencies, which is not the PSD of any single noise vector at ω. That shift is not applied anywhere in levisim; cavity.Ωhet is currently unused. [1/√Hz]
- homodyne_and_heterodyne_noise_vectors(method, ω)[source]¶
Returns both homodyne and heterodyne noise vectors (in order to only call output_light_noise_vectors once)
Identical to (homodyne_noise_vector, heterodyne_noise_vector). [1/√Hz, 1/√Hz]
- noise_vector_to_power_spectrum(noise_vector)[source]¶
Convert a noise vector into its power spectrum
- noise_vectors_to_cross_spectrum(noise_vector_A, noise_vector_B)[source]¶
Convert two noise vectors into their cross spectrum
- homodyne_spectrum(method)[source]¶
Calculates homodyne spectrum of output light from the cavity, S_hh
h = a_out·exp(iθ) + a_out†·exp(-iθ) = A_out·cos(θ) + P_out·sin(θ)
θ = homodyne angle (see homodyne_quadrature)
- heterodyne_spectrum(method)[source]¶
Calculates the heterodyne spectrum of output light from the cavity, S_het
S_het(ω) = S_aout,aout(ω) = 〈|a_out(ω)|²〉(see heterodyne_noise_vector)
- homodyne_and_heterodyne_spectra(method)[source]¶
Calculates the homodyne and heterodyne spectra of output light from the cavity together
S_hom(ω) = 〈|h(ω)|²〉, S_het(ω) = 〈|a_out(ω)|²〉(see homodyne_noise_vector and heterodyne_noise_vector)
- all_position_power_spectra(method, zpf_scaled=True)[source]¶
Invert the derangement matrix D to get the hybridisation matrix H This solves for the multi-dimensional hybridised position vector, x in terms of the 1D noise vectors, x1D
D @ x = x1D H ≡ D⁻¹ x = H @ x1D