Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

01 01 1 0

The matrix representation of an X-gate is [ ]. This means that X|0> = [ ] [ ] = [ ] = |1>.


10 10 0 1
How did we get this? If we multiply the top, or first, row of the left matrix with the column of the right
matrix and add them together such as 0*1 + 1*0 = 0. Then the zero will go on first row, first column in
the result matrix. The same thing for the bottom, or second, row of the left matrix and the column of
right matrix. Can you compute this part to obtain 1 in the same place as the result matrix? Also, using
the same concept we can find:
01 0 1
X|1> = [ ] [ ] = [ ] = |0>
10 1 0
Can you verify this on your own? This is like taking the X-axis and turning it and we can image a point on
the bloch sphere moving along the outside of the sphere from one position to the other. Other than |0>
and |1> we have |+> and |->. The |+> is called the plus state and |-> is the minus state. I will show
different vector representations for |+> and |->:

1

2 1
|+> = = √1/2 [ ]
1 1

[ 2]

1 0
|+> = √1/2|0> + √1/2|1> = √1/2 [ ] + √1/2 [ ]
0 1
1

2 1
|-> = = √1/2 [ ]
1 −1
−√2
[ ]

1 0
|-> = √1/2|0> −√1/2|1> = √1/2 [ ] − √1/2 [ ]
0 1

Now the plus and minus states are states in superposition because the amplitude of states 0 and
1 are √1/2 which means that the probability of obtaining a 0 is 1/2 and the probability of obtaining a 1
is 1/2 with a total probability of 1. The Hadamard gate is used for superposition to obtain the plus and
1 1
√ √
2 2 1 1
minus states. The matrix representation for a Hadamard gate is = √1/2 [ ].
1 1 1 −1
√ − √2
[ 2 ]
To do matrix multiplication with |0> and |1> with the Hadamard gate we represent it as:

H|0> = |+> and H|1> = |->

This is because the Hadamard gate rotates around the Z-axis. How did we obtain these results? Let me
show you how to do the first one:
1 1 1
√ √ √
2 2 1 2 1
H|0> = [ ] = = √1/2 [ ] = |+>
1 1 0 1 1
√ −√ √
[ 2 2] [ 2]

The operation for the first row of the left matrix and the first column of the right matrix is:

1 1 1
√ ∗1+√ ∗0= √
2 2 2

This results in the first row first column of the result matrix. The operation for the second row of the left
matrix and the first column of the right matrix is:

1 1 1
√ ∗ 1 + ( −√ ∗ 0) = √
2 2 2

This results in the second row first column of the result matrix. Notice, the first column of the right
matrix and the result matrix is the only column but I refer to it as the first column so when we have a
matrix with more than one column you can see the pattern. Now try H|1> and see if you can get |->.

1 1 1
√ √ √
2 2 0 2 1
H|0> = [ ] = =√1/2 [ ] = |->
1 1 1 1 −1
√ − √2 −√
[ 2 ] [ 2]

The operation for the first row of the left matrix and the first column of the right matrix is:

1 1 1
√ ∗0+√ ∗1= √
2 2 2

This results in the first row first column of the result matrix. The operation for the second row of the left
matrix and the first column of the right matrix is:

1 1 1
√ ∗ 0 + ( −√ ∗ 1) = −√
2 2 2

We can also do operations such as H|+> and H|-> :

1 1 1
√ √ √
2 2 2 1
H|+> = = [ ] = |0>
1 1 1 0
√ − √2 √
[ 2 ] [ 2]

1 1 1
√ √ √
2 2 2 0
H|-> = = [ ] = |1>
1 1 1 1
√ − √2 −√2
[ 2 ][ ]

You might also like