qml.labs.dla.cartan_decomp¶
- cartan_decomp(g, involution)[source]¶
Cartan Decomposition \(\mathfrak{g} = \mathfrak{k} \oplus \mathfrak{m}\).
Given a Lie algebra \(\mathfrak{g}\), the Cartan decomposition is a decomposition \(\mathfrak{g} = \mathfrak{k} \oplus \mathfrak{m}\) into orthogonal complements. This is realized by an involution \(\Theta(g)\) that maps each operator \(g \in \mathfrak{g}\) back to itself after two consecutive applications, i.e., \(\Theta(\Theta(g)) = g \ \forall g \in \mathfrak{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 \(\mathfrak{k}\) andFalse
for operators in \(\mathfrak{m}\).The resulting subspaces fulfill the Cartan commutation relations
\[[\mathfrak{k}, \mathfrak{k}] \subseteq \mathfrak{k} \text{ ; } [\mathfrak{k}, \mathfrak{m}] \subseteq \mathfrak{m} \text{ ; } [\mathfrak{m}, \mathfrak{m}] \subseteq \mathfrak{k}\]- Parameters
g (List[Union[PauliSentence, Operator]]) – the (dynamical) Lie algebra to decompose
involution (callable) – Involution function \(\Theta(\cdot)\) 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 \(\Theta(\mathfrak{k}) = \mathfrak{k}\) and the odd parity subspace \(\Theta(\mathfrak{m}) = -\mathfrak{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.labs.dla 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.labs.dla 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