How to do algebra on the Kitaev toric code grid?

In summary, the toric code is a basic computational model used in physics that transforms raw values at each dot into another value according to predefined operators.
  • #1
James1238765
120
8
TL;DR Summary
How to do algebra on the Kitaev toric code grid?
The toric code is a basic computational model as follows:

images (1).png


There are 2 operations that can be performed, A and B, on this grid.

To compute the value A at each point on the grid, we transform the raw values at each dot (located in between two vertices) according to some predefined operators ##f_a## and ##f_b##, and multiply the four surrounding values from the operations:

$$ A = f_a(left) f_a(up) f_a(right) f_a(down) $$
$$ B = f_b(left) f_b(up) f_b(right) f_b(down) $$

This seems to be a straightforward question, but I could not find a clear answer anywhere.

A commonly used toric code in physics is the model by A. Kitaev (https://www.physics.rutgers.edu/grad/602/Lectures/JC_Presentations/0419/Intro_Toric_Code.pdf)

What confuses me is what type of *quantity* is prescribed at each dot, be it a scalar ##0.24##, or a complex number ##0.24 + 0.12 i##, or a vector ##[0.24, 0.12]## in this Kitaev toric code model?

Also what is the form of the operator function ##f_a## and ##f_b##, be they 2x2 matrices, or something else?
 
Mathematics news on Phys.org
  • #2
Your source says they're Pauli operators, which I think are 2x2 matrices? From a mathematical standpoint just off your definition real or complex numbers would be fine, but vectors would not be as there is not a standard definition for how to multiply four vectors together (though you could pick a way to do it, e.g. entry by entry multiplication)

Edit to add: in not sure what "Pauli operators acting on individual spins" actually means, but thinking more about the content I think each one is a 2nx2n matrix which is mostly the identity matrix except for a small 2x2 block which is a Pauli matrix.
 
  • Like
Likes James1238765
  • #3
@Office_Shredder thank you. From what I gather, the dots are spinors, represented by the |0> and |1>, so I suppose that usually translates to:

$$
|1> = \begin{bmatrix}
0 \\
1
\end{bmatrix} ,
|0> = \begin{bmatrix}
1 \\
0
\end{bmatrix}
$$

The A and B operators seem to be the Pauli matrices:

$$ f_a =
\begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix},

f_b =
\begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}
$$

So I suppose the operation goes something as follows:

$$f_a(|1>) =
\begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix}
\begin{bmatrix}
0 \\
1
\end{bmatrix} =
\begin{bmatrix}
1 \\
0
\end{bmatrix}
$$

Supposing that's are correct, how then do we multiply the four resulting column vectors together?

$$f_a(left) f_a(up) f_a(right) f_a(down)= ? $$

And then, the final answer for A seems to be a scalar. But how do 4 vector multiplications result in a scalar answer? It's quite mysterious.
 
  • #4
We can start by noting that Av and Bp are
Hermitian and square to the identity

What makes you think these are scalar? ##f_a(left)## is an operator, and you multiply four of them together to get another operator. I think each of these operators is an operator on a large dimensional space, which (for the Z's and X's in the paper, ##f_a(x)## and ##f_b(y)## in your notation) is the identity everywhere except is a Pauli matrix on some specific subspace.
 
  • #5
@Office_Shredder Yes you're right, those are operators! So,

$$ A = f_a(f_a(f_a(f_a(|1>)))) = f_a(f_a(f_a(|0>))) = f_a(f_a(|1>)) = f_a(|0>) = |1>$$
$$ B = f_b(f_b(f_b(f_b(|0>)))) = f_b(f_b(f_b( -|0>))) = f_b(f_b(|0>)) = f_b( -|0>) = |0> $$

So the final answers are likely closed within the set {|0>, |1>, -|0>, -|1>}.

The next step is to calculate S, being the total sum of A over every square on the grid, and the sum of B over every square on the grid.

$$ S = \sum_{grid} A - \sum_{grid} B $$

This S would also be a single column vector, with integer real number values for each component like ## S =
\begin{bmatrix}
-10 \\
7
\end{bmatrix} ## , do you think?
 
  • #6
No, for two reasons. 1.) Why are you applying the operator to a state? An operator can just exist, and they can be multiplied and added. 2.) It says the spin state of each node is being tracked separately. So your state vector is actually going to be very large, not a vector of length 2.
 
  • Like
Likes James1238765
  • #7
@Office_Shredder I suspect it's the Kronecker product of each of the 4 operation

$$f_a(left) \otimes f_a(up) \otimes f_a(right) \otimes f_a(down)$$

where ##f_a## is ##
\begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix}## for dots surrounding the point in question, and ##
\begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}## for all other points?

q123124.jpg

q234534.jpg

q376547.jpg

from [here]
 
  • #8
No. Each ##f_a(x)## is already an operator defined on the large state of all spins. At that point you just do normal matrix multiplication.

The matrix representation of each ##f_a## is conceptually similar to what you described for a single 2x2 block, except kronecker products are more complicated (recall the dimension of the spaces grows multiplicatively as you add more products, not linearly) so it's better to just keep everything in tensor product form the whole time and not try to write down a matrix.
 
Last edited:
  • Like
Likes James1238765
  • #9
@Office_Shredder Do you mean for a 100x100 grid, ##f_a## is defined as an entire Kronecker product of the whole grid, something like a 100x100 sized matrix? This huge matrix is calculated once at the beginning of the simulation, and all subsequent calculation is just normal matrix multiplication?

Apologies if it looks like I'm splitting hairs over the minute details. The goal is to implement and time evolve the grid, and I usually can't do it if even a small part of the model is left vague, as I need to implement every step of the model.

If you have understood the whole thing, it might be easier to just give an explicit and concrete numerical example how to calculate A at a grid point (which is what the texts should probably have done in place of their roundabout definitions).
 
  • #10
No, the matrix will be ##2^{10,000}## by ##2^{10,000}## which is why they are not writing things down as matrices and you shouldn't either.

Remember how kronecker products work. Suppose I have three spin states, and each one has a 2 dimensional basis ##e_0## and ##e_1##. Then the product has a basis of dimension 8, i.e ##2^3##
##e_0 \otimes e_0 \otimes e_0##,
##e_0 \otimes e_0 \otimes e_1##,
##e_0 \otimes e_1 \otimes e_0##,
##e_1 \otimes e_0 \otimes e_0##,
##e_0 \otimes e_1 \otimes e_1##
##e_1 \otimes e_0 \otimes e_1##,
##e_1 \otimes e_1 \otimes e_0##,
##e_1 \otimes e_1 \otimes e_1##

In your case you have roughly ##10,000## spin states. The actual set of allowed matrices is small though.
 
  • Like
Likes James1238765
  • #11
In the related Ising model of spin lattice behavior, spin is represented as scalar 2-valued quantity {1, -1} representing up and down spin. This model is a kind of cellular automaton with the following rules.

Consider a point on the grid ##[x, y]##. This point has a current spin, let's call it 1 (up).

Give this point ##[x,y]## a current total score, by comparing this point with its immediate left neighbor. If the spin the same, add 1 to the score. If the spin is opposite, subtract 1from the score. Compare with its up, right, down neighbors the same way. The total score for this specific gridpoint ##[x,y]## at current time can range from {-4, -3, -2, -1, 0, 1, 2, 3, 4} depending on the different current states of its neighbors.

Then compute a hypothetical score in the same manner, but supposing that the spin is now reversed, ie. suppose that spin = -1 (down).

If the hypothetical score is better (higher) than the current score, immediately flip the spin of this gridpoint and be done with current task.

If the hypothetical score is worse (lower) than the current score, we could simply forbid the spin to flip altogether. It is more common though to be magnanimous and give it a minuscule change ##\frac{1}{e^{score deficit}}## of switching its spin even though the score will in fact get worse. If the score difference is 1, the chance of overturning the spin is ##\frac{1}{e^1} = 37\%##. If the score difference is 2, the chance of overturning the spin is ##\frac{1}{e^2} = 13\%##. The chances drops to ##5\%## and ##2\%## for opposing the spins of a maximum all 4 neighbors of this point.

A steady state (with some background fluctuations) is obtained, when the initial population of spin 1 and spin -1 grid values are 50-50.

download.png


(red = spin 1, yellow = spin -1)
 
Last edited:
  • #12
Hi, something seems off with this discussion, perhaps not. If I may, the paper models a system of spin-##\frac{1}{2}## particles interacting along the spin ##z##-direction only. Each spin is associated with an edge. The system state space is the tensor product of all the spins 2D spaces. If there are ##N## spins then the operators, ##A_v## and ##B_p##, are ##2N\times 2N## matricies. In fact the ##A_v## and ##B_p## are all diagonal since only ##\sigma_z## for each spin is used.
 
  • #13
@Paul Colby thank you. I guess the ##\otimes## is what's been throwing me off all this while, as I have not encountered something like it before.

Let's calculate A at a point ##A_{100}##, with its neighbors being left= ##[1,0]##, up=##[0,1]##, right=##[1,0]##, down=##[0,1]##.

The X operator for A is the matrix
$$X = \begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix}$$.

How should we compute the plaquette operation ##A_{100} = \sigma_{left} \sigma_{up} \sigma_{right}\sigma_{down}## from here?

How should we compute the sum ##\sum_{grid} A_n## over all grid points, and what on earth is being Kroneckered ##\otimes##?
 
  • #14
Paul Colby said:
Hi, something seems off with this discussion, perhaps not. If I may, the paper models a system of spin-##\frac{1}{2}## particles interacting along the spin ##z##-direction only. Each spin is associated with an edge. The system state space is the tensor product of all the spins 2D spaces. If there are ##N## spins then the operators, ##A_v## and ##B_p##, are ##2N\times 2N## matricies. In fact the ##A_v## and ##B_p## are all diagonal since only ##\sigma_z## for each spin is used.

The paper says the Hilbert space has dimensions ##2^{2L^2}## which I think agrees with my interpretation and not yours.
 
  • #15
reply under review
 
Last edited:
  • #16
Office_Shredder said:
The paper says the Hilbert space has dimensions ##2^{2L^2}## which I think agrees with my interpretation and not yours.
Yeah, I think I agree here. A 2 spin system has 4 states and a three spin system 8, not 6 Like what I just posted again.
 
  • #17
Okay, Office_Shredder gave the proper way to form the state space for a three spin system in #10.

Let ##Z_k## be the operator for the z-component of spin index ##k##. This operator acts only on the k-th spin independent of all other spins. These spins are fermions so all spin components of spin k anti commute with every other spin, $$Z_kZ_j=-Z_jZ_k$$ whenever ##k\ne j##. All ##A_v## commutes with every other ##A_v## because they are even products of anti commuting operators. The ##B_p## operators are constructed using the ##X_k## components. ##Z_k## definitely does not commute with ##X_k## so checking that ##A_v## commutes with all the ##B_p## needs to be shown.

The matrices associated with these operators are immense but the algebra they obey is straightforward.
 
  • #18
Paul Colby said:
The matrices associated with these operators are immense but the algebra they obey is straightforward.

I really want to emphasize this. For a 100 by 100 grid you have an algebra of about 20,000 matrices where you can write down exactly how each product of matrices works in a couple sentences. If you want to represent them as matrices by their definition you need like, more numbers than there are atoms in the universe. So you definitely should not do that.
 
  • #19
Thank you @Paul Colby @Office_Shredder . I am still working this out, but I like math forums for this reason. Let's talk about math without other baggage. If it's alright I would post other math modeling questions in this sub forum.
 

1. How do I represent qubits on the Kitaev toric code grid?

The Kitaev toric code grid is a 2D lattice of qubits, with each qubit represented by a vertex on the grid. To represent qubits on the grid, you can use a binary notation, where 0 represents a qubit in the state |0⟩ and 1 represents a qubit in the state |1⟩.

2. How do I perform logical operations on the Kitaev toric code grid?

To perform logical operations on the Kitaev toric code grid, you can use the stabilizer formalism. This involves identifying a set of stabilizer operators that commute with each other and form a basis for the logical operators. By measuring these stabilizer operators, you can determine the error syndrome and perform error correction.

3. How do I encode logical qubits on the Kitaev toric code grid?

To encode logical qubits on the Kitaev toric code grid, you can use the process of gauge fixing. This involves fixing the values of certain qubits on the grid to create a logical qubit that is protected from local errors. The specific method for encoding logical qubits may vary depending on the type of error correction code used.

4. How do I detect and correct errors on the Kitaev toric code grid?

To detect and correct errors on the Kitaev toric code grid, you can use the stabilizer formalism. By measuring the stabilizer operators, you can determine the error syndrome and use this information to correct errors on the grid. This process can be repeated multiple times to ensure the accuracy of the final result.

5. How do I simulate operations on the Kitaev toric code grid?

To simulate operations on the Kitaev toric code grid, you can use quantum circuit simulation software. This software allows you to specify the operations and measurements to be performed on the grid and provides a visual representation of the resulting states and measurements. This can be a useful tool for understanding the behavior of the Kitaev toric code and testing different error correction strategies.

Similar threads

  • Advanced Physics Homework Help
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
Replies
1
Views
3K
  • Quantum Physics
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Differential Equations
Replies
1
Views
1K
  • Math Proof Training and Practice
Replies
28
Views
5K
Back
Top