coupling_filter¶
- mqed.Lindblad.coupling_filter._mask_within_hops(N: int, hop_radius: int, *, include_on_site: bool, topology: str) numpy.ndarray[source]¶
Boolean mask for sites within a hop distance on a chain or ring.
Condition:
abs(i - j) <= hop_radius. Example:hop_radius=1keeps nearest neighbours (and on-site wheninclude_on_site=True);hop_radius=2keeps 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, topology: str = 'chain') 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 within this 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.
topology –
"chain"usesabs(i-j);"ring"uses the shorter periodic distancemin(abs(i-j), N-abs(i-j)).
- Returns:
Filtered, symmetrized copies of V and Γ.
- Return type:
tuple[np.ndarray, np.ndarray]