4 minute read

Basic Quantum Computing with Least Physics PossiblePermalink

Classical Probability BitPermalink

We will start by talking about classical probability bit. Here is the one bit representation p0, p1 are the probability of being 0, 1 respectively.

(p0p1)s.t. p0+p1=1, p0,p1R, 0p0,p11

And here is the n-bits representation

(p000p001p010p111)R2ns.t. px=1, px[0,1]R, x{0,1}n

So we can do some transformation to the bit:

(p0p1)I(p0p1) (p0p1)NOT(p1p0)

Or if we have two bits

(p0p1),(p0p1)

and want to do an XOR with two dependent bits

(p00p01p10p11)XOR(p000p1)

But it is not possible (physically) to do something like this, which kind of does XOR with two independent bits:

(p00p01p10p11)XOR(p0p0p0p1p1p0p1p1)

In other words, physically, in our universe, we can only do l1 norm linear tranformation.

Quantum Bit (qubit)Permalink

For qubit, we are able to do l2 norm. A single qubit is difine as follows:

(αβ)C2s.t. |α|2+|β|2=1, |α|:=αα¯Prob[m=0]=|α|2=(10)Prob[m=1]=|β|2=(01)

Certainly we can do transformation to one qubit. In this case, the transformation we have is TC2×2. Before talking about transformations, we first introduce k-qubits as follows

(α000α001α010α111)C2ks.t. x{0,1}k|αx|2=1

and our transformation becomes TC2k×2k

Some NotationsPermalink

v=(α1α2αd)Cdv=(α1¯,,αd¯)<v,w>=vw=<w,v>¯=<v|w>vwvw=0v=i=1dαiαi¯=vvT=(T11T1dTd1Tdd)T¯=(T11¯Td1¯T1d¯Tdd¯)(α0α1)(α0α1)=(α0β0α0β1α1β0α1β1)CkCl=Cklif |Φ~>=U|Φ>,|Ψ~>=U|Ψ>,then <Φ|Ψ>=<Φ~|Ψ~>and <Φ~|=<Φ|U|0>:=(10)|1>:=(01)|+>:=(1/21/2)=1/2(|0>+|1>)|>:=(1/21/2)=1/2(|0>|1>)H:=1/2(1111)H|0>=|+>H|1>=|>H|+>=|0>H|>=|1>|X,Y>:=|X>|Y>if f:{0,1}k{0,1},then |X,Z>Uf|X,Z+f(X)>

Quantum TransformationsPermalink

T is a quantum transformation iff

  • T is linear: TCd×d
  • T is norm preserving vCd,v2=Tv2TT=I

Basic Quantum Gates (Between 2/3 qubits)Permalink

SWAP:=(1000001001000001)i.e. (X,Y)SWAP(Y,X)CNOT:=(1000010000010010)i.e. (X,0/1)CNOT{(X,0/1)ifX=0(X,1/0)ifX=1CCNOT:=(1000000001000000001000000001000000001000000001000000000100000010)i.e. (X,Y,Z)CCNOT(X,Y,ZXY)(X,Y,0)CCNOT(X,Y,XY)

Note: all transformations are inversible. Specifically, for the above 3 trans., the inverse of them are themselves. Namely, apply it twice and we will be back to the original position.

To implement some classical function f, we need the input bits as well as some extra bits for input to have extra space to work with.

One Small Quantum Algorithm ExamplePermalink

Here we will talk about a small example of quantum algorithms, just to get a feel of how quantum gates works and why it is sometimes more efficient than classical algorithms.

Deutsch Problem

Given f{0,1}{0,1}, we ask if f(0)=f(1). Classically we have to evaluate twice: both f(0) and f(1). Quantumly we can solve it with one transformation and evaluate it.

input:|0,1>

  1. |0,1>H|+,>
  2. |+,>Uf???

So

|b,>Uf|(1)f(b)b,>And|+,>Uf1/2((1)f(0)|0>+(1)f(1)|1>)|>→{±|+>iff(0)=f(1)±|>iff(0)f(1)

So if we measure the result, we will see 0 iff f(0)=f(1), and 1 iff f(0)f(1)

Comments