qml.liealg.cartan_decomp

cartan_decomp(g, involution)[source]

Compute the Cartan Decomposition g=km of a Lie algebra g.

Given a Lie algebra g, the Cartan decomposition is a decomposition g=km into orthogonal complements. This is realized by an involution Θ(g) that maps each operator gg back to itself after two consecutive applications, i.e., Θ(Θ(g))=g gg.

The involution argument can be any function that maps the operators in the provided g to a boolean output. True for operators that go into k and False for operators in m. It is assumed that all operators in the input g belong to either k or m.

The resulting subspaces fulfill the Cartan commutation relations

[k,k]k ; [k,m]m ; [m,m]k
Parameters
Returns

Tuple (k, m) containing the even parity subspace Θ(k)=k and the odd parity subspace Θ(m)=m.

Return type

Tuple(List[Union[PauliSentence, Operator]], List[Union[PauliSentence, Operator]])

Example

We first construct a Lie algebra.

>>> from pennylane import X, Z
>>> from pennylane.liealg import concurrence_involution, even_odd_involution, cartan_decomp
>>> generators = [X(0) @ X(1), Z(0), Z(1)]
>>> g = qml.lie_closure(generators)
>>> g
[X(0) @ X(1),
 Z(0),
 Z(1),
 -1.0 * (Y(0) @ X(1)),
 -1.0 * (X(0) @ Y(1)),
 -1.0 * (Y(0) @ Y(1))]

We compute the Cartan decomposition with respect to the concurrence_involution().

>>> k, m = cartan_decomp(g, concurrence_involution)
>>> k, m
([-1.0 * (Y(0) @ X(1)), -1.0 * (X(0) @ Y(1))],
 [X(0) @ X(1), Z(0), Z(1), -1.0 * (Y(0) @ Y(1))])

We can check the validity of the decomposition using check_cartan_decomp().

>>> check_cartan_decomp(k, m)
True

There are other Cartan decomposition induced by other involutions. For example using even_odd_involution().

>>> from pennylane.liealg import check_cartan_decomp
>>> k, m = cartan_decomp(g, even_odd_involution)
>>> k, m
([Z(0), Z(1)],
 [X(0) @ X(1),
  -1.0 * (Y(0) @ X(1)),
  -1.0 * (X(0) @ Y(1)),
  -1.0 * (Y(0) @ Y(1))])
>>> check_cartan_decomp(k, m)
True