Almost Commutative Kronecker Product

Introduction

Tensor product and Kronecker product are very important in quantum mechanics. It also have practical physical meanings for quantum processes. One of the interesting properties of Kronecker product is that it is “almost commutative”.

In this blog post, I would like to informally discuss the “almost commutative” property for Kronecker product.

Outer Product

Given two vectors u={u0,u1,,um1} and v={v0,v1,,vn1}, the outer product of u and v, denoted as uv, is defined as

uv=[u0v0u0v1u0vn1u1v0u1v1u1vn1um1v0um1v1um1vn1]

Using index notation,

(uv)i,j=uivj

If u and v are column vectors, i.e., u=[u0,u1,,um1] and v=[v0,v1,,vn1], the outer product could also be simply expressed using matrix multiplication.

uv=uv

The mapping of outer product could be described as

:Cm×CnCm×n

Tensor Product

Tensor product is essentially an general case of one dimensional array outer product. It is the outer product of two tensors, namely multidimensional tensors, that could have different dimensionality.

If A is a k dimensional tensor, ACi=0k1mi and B is a k dimensional tensor, BCi=0k1ni, the tensor product AB is a k+k dimensional tensor that would have shape ABCi=0k1mii=0k1ni.

Kronecker Product

The outer product and Kronecker product are closely related. In fact the same symbol is commonly used to denote both operations.

If u and v are column vectors, i.e., u=[u0,u1,,um1] and v=[v0,v1,,vn1], the Kronecker product could also be expressed as follows.

uKronv=[u0vu1vum1v]=[u0v0u0v1u0vn1um1v0um1v1um1vn1]

Note that there is an implicit dimensional reduction process in the above expression.

The mapping of outer product could be described as

:Cm×1×Cn×1Cmn×1

More concretely, let ACm×m and BCn×n. Then the Kronecker product of A and B is defined as the matrix

AKronB=[A0,0BA0,1BA0,m1BA1,0BA1,1BA1,m1BAm1,0BAm1,1BAm1,m1B]

Almost Commutative

Kronecker product is not commutative, i.e., usually ABBA. However, Kronecker product is almost commutative with some row and column exchanges in some dimensions. We define this as ABBA.

Suppose we have ACm×m and BCn×n, we have

AB=[A0,0BA0,1BA0,m1BA1,0BA1,1BA1,m1BAm1,0BAm1,1BAm1,m1B]=[A0,0[B:,0B:,1B:,n1]A0,1[B:,0B:,1B:,n1]A0,m1[B:,0B:,1B:,n1]A1,0[B:,0B:,1B:,n1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,:[B0,nB1,nBn1,n1]Am1,:]=[[B0,0B0,1B0,n1]A0,:[B1,0B1,1B1,n1]A0,:[Bn1,0Bn1,1Bn1,n1]A0,:[B0,0B0,1B0,n1]A1,:[B1,0B1,1B1,n1]A1,:[Bn1,0Bn1,1Bn1,n1]A1,:[B0,0B0,1B0,n1]Am1,:[B1,0B1,1B1,n1]Am1,:[Bn1,0Bn1,1Bn1,n1]Am1,:]

We further rearrange the rows of AB, we have

AB[[B0,0B0,1B0,n1]A0,:[B1,0B1,1B1,n1]A0,:[Bn1,0Bn1,1Bn1,n1]A0,:[B0,0B0,1B0,n1]A1,:[B1,0B1,1B1,n1]A1,:[Bn1,0Bn1,1Bn1,n1]A1,:[B0,0B0,1B0,n1]Am1,:[B1,0B1,1B1,n1]Am1,:[Bn1,0Bn1,1Bn1,n1]Am1,:][[B0,0B0,1B0,n1]A0,:[B0,0B0,1B0,n1]A1,:[B0,0B0,1B0,n1]Am1,:[B1,0B1,1B1,n1]A0,:[B1,0B1,1B1,n1]A1,:[B1,0B1,1B1,n1]Am1,:[Bn1,0Bn1,1Bn1,n1]A0,:[Bn1,0Bn1,1Bn1,n1]A1,:[Bn1,0Bn1,1Bn1,n1]Am1,:]=[B0,0AB0,1AB0,n1AB1,0AB1,1AB1,n1ABn1,0ABn1,1ABn1,n1A]=BA

Therefore,

ABBA

This means, there exist permutation matrices P and Q such that

AB=P(BA)Q

Miscellaneous

In Numpy, the tensor product could be computed using numpy.ufunc.outer, and the Kronecker product could be computed using numpy.kron.

Author

Lei Mao

Posted on

06-07-2020

Updated on

10-20-2022

Licensed under


Comments