The pump module¶
Pump optimisation module.
-
netsalt.pump.
compute_pump_overlapping_matrix
(graph, modes_df)[source]¶ Compute the matrix of pump overlap with each edge.
-
netsalt.pump.
make_threshold_pump
(graph, lasing_modes_id, modes_df, pump_min_size=None)[source]¶ Create a pump profile using edges with most electric field on a mode to optimise cost.
-
netsalt.pump.
optimize_pump_diff_evolution
(modes_df, graph, lasing_modes_id, pump_min_frac=0.0, maxiter=500, popsize=5, seed=42, n_seeds=24, disp=False)[source]¶ Optimise the pump for lasing a set of modes.
- Parameters
modes_df (dataframe) – modes dataframe
graph (networkx) – quantum raph
lasing_modes_id (list) – list of modes to optimise the pump for lasing first
pump_min_frac (float) – minimum fraction of edges in the pump
maxiter (int) – maximum number of iterations (for scipy.optimize.differential_evolution)
popsize (int) – size of population (for scipy.optimize.differential_evolution)
seed (int) – seed for random number generator
n_seeds (int) – number of run with different seends in parallel
disp (bool) – if True, display the optimisation iterations
- Returns
best pump, overlapping matrix, all costs from seeds
- Return type
optimal_pump, pump_overlapps, costs
-
netsalt.pump.
optimize_pump_linear_programming
(modes_df, graph, lasing_modes_id, eps_min=5.0, eps_max=10, eps_n=10, cost_diff_min=0.0001, plot_debug=False)[source]¶ Optimizes a pump profile using linear programming with regularisation.
- Parameters
modes_df (dataframe) – data with modes
lasing_modes_id (list) – list of mode to optimise
eps_min (float) – minimal value of regularisation (setting 0 may lead to very wrong pumps)
eps_max (float) – maximum value of regularisation (large values are not usually needed)
eps_n (int) – number of regularisations tried with np.linespace(eps_min, eps_max, eps_n).
cost_diff_min (float) – min value of difference in cost below which we discard an edge