Pauli matrices via Clifford algebra
Robin K. S. Hankin
Source:vignettes/pauli_clifford.Rmd
pauli_clifford.Rmd
To cite the clifford
package in publications please use
Hankin (2022). This short document shows
how the Pauli matrices, often used in quantum mechanics, can be
calculated using Clifford algebra as implemented by the
clifford
R package. The Pauli matrices are set of three
We observe that
The non-identity Pauli matrices [that is,
(here,
(here,
Because any jordan
package (Hankin 2023) which implements
this operation in a more general context. The Jordan multiplication rule
is
which suggests the following identification:
Then we make the formal identifications:
and so we recover the Pauli matrix relations from the Clifford algebra.
R implementation
s0 <- matrix(c(1,0,0,1),2,2)
sx <- matrix(c(0,1,1,0),2,2)
sy <- matrix(c(0,1i,-1i,0),2,2)
sz <- matrix(c(1,0,0,-1),2,2)
Given a general complex matrix M
, we may coerce this to
Clifford form as follows:
matrix_to_clifford <- function(M){
(Re(M[1,1] + M[2,2]))/2 +
(Re(M[1,1] - M[2,2]))/2*e(c( 3 )) +
(Im(M[1,1] + M[2,2]))/2*e(c(1,2,3)) +
(Im(M[1,1] - M[2,2]))/2*e(c(1,2 )) +
(Re(M[2,1] + M[1,2]))/2*e(c(1 )) +
(Re(M[2,1] - M[1,2]))/2*e(c(1, 3)) +
(Im(M[2,1] + M[1,2]))/2*e(c( 2,3)) +
(Im(M[2,1] - M[1,2]))/2*e(c( 2 ))
}
and then test it as follows:
## [,1] [,2]
## [1,] -1.4000435+0.6215527i -2.437263611-1.8218177i
## [2,] 0.2553171+1.1484116i -0.005571287-0.2473253i
matrix_to_clifford(M)
## Element of a Clifford algebra, equal to
## - 0.7028074 - 1.090973e_1 + 1.485115e_2 + 0.434439e_12 - 0.6972361e_3 +
## 1.34629e_13 - 0.336703e_23 + 0.1871137e_123
We can now test whether matrix_to_clifford()
is a group
homomorphism:
M1 <- rmat()
M2 <- rmat()
diff <- matrix_to_clifford(M1)*matrix_to_clifford(M2) - matrix_to_clifford(M1 %*% M2)
diff
## Element of a Clifford algebra, equal to
## + 2.220446e-16e_12 + 8.326673e-17e_3 + 2.220446e-16e_23 - 8.326673e-17e_123
Mod(diff)
## [1] 3.353719e-16
We see agreement to numerical precision. Now we can coerce from a Clifford to a matrix:
`clifford_to_matrix` <- function(C){
return(
const(C)*s0 + getcoeffs(C,list(1))*sx
+ getcoeffs(C,list(2))*sy + getcoeffs(C,list(3))*sz
+ getcoeffs(C,list(c(1,2,3)))*1i*s0 + getcoeffs(C,list(c( 2,3)))*1i*sx
- getcoeffs(C,list(c(1, 3)))*1i*sy + getcoeffs(C,list(c(1,2 )))*1i*sz
)
}
rc <- function(...){rcliff(100,d=3,g=3)}
C <- 104 + rc()
C
## Element of a Clifford algebra, equal to
## + 155 + 60e_1 - 90e_2 + 74e_12 - 63e_3 + 10e_13 + 27e_23 - 27e_123
clifford_to_matrix(C)
## [,1] [,2]
## [1,] 92+47i 50+117i
## [2,] 70-63i 218-101i
Now test that the two coercion functions are inverses of one another:
clifford_to_matrix(matrix_to_clifford(M)) - M
## [,1] [,2]
## [1,] 0+0i 0.000000e+00+2.220446e-16i
## [2,] 0+0i -7.372575e-17+2.775558e-17i
matrix_to_clifford(clifford_to_matrix(C))- C
## Element of a Clifford algebra, equal to
## the zero clifford element (0)
Now we can establish that clifford_to_matrix()
is a
homomorphism:
C1 <- 222 + rc()
C2 <- 333 + rc()
clifford_to_matrix(C1*C2) - clifford_to_matrix(C1)%*%clifford_to_matrix(C2)
## [,1] [,2]
## [1,] 0+0i 0+0i
## [2,] 0+0i 0+0i
Closure
The reason that Pauli matrices are useful in physics is that they are
closed under the Jordan operation
M1 <- as.1matrix(rchm(1,2))
M2 <- as.1matrix(rchm(1,2))
M1
## [,1] [,2]
## [1,] -0.05+0.00i -0.74-0.11i
## [2,] -0.74+0.11i -0.56+0.00i
M2
## [,1] [,2]
## [1,] -0.56+0.00i 0.75-1.92i
## [2,] 0.75+1.92i 0.19+0.00i
## [,1] [,2]
## [1,] 0+0i 0+0i
## [2,] 0+0i 0+0i
Above, see how
C1 <- matrix_to_clifford(M1)
C2 <- matrix_to_clifford(M2)
p2 <- (C1 * C2 + C2 * C1)/2
p2
## Element of a Clifford algebra, equal to
## - 0.383 - 0.09185e_1 - 0.60595e_2 + 0.0672e_3
above, see how the clifford product p2
is a pure Pauli
matrix as its only nonzero coefficients are those of the scalar and the
grade-one blades:
grades(p2)
## A disord object with hash dc0ef121a24b8ab8c67bbfc6468e439b5622e81e and elements
## [1] 0 1 1 1
## (in some order)