# Please do not post homework # Omar Aceval Garcia, 2/02/2025, Assignment 2 # Quantum Problem 2.1 # |l> = 1/sqrt(2) (|u> - |d>) and |r> = 1/sqrt(2) (|u> + |d>), which makes: # = 1/2 ( - + - ) = 1/2 ( 1 - 1 + 0 - 0) = 0 # = 1/2 ( - + - ) = 1/2 ( 1 - 1 + 0 - 0) = 0 # Quantum Problem 2.2 # |i> = 1/sqrt(2) (|u> + i|d>) and |o> = 1/sqrt(2) (|u> - i|d>) # Of course these are not unique in that you can do a phase change by multiplying by e^{i*theta} for any real theta to either # = 1/2 ( + i + i + i^2 ) = 1/2 (1 + 0 + 0 - 1) = 0 # Similarly = 0 # = 1/2 ( + - i - i ) = 1/2 (1 + 0 - i - 0) = 1/2 (1-i) # Similarly = 1/2 (1+i), hence since (1-i^2) = 2 we have = 1/2 # All other calculations are similar to the above two lines (some easier since they involve |u> and |d> instead of |l> and |r>) # Quantum Problem 2.3 # If |i> = alpha|u> + beta|d> and |o> = gamma|u> + delta|d> then clearly: # = alpha + beta = alpha # = alpha* + beta* = alpha* # Hence the condition = 1/2 says |alpha|^2 = alpha(alpha*)= 1/2 # Similar for beta, gamma, delta. This is part (a) # = 1/sqrt(2) ( + beta |d>) = 1/sqrt(2) (alpha + beta) # = 1/sqrt(2) (alpha* + |d>)= 1/sqrt(2) (alpha + beta)* # Hence = 1/2 (|alpha|^2 + |beta|^2 + alpha(beta*) + beta(alpha*)) # Since the above equaling 1/2 is a requirement, by (a) we must have that the final piece is 0 = alpha(beta*) + beta(alpha*) # Note that alpha(beta*) is the conjugate of beta(alpha*) and hence since their sum is 0, alpha(beta*) is purely imaginary # We conclude that alpha and beta cannot both be real. The same reasoning applies to gamma and delta. with(Statistics): # TotCliques problem TotClique := proc(G,k): return (nops(Cliques(G, k)) + nops(Cliques(Comp(G), k))): end: # CheckRamsey problem # Makes a random graph on 18 vertices and checks its number of k-cliques/anticliques. Outputs the minimum after doing so K times. # This does NOT check if it accidentally generated the same graph 2 or more times. That's possible but unnecessary in my opinion CheckRamsey := proc(k,K) local i, m: m := 1000000: i := 1: while (m <> 0) and (i <= K) do m:= min(m, TotClique(RG(18, 1/2), k)): i++: od: return m: end: # Estimating avg cliques EstimateAverageClique := proc(n,p,k,K) local i,S: i := 1: S := seq(nops(Cliques(RG(n, p), k)) ,i =1..K): return Mean([S]): end: # When trying out EstimateAverageClique(10, 1/2, 4, 10000) I got 3.375