levisim.multiphysics.multitrap.hybridisation_mixin

Hybridisation methods of MultiTrap: NUMERICAL_HYBRIDISATION and POWER_SERIES_HYBRIDISATION (methods 4-5 of QuantumLinearTheoryMethod)

Both solve for the hybridised positions x from the one-dimensional solutions x1D through the derangement matrix, x = R·x + x1D, D·x = x1D, D = I - R. They differ only in how D⁻¹ is obtained: NUMERICAL_HYBRIDISATION inverts the (N×N) matrix D at each frequency, POWER_SERIES_HYBRIDISATION evaluates D⁻¹ = adj(D)/det(D) from the power series of deranged cycles and path-cycles (levisim.multiphysics.hybridisation), loaded from a pickle or generated at construction.

levisim.multiphysics.multitrap.hybridisation_mixin.find_power_series_file(filename, power_series_dir=None)[source]

The path of a power-series pickle, looked for in order in power_series_dir, in $LEVISIM_POWER_SERIES_DIR, and in the folder shipped with levisim (POWER_SERIES_DATA_DIR)

Raises FileNotFoundError naming every folder tried, and how to generate the file.

class levisim.multiphysics.multitrap.hybridisation_mixin.HybridisationMixin[source]

Bases: object

Derangement matrix D = I - R, the hybridisation functions Rjk, and D⁻¹ numerically or from the power series of its determinant and adjugate (methods 4-5)

A mixin for levisim.multiphysics.multitrap.MultiTrap: it reads the dimensions, cavity and labels set up by MultiTrapBase.

setup_hybridisation(**kwargs)[source]

Sets up the hybridisation functions and, if asked for, the power series of the deranged determinant and adjugate

Keyword arguments (from MultiTrap):

  • max_order: highest order of the power series (default and maximum 9, and at most the number of dimensions)

  • evaluation_order: order at which the power series is evaluated (default max_order)

  • load_in_power_series: load the power series found by find_power_series_file (power_series_dir=, then $LEVISIM_POWER_SERIES_DIR, then the shipped POWER_SERIES_DATA_DIR)

  • generate_power_series: generate the power series symbolically (slow above 6 dimensions)

  • compare_Rjk_calculations: check each hybridisation function against its alternative forms

x1D_noise_vector(ω)[source]

Column vector of the 1D solutions to the QLT equations of motion for each dimension, as a noise vector

derangement_matrix(ω)[source]

The matrix that transforms x to x1D

x = R @ x + x1D
D @ x = x1D
D = I - R

Invert it to solve the fully hybridised position vector using the 1D noise vectors

x = D⁻¹ @ x1D
deranged_determinant(ω)[source]

The value of the deranged determinant at a given frequency

deranged_adjugate_matrix_entry(ij, ω)[source]

The value of given adjugate entry of the derangement matrix at a given frequency

hybridisation_function_values(ω)[source]

All N² - N hybridisation functions at a given frequency, as {(label_jn, label_km): Rjk}

NOTE: the power series evaluate the same N² - N functions in every one of their terms (n!·n factors for the determinant of order n), so they are computed once per frequency here and looked up by hybridisation_term_value. Each value comes from the same hybridisation_function_value call as before, so the sums are bit-identical. [complex ·]

hybridisation_term_value(term, ω, R_values=None)[source]

The value of a hybridisation term (a signed product of hybridisation functions) at a given frequency

R_values is an optional table from hybridisation_function_values(ω); without it each hybridisation function is evaluated directly. [complex ·]

hybridisation_function_value(label_jn, label_km, ω)[source]

The hybridisation function Rjn,km(ω): the response of dimension jn to dimension km, via the cavity (on- and off-bead) and the mech-mech coupling gjk (on-bead only) [complex ·]

hybridisation_matrix(method, ω)[source]

The matrix that transforms the column vector of 1D position operators (as noise vectors) to the column vector of fully hybridised position operators (as noise vectors) i.e. the inverse of the derangement matrix

x = D⁻¹ @ x1D
via
x = R @ x + x1D
D @ x = x1D
D = I - R
hybridisation_hybridised_positions(method, ω)[source]

All hybridised position noise vectors x = D⁻¹·x1D, with D⁻¹ from hybridisation_matrix

Used by NUMERICAL_HYBRIDISATION and POWER_SERIES_HYBRIDISATION. Rows are ordered as self.labels.

power_series_position_noise_vector(label, ω)[source]

The noise vector of one hybridised position from the power series, x = adj(D)/det(D)·x1D

Only the row of the adjugate for label is evaluated, rather than the whole matrix.