Partitions

Helpers to split symmetry-sector configuration tables into subsystem and environment parts and build the cached metadata used by entanglement routines.

Partition-building helpers for subsystem/environment factorizations.

edlgt.entanglement.partitions.exclude_columns(data_matrix, exclude_indices)[source]

Return a copy of a matrix with selected columns removed.

edlgt.entanglement.partitions.subenv_map_to_unique_indices(subsystem_configs, environment_configs, unique_subsys_configs, unique_env_configs)[source]

Map subsystem/environment rows to indices in their unique lookup tables.

edlgt.entanglement.partitions.unique_configs_with_inverse(configs, loc_dims)[source]

Get unique rows and inverse map, preferring packed-key uniqueness.

edlgt.entanglement.partitions.can_encode_partition_configs(loc_dims)[source]

Check whether a partition mixed-radix encoding fits in signed int64.

edlgt.entanglement.partitions.build_partition_metadata(sector_configs, loc_dims, keep_indices, env_indices)[source]

Build the cached partition metadata for a symmetry-sector basis.