Quantum Investigations Part 5
In this post, you may find some duplication with the first post. I am attempting to redefine what I know. Hopefully, it will all make sense and not be too convoluted.
I also find I am a bit vague on some of the computations and conversions involved with matrices, such as identity, transpose, Hermitian conjugate and inverse operations.
Identity matrix
Firstly, the identity matrix is a square matrix with 1s along the diagonal and 0s everywhere else. Suppose we have a 2x2 matrix defined
We can create the identity matrix in R using diag(x) where x=2 is the matrix size.
Transpose matrix
Next we look at transposing a matrix, which is exchanging the rows and columns. For this, we can use the t() function from the base R package.
A <- matrix(c(1,2,3,4,5,6,7,8,9),3,3,byrow=TRUE)
Pretty simple for that function, and the first step in the Hermitian transpose.
Hermitian transpose
Next, we look at Hermitian transpose (or conjugate transpose). For this, we can use the QZ library. So we define a complex matrix,
A <- matrix(c(1 +0i, -2 -3i, 5 +0i, 1 +2i, 0 +0i, 4 -2i),2,3,byrow=T)
and take the Hermitian transpose, H(A), which is firstly transposing the matrix, then conjugating each entry.
Notice only the complex numbers are changed and the real numbers remain the same. For quantum mechanics, the
Inverse matrix
Inversing a matrix allows solving for the vector x in the matrix equation
A <- matrix(c(3,5,-2,1),2,2,byrow=TRUE); inv(A); inv(inv(A))
Shown is the matrix, inverse and double inverse matrices. As can be seen, double inverses return the matrix to the original values. Not sure if the last is the correct syntax.
Anyway, I’m not sure where I will proceed next in this series. So, have a great day and may the Lord Jesus Bless you and yours.
Footnotes
The Hadamard gate is used to perform the superposition of each initialized quantum state↩︎