qml.center¶
-
center
(g, pauli=False)[source]¶ A function to compute the center of a Lie algebra.
Given a Lie algebra \(\mathfrak{g} = \{h_1,.., h_d\}\), the center \(\mathfrak{\xi}(\mathfrak{g})\) is given by all elements in \(\mathfrak{g}\) that commute with all other elements in \(\mathfrak{g}\),
\[\mathfrak{\xi}(\mathfrak{g}) := \{h \in \mathfrak{g} | [h, h_i]=0 \ \forall h_i \in \mathfrak{g} \}\]- Parameters
g (List[Union[Operator, PauliSentence, PauliWord]]) – List of operators for which to find the center.
pauli (bool) – Indicates whether it is assumed that
PauliSentence
orPauliWord
instances are input and returned. This can help with performance to avoid unnecessary conversions toOperator
and vice versa. Default isFalse
.
- Returns
Center of
g
- Return type
List[Union[Operator, PauliSentence]]
See also
lie_closure()
,structure_constants()
,PauliVSpace
, Demo: Introduction to Dynamical Lie Algebras for quantum practitionersExample
We can compute the center of a DLA
g
. For that, we compute the DLA vialie_closure()
.>>> generators = [qml.X(0), qml.X(0) @ qml.X(1), qml.Y(1)] >>> g = qml.lie_closure(generators)
The
center
is then the collection of operators that commute with all other operators in the DLA. In this case, justX(0)
.>>> qml.center(g) [X(0)]