qml.center¶
- center(g, pauli=False)[source]¶
A function to compute the center of a Lie algebra.
Given a Lie algebra g={h1,..,hd}, the center ξ(g) is given by all elements in g that commute with all other elements in g,
ξ(g):={h∈g|[h,hi]=0 ∀hi∈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
The center of the Lie algebra
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
. First 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 ξ(g) of an algebra g can be computed in the following steps. First, compute the
structure_constants()
, or adjoint representation, of the algebra with respect to some basis B of g. The center of g is then given byξ(g)=span{⋂x∈Bker(adx)},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 V1 and V2 given by (orthonormal) bases Bi can be computed from the kernel of the matrix that has all basis vectors from B1 and −B2 as columns, i.e., ker([ B1 |−B2 ]). 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 V1∩V2 is given by {B1u(i)1}i (or equivalently by {B2u(i)2}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 B={pi}i of Pauli words such that ∀i ∃j: [pi,pj]≠0. Assume that there is another center element x≠0, which was missed before because it is a linear combination of Pauli words:
∀j: [x,pj]=[∑ixipi,pj]=0.As products of Paulis are unique when fixing one of the factors (pj is fixed above), we then know that
∀j: 0=∑ixi[pi,pj]=2∑ixiχi,jpipj⇒∀i,j s.t. χi,j≠0:xi=0,where χi,j denotes an indicator that is 0 if the commutator [pi,pj] vanishes and 1 otherwise. However, we know that for each i there is at least one j such that χi,j≠0. This means that xi=0 is guaranteed for all i by at least one j. Therefore x=0, which is a contradiction to our initial assumption that x≠0.