Stabilizers
Numba-accelerated helpers for generating X-string data on a truncated support and evaluating stabilizer Rényi quantities.
A typical workflow is:
Use
edlgt.tools.stabilizers.extract_support()to truncate a symmetry-sector state to its dominant configurations.Build
stridesfromloc_dimswithedlgt.tools.config_encoding.compute_strides().Generate pairwise X-string keys from the support and deduplicate them.
Evaluate the stabilizer Rényi-2 sum on the truncated support.
Stabilizer-support helpers built on mixed-radix encoded configurations.
- edlgt.tools.stabilizers.decode_Xstrings(xp_keys, loc_dims)
Decode encoded X-string keys into per-site shift vectors.
- edlgt.tools.stabilizers.extract_support(psi, loc_dims, sector_configs, prob_threshold=0.01, sort_for_encoding=True)[source]
Extract the dominant sector-basis support used by stabilizer routines.
- Parameters:
psi (
numpy.ndarray) – State coefficients in the symmetry-sector basis.loc_dims (
numpy.ndarray) – Local Hilbert-space dimensions, one per site.sector_configs (
numpy.ndarray) – Basis configurations corresponding topsi.prob_threshold (
float, optional) – Allowed discarded probability mass.sort_for_encoding (
bool, optional) – IfTrue, sort the support according to the mixed-radix encoding used by the stabilizer kernels.
- Returns:
(support_indices, support_coeffs, support_configs, support_keys, discarded_weight)describing the retained support.- Return type:
- edlgt.tools.stabilizers.unique_sorted_int64(arr_sorted)[source]
Return unique values from a sorted int64 array.