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 that spans the algebra 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)]
Derivation
The center \(\mathfrak{\xi}(\mathfrak{g})\) of an algebra \(\mathfrak{g}\) can be computed in the following steps. First, compute the
structure_constants()
, or adjoint representation, of the algebra with respect to some basis \(\mathbb{B}\) of \(\mathfrak{g}\). The center of \(\mathfrak{g}\) is then given by\[\mathfrak{\xi}(\mathfrak{g}) = \operatorname{span}\left\{\bigcap_{x\in\mathbb{B}} \operatorname{ker}(\operatorname{ad}_x)\right\},\]i.e., the intersection of the kernels, or null spaces, of all basis elements in the adjoint representation.
The kernel can be computed with
scipy.linalg.null_space
, and vector space intersections are computed recursively from pairwise intersections. The intersection between two vectors spaces \(V_1\) and \(V_2\) given by (orthonormal) bases \(\mathbb{B}_i\) can be computed from the kernel of the matrix that has all basis vectors from \(\mathbb{B}_1\) and \(\mathbb{B}_2\) as columns, i.e., \(\operatorname{ker}(\left[\ \mathbb{B}_1 \  \mathbb{B}_2\ \right])\). For an (orthonormal) basis of this kernel, consisting of two stacked column vectors \(u^{(i)}_1\) and \(u^{(i)}_2\) for each basis, a basis of the intersection space \(V_1 \cap V_2\) is given by \(\{\mathbb{B}_1 u_1^{(i)}\}_i\) (or equivalently by \(\{\mathbb{B}_2 u_2^{(i)}\}_i\)). Also see this post for details.If the input consists of
PauliWord
instances only, we can instead compute pairwise commutators and know that the center consists solely of basis elements that commute with all other basis elements. This can be seen in the following way.Assume that the center elements identified based on the basis have been removed already and we are left with a basis \(\mathbb{B}=\{p_i\}_i\) of Pauli words such that \(\forall i\ \exists j:\ [p_i, p_j] \neq 0\). Assume that there is another center element \(x\neq 0\), which was missed before because it is a linear combination of Pauli words:
\[\forall j: \ [x, p_j] = [\sum_i x_i p_i, p_j] = 0.\]As products of Paulis are unique when fixing one of the factors (\(p_j\) is fixed above), we then know that
\[\begin{split}&\forall j: \ 0 = \sum_i x_i [p_i, p_j] = 2 \sum_i x_i \chi_{i,j} p_ip_j\\ \Rightarrow &\forall i,j \text{ s.t. } \chi_{i,j}\neq 0: x_i = 0,\end{split}\]where \(\chi_{i,j}\) denotes an indicator that is \(0\) if the commutator \([p_i, p_j]\) vanishes and \(1\) otherwise. However, we know that for each \(i\) there is at least one \(j\) such that \(\chi_{i,j}\neq 0\). This means that \(x_i = 0\) is guaranteed for all \(i\) by at least one \(j\). Therefore \(x=0\), which is a contradiction to our initial assumption that \(x\neq 0\).