Stabilizers

Numba-accelerated helpers for generating X-string data on a truncated support and evaluating stabilizer Rényi quantities.

A typical workflow is:

  1. Use edlgt.tools.stabilizers.extract_support() to truncate a symmetry-sector state to its dominant configurations.

  2. Build strides from loc_dims with edlgt.tools.config_encoding.compute_strides().

  3. Generate pairwise X-string keys from the support and deduplicate them.

  4. 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 to psi.

  • prob_threshold (float, optional) – Allowed discarded probability mass.

  • sort_for_encoding (bool, optional) – If True, 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:

tuple

edlgt.tools.stabilizers.unique_sorted_int64(arr_sorted)[source]

Return unique values from a sorted int64 array.

edlgt.tools.stabilizers.all_pairwise_pkeys_support(support_configs, loc_dims, strides)[source]

Generate encoded X-string keys induced by all ordered support pairs.

edlgt.tools.stabilizers.stabilizer_renyi_sum(pkeys_uniq, support_configs, support_coeffs, support_keys, loc_dims, strides)[source]

Compute the stabilizer Renyi-2 sum on a truncated support.