jmaglione@math.uni-bielefeld.de
Universität Bielefeld
Began in 2015 and is still evolving.
Joint with Pete Brooksbank and James Wilson.
Funded in part by NSF: DMS-1620454.
TensorSpace refers to a collection of Magma packages:
Goal: Want flexible definition for tensors.
Questions: Is a tensor more than just...
How do the questions we want to answer motivate a data structure?
1. b bilinear form of V. Interpret:
⟨b∣:V×V↣K
3. V an A-module. Interpret:
⟨μ∣:V×A↣V
2. ψ an entangled system of qubits. Interpret:
⟨ψ∣:C2×⋯×C2↣C
We require tensors to have three things:
1. frame: (U0,…,Un),
2. function: Un×⋯×U1↣U0,
3. category*.
*We do not specify now, but we will come back to this.
A "default" category is assigned when not given.
We construct the tensor
t:M2(Q)×M2(Q)(A,B)↣M2(Q),↦AB
We have two structures we define:
Q := Rationals();
A := MatrixAlgebra(Q, 2); // 2 x 2 matrices over Q
frame := [A, A, A];
frame;
[
Full Matrix Algebra of degree 2 over Rational Field,
Full Matrix Algebra of degree 2 over Rational Field,
Full Matrix Algebra of degree 2 over Rational Field
]
First we define our frame.
Require a function to map a tuple of matrices to their product.
mult := func< x | x[1]*x[2] >; // <A, B> |-> A*B
t := Tensor(frame, mult);
t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 4 over Rational Field
U1 : Full Vector space of degree 4 over Rational Field
U0 : Full Vector space of degree 4 over Rational Field
Let's do a brief sanity check, and verify t does what we expect.
X := A![2, 2/5, 0, -1]; // define matrices
Y := A![0, -3, 5, 7]; // from sequences
X, Y;
[ 2 2/5]
[ 0 -1]
[ 0 -3]
[ 5 7]
X*Y, <X, Y> @ t;
[ 2 -16/5]
[ -5 -7]
( 2 -16/5 -5 -7)
Recall, the print statement for t: no matrix algebras
t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 4 over Rational Field
U1 : Full Vector space of degree 4 over Rational Field
U0 : Full Vector space of degree 4 over Rational Field
It states vector spaces, but we gave it matrices: X and Y.
The frame gives context, so that we leave the typing to the machines.
<X, [0, -3, 5, 7]> @ t;
<0, [1, 1, 1, 1]> @ t;
( 2 -16/5 -5 -7)
(0 0 0 0)
We define a tensor of the form
⟨t∣:Kdn×⋯×Kd1↣Kd0
by d0⋯dn elements in K: a (dn×⋯×d0)-grid
[tin⋯i1i0].
Notational challenge to do this for general n. We do n=2:
(u,v)↦(i=1∑d2j=1∑d1uitij1vj,…,i=1∑d2j=1∑d1uitijd0vj)∈Kd0.
Let's construct an example.
d := [3, 2, 5, 4]; // dimensions of frame
grid := [1..3*2*5*4]; // ints 1, ..., 120
t := Tensor(Q, d, grid);
t;
Tensor of valence 4, U3 x U2 x U1 >-> U0
U3 : Full Vector space of degree 3 over Rational Field
U2 : Full Vector space of degree 2 over Rational Field
U1 : Full Vector space of degree 5 over Rational Field
U0 : Full Vector space of degree 4 over Rational Field
We verify that the structure constants of t are what we expect.
StructureConstants(t)[1..10]; // Only first 10 entries
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
Notice: structure constants are a flat sequence.
The grid model provides easier understanding of data manipulation.
We describe 2 operations that potentially change the frame.
Recall, our current tensor has the frame:
⟨t∣:Q3×Q2×Q5→Q4
We grab any entry of the grid [tin⋯i1i0] and consider the corresponding sub-grid.
This can be interpreted as a tensor itself.
We query for the t3,2,54 constant:
ind := [{3}, {2}, {5}, {4}]; // last entry
Slice(t, ind);
[ 120 ]
We can query any sequence of indices.
indices := [{1, 3}, {2}, {1, 3, 4}, {4}]; // 2*1*3*1 entries
Slice(t, indices);
[ 24, 32, 36, 104, 112, 116 ]
The above example can be interpreted as a new tensor
⟨s∣:Q2×Q×Q3↣Q.
So it might be helpful to interpret the output as a matrix.
SliceAsMatrices(t, indices, 3, 1);
[
[ 24 32 36]
[104 112 116]
]
We apply permutations to the frame. Suppose we are framed by vector spaces
⟨t∣:Un×⋯×U1↣U0.
For a permutation σ of {0,…,n}, a σ-shuffle of t is a tensor
⟨σ(t)∣:Uσ(n)×⋯×Uσ(1)↣Uσ(0).
Note: shuffling requires dual-spaces. TensorSpace handles this.
We continue with current example:
⟨t∣:Q3×Q2×Q5↣Q4.
We apply the permutation σ=(0,2,3,1).
sigma := [2, 0, 3, 1]; // cycle: (0, 2, 3, 1)
s := Shuffle(t, sigma);
s;
Tensor of valence 4, U3 x U2 x U1 >-> U0
U3 : Full Vector space of degree 5 over Rational Field
U2 : Full Vector space of degree 3 over Rational Field
U1 : Full Vector space of degree 4 over Rational Field
U0 : Full Vector space of degree 2 over Rational Field
We can take a look at the structure constants.
StructureConstants(s)[1..10]; // first 10 entries
[ 1, 3, 5, 7, 25, 27, 29, 31, 49, 51 ]
Recall: the structure constants were [1,…,120].
These definitions work in greater generality, but fix a K-bilinear map
⟨t∣:U×V↣W.
Set Ω=End(U)×End(V)×End(W). Our algebras are subsets of Ω.
The first algebra we define is the centroid, and the second is the derivation algebra.
CtDt={(X,Y,Z)∈Ω∣∀u,v,⟨t∣Xu,v⟩=⟨t∣u,Yv⟩=Z⟨t∣u,v⟩}={(X,Y,Z)∈Ω∣∀u,v,⟨t∣Xu,v⟩+⟨t∣u,Yv⟩=Z⟨t∣u,v⟩}
Fact. Ct is a K-algebra with 1, and Dt is a Lie algebra.
The Greenberger-Horne-Zeilinger (GHZ) state is
2⋅GHZ=∣000⟩+∣111⟩≡(e1⊗e1⊗e1)+(e2⊗e2⊗e2)≡[(1,0)(0,0)(0,0)(0,1)].
The W state is
3⋅W=∣001⟩+∣010⟩+∣100⟩≡(e1⊗e1⊗e2)+(e1⊗e2⊗e1)+(e2⊗e1⊗e1)≡[(0,1)(1,0)(1,0)(0,0)].
Both states are (2×2×2)-grids. We interpret these states as
⟨GHZ∣⟨W∣:C2×C2↣C2,:C2×C2↣C2
(Typically interpreted as C2×C2×C2↣C.)
Question: GHZ and W are contained in the same space. Maybe there is a change of basis (of each C2) that makes GHZ and W equivalent?
(There isn't!)
Let's construct the tensors (over Q).
Q := Rationals();
d := [2, 2, 2]; // dimensions of frame
GHZ := Tensor(Q, d, [1, 0, 0, 0, 0, 0, 0, 1]);
W := Tensor(Q, d, [0, 1, 1, 0, 1, 0, 0, 0]);
Quick sanity check.
AsMatrices(GHZ, 2, 1);
[
[1 0]
[0 0],
[0 0]
[0 1]
]
Now we compute their centroids.
C_GHZ := Centroid(GHZ);
C_W := Centroid(W);
C_GHZ, C_W;
Matrix Algebra of degree 6 with 2 generators over Rational Field
Matrix Algebra of degree 6 with 2 generators over Rational Field
[
[1 0 0 0 0 0]
[0 1 0 0 0 0]
[0 0 1 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 1 0]
[0 0 0 0 0 1],
[0 1 0 0 0 0]
[0 0 0 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 0 0]
[0 0 0 0 0 0]
[0 0 0 0 1 0]
]
Basis(C_W);
Let's play around with CW.
M := C_W.1 + C_W.2; // an element of the ring
M;
[1 1 0 0 0 0]
[0 1 0 0 0 0]
[0 0 1 1 0 0]
[0 0 0 1 0 0]
[0 0 0 0 1 0]
[0 0 0 0 1 1]
We can get the individual blocks.
X := M @ Induce(C_W, 2); // build map
Y := M @ Induce(C_W, 1); // for each
Z := M @ Induce(C_W, 0); // coordinate
Z;
[1 0]
[1 1]
Build two vectors from our 2-dimensional vector space
V := VectorSpace(Q, 2);
u := V![-1, 22/7];
v := V![1/2, 4/27];
u, v;
( -1 22/7)
( 1/2 4/27)
<u*X, v> @ W eq <u, v*Y> @ W; // 1st eqn
<u, v*Y> @ W eq (<u, v> @ W)*Z; // 2nd eqn
true
true
We distinguish W and GHZ by the nilpotent elements of their centroids.
J_GHZ := JacobsonRadical(C_GHZ);
J_W := JacobsonRadical(C_W);
Dimension(J_GHZ), Dimension(J_W);
Because the dimension of J(GHZ) is different from J(W) these states are inequivalent.
With a little work, one shows that
CGHZ≅C2,CW≅C[x]/(x2).
0 1
Oh, and just by wiggling your pinky...
The derivation algebras bring their differences to the surface.
D_GHZ := DerivationAlgebra(GHZ);
D_W := DerivationAlgebra(W);
Dimension(D_GHZ), Dimension(D_W);
dimC(DGHZ)=4=5=dimC(DW).
4 5
Because the dimensions of the derivation algebras are different, GHZ and W states are inequivalent.
The equation ⟨t∣Xu,v⟩=⟨t∣u,Yv⟩ becomes
XT∗∗(k)−T∗∗(k)Y=0,where T∗∗(k) is the kth slice in the 0-coordinate as a matrix:
T∗∗(k)=t11kt21k⋮t12kt22k⋮⋯⋯⋱The equation ⟨t∣Xu,v⟩=Z⟨t∣u,v⟩ becomes
XT∗j∗−T∗j∗Z=0,where T∗j∗ is the jth slice in the 1-coordinate as a matrix:
T∗j∗=t1j1t2j1⋮t1j2t2j2⋮⋯⋯⋱
These algorithms are part of a general family of Sylvester-like equations:
XA+BY=C.We need to solve a simultaneous system of Sylvester-like equations.
Naively, this requires O(d7) field operations for a (d×d×d)-grid.
In general, construct a basis of the kernel of a
(d0⋯dn)×(d02+⋯+dn2)-matrix.
Tensor spaces are the spaces containing tensors. Therefore, defined similarly to tensors.
A tensor space T is a K-vector space with
1. a frame (U0,…,Un),
2. an interpreter map ⟨⋅∣:T→(Un×⋯×U1↣U0),
3. a category,
4. a basis.
The map ⟨⋅∣ gives every t∈T a multilinear map interpretation
⟨t∣:Un×⋯×U1↣U0.
Equivalence up to a change of bases. The states GHZ and W are inequivalent.
For all X,Y,Z∈GL2(C), there exists u,v∈C2 such that
Z⟨GHZ∣Xu,Yv⟩=⟨W∣u,v⟩.
Equivalence of algebras: an isomorphism.
There exists φ∈GL(A) such that for all a,b∈A
φ(ab)=φ(a)φ(b).
Adjoint operators of a bilinear form ⟨,⟩.
For u,v∈V, and A∈GL(V),
⟨Au,v⟩=⟨u,A∗v⟩.
For us a tensor category is
1. a function A:[n]→{−1,0,1},
2. a partition of [n].
The function A tells us which way the arrows go: ↓, ∥, or ↑.
The partition tells us which coordinates are treated as equal.
Let's look at a tensor created earlier: the multiplication in an algebra
⟨t∣:M2(Q)×M2(Q)↣M2(Q).
A := MatrixAlgebra(Q, 2);
t := Tensor(A);
TensorCategory(t);
Tensor category of valence 3 (->,->,->) ({ 0, 1, 2 })
Let's look at an example as a high-dimensional grid.
t := Tensor(GF(2), [2, 3, 2, 3], [1..36]);
t;
Tensor of valence 4, U3 x U2 x U1 >-> U0
U3 : Full Vector space of degree 2 over GF(2)
U2 : Full Vector space of degree 3 over GF(2)
U1 : Full Vector space of degree 2 over GF(2)
U0 : Full Vector space of degree 3 over GF(2)
The default tensor category is given.
TensorCategory(t); // default category
Tensor category of valence 4 (->,->,->,->) ({ 1 },{ 2 },{ 0 },{ 3 })
The GHZ and W-state are not equivalent because derivations were not isomorphic.
For these kinds of questions, we consider spaces of all tensors sharing common operators.
Recall the derivation algebra of t∈T,
Dt={(X,Y,Z)∈Ω∣∀u,v,⟨t∣Xu,v⟩+⟨t∣u,Yv⟩=Z⟨t∣u,v⟩}
For t∈T, the densor subsapce of t is the tensor subspace
Dens(t)={s∈T∣Dt⊆Ds}.
Lie algebra of 3×3 trace zero matrices over a field K, denoted sl3.
The tensor given by the matrix commutator is the following.
K := GF(7);
sl3 := LieAlgebra("A2", K);
t := Tensor(sl3);
t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 8 over GF(7)
U1 : Full Vector space of degree 8 over GF(7)
U0 : Full Vector space of degree 8 over GF(7)
Note the tensor category.
TensorCategory(t);
Tensor category of valence 3 (->,->,->) ({ 0, 1, 2 })
Each operator acts the same on each of the three coordinates.
From standard results, Dt≅sl3.
D := DerivationAlgebra(t);
Dimension(D);
8
The densor subspace of t is computed using Densor.
Dens := UniversalDensorSubspace(t);
Dens;
Tensor space of dimension 2 over GF(7) with valence 3
U2 : Full Vector space of degree 8 over GF(7)
U1 : Full Vector space of degree 8 over GF(7)
U0 : Full Vector space of degree 8 over GF(7)
The dimension of the densor subspace is tiny compared to the ambient space.
T := Parent(t); // full tensor space of t
Dimension(T), Dimension(Dens);
512 2
What just happened?
The tensor space T framed by (K12,K8,K6) contains
⟨t∣:M3×4×M4×2↣M3×2.t := MatrixTensor(Q, [3, 4, 2]);
t;
Tensor of valence 3, U2 x U1 >-> U0
U2 : Full Vector space of degree 12 over Rational Field
U1 : Full Vector space of degree 8 over Rational Field
U0 : Full Vector space of degree 6 over Rational Field
The derivation algebra of t is large because matrix multiplication is distributive.
Recall the derivation equation:
⟨t∣Xu,v⟩+⟨t∣u,Yv⟩=Z⟨t∣u,v⟩
If X∈M3×3, then we re-interpret
(XU)∗V+U∗(0V)=X(U∗V).
Similar equations hold for Y∈M4×4 and Z∈M2×2.
Therefore, M3×3∪M4×4∪M2×2⊆Dt.
We denote the algebra Mn×n with the matrix commutator by gln.
Fact. Dt≅(gl3⊕gl4⊕gl2)/K.
D := DerivationAlgebra(t);
Dimension(D) eq (3^2 + 4^2 + 2^2 - 1); // compare dimensions
We can easily verify that the dimensions match.
true
Dens := UniversalDensorSubspace(t);
Dens;
Tensor space of dimension 1 over Rational Field with valence 3
U2 : Full Vector space of degree 12 over Rational Field
U1 : Full Vector space of degree 8 over Rational Field
U0 : Full Vector space of degree 6 over Rational Field
With derivaton algebra so large, the densor subspace must be small.
Therefore, in a 576-dimensional space, T, matrix multiplication is set apart from the rest.
As a consequence, the symmetries of t are completely determined by its derivations.
Recall, we consider Sylvester-like systems of the form:
XT∗∗(k)+T∗∗(k)Y=0
The same system is used to get the densor subspace$-$the roles are swapped.
We are given the derivation algebra, so we slice a symbolic tensor.
Simultaneously solve a "dual" version of the Sylvester-like equations.
Theorem. (Brooksbank-M.-Wilson)
There exists an algorithm to simultaneously solve a "dual" Sylvester-like system using O(d9m2) field operations, given m operators acting on a (d×d×d)-grid.