qml.liealg.cartan_decomp¶
- cartan_decomp(g, involution)[source]¶
Compute the Cartan Decomposition g=k⊕m of a Lie algebra g.
Given a Lie algebra g, the Cartan decomposition is a decomposition g=k⊕m into orthogonal complements. This is realized by an involution Θ(g) that maps each operator g∈g back to itself after two consecutive applications, i.e., Θ(Θ(g))=g ∀g∈g.
The
involution
argument can be any function that maps the operators in the providedg
to a boolean output.True
for operators that go into k andFalse
for operators in m. It is assumed that all operators in the inputg
belong to either k or m.The resulting subspaces fulfill the Cartan commutation relations
[k,k]⊆k ; [k,m]⊆m ; [m,m]⊆k- Parameters
g (List[Union[PauliSentence, Operator]]) – the (dynamical) Lie algebra to decompose.
involution (callable) – Involution function Θ(⋅) to act on the input operator, should return
0/1
orFalse/True
. E.g.,even_odd_involution()
orconcurrence_involution()
.
- 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