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 or PauliWord instances are input and returned. This can help with performance to avoid unnecessary conversions to Operator and vice versa. Default is False.

Returns

Center of g

Return type

List[Union[Operator, PauliSentence]]

Example

We can compute the center of a DLA g. For that, we compute the DLA via lie_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, just X(0).

>>> qml.center(g)
[X(0)]