fastdla.lie_closure

fastdla.lie_closure(generators, *, keep_original=False, max_dim=None, **kwargs)

Compute the Lie closure of given generators.

Lie closure generation follows the orthonormalization algorithm in arXiv:2506.01120:

V = []
for g in G:
    g_perp = orthogonalize(g, V)
    if g_perp != 0:
        V.append(g_perp / norm(g_perp))

l = 1
r = 0
while l < len(V):
    for m in range(r):
        h = commutator(V[l], V[m])
        h_perp = orthogonalize(h, V)
        if h_perp != 0:
            V.append(h_perp / norm(h_perp))

    r += 1
    if r == l:
        l += 1
        r = 0

If keep_original is True, there will be an additional list B which stores the actual nested commutators h. The function then returns both B and V.

The inputs to this function can be given in the matrix or SparsePauliSum representations. If matrices are given, JAX-based implementation will be called.

Parameters:
  • generators (Any) – Lie algebra elements to compute the closure from.

  • keep_original (bool) – Whether the returned array of Lie algebra elements should contain the original (normalized) generators and their actual nested commutators. If False, the orthonormalized basis used internally in the algorithm is returned.

  • max_dim (Optional[int]) – Cutoff for the dimension of the Lie closure. If set, the algorithm may be halted before a full closure is obtained.

Return type:

tuple[Sequence[Any], Sequence[Any]] | Sequence[Any]

Returns:

A list of linearly independent nested commutators and the orthonormal basis if keep_original=True, otherwise only the orthonormal basis.