coupling_filter

mqed.Lindblad.coupling_filter._mask_within_hops(N: int, hop_radius: int, *, include_on_site: bool) numpy.ndarray[source]

Boolean mask for sites within a hop distance on a 1D chain.

Condition: abs(i - j) <= hop_radius. Example: hop_radius=1 keeps nearest neighbours (and on-site when include_on_site=True); hop_radius=2 keeps up to next-nearest neighbours.

mqed.Lindblad.coupling_filter.enforce_coupling_range(V: numpy.ndarray, Gamma: numpy.ndarray, *, V_hop_radius: int | None = None, keep_V_on_site: bool = False, Gamma_rule: str = 'leave', Gamma_hop_radius: int | None = None, keep_Gamma_on_site: bool = True) tuple[numpy.ndarray, numpy.ndarray][source]

Zero out V and Γ beyond a chosen hop range.

Parameters:
  • V – (N, N) coherent coupling matrix.

  • Gamma – (N, N) dissipative coupling matrix.

  • V_hop_radius – If set, keep pairs with abs(i-j) <= V_hop_radius.

  • keep_V_on_site – If False, zero the diagonal of V.

  • Gamma_rule – How to mask Γ (“leave”, “same_as_V”, “diagonal_only”, “limit_by_hops”).

  • Gamma_hop_radius – Hop limit for Γ when Gamma_rule="limit_by_hops".

  • keep_Gamma_on_site – If False, zero the diagonal of Γ where applicable.

Returns:

Filtered, symmetrized copies of V and Γ.

Return type:

tuple[np.ndarray, np.ndarray]