Professional Documents
Culture Documents
Gates
Gates
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:
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
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 ][ ]