{"id":3844,"date":"2022-07-02T02:11:00","date_gmt":"2022-07-02T02:11:00","guid":{"rendered":"https:\/\/mohamedh.me\/blog\/?p=3844"},"modified":"2022-11-02T02:20:47","modified_gmt":"2022-11-02T02:20:47","slug":"the-difference-between-superposition-and-statistical-mixture","status":"publish","type":"post","link":"https:\/\/mohamedh.me\/blog\/the-difference-between-superposition-and-statistical-mixture\/","title":{"rendered":"The difference between quantum superposition and statistical mixture"},"content":{"rendered":"\n<p>When learning about quantum computing, there are various new words that you start to hear and a lot of confusion arises between the classical &#8220;statistical(or probabilistic) mixture&#8221;, a &#8220;quantum superposition&#8221;,  &#8220;mixed states&#8221;, &#8220;pure states&#8221; and &#8220;entangled states.<\/p>\n\n\n\n<p>First of all, to clear any confusion, let&#8217;s just clarify that entanglement is a different beast. It describes the state of a multi-partite system. Here we focus on the description of independent simple (local) states.<\/p>\n\n\n\n<ul><li>A state can be separable and pure.<\/li><li>A state can be separable and mixed.<\/li><li>A state can be entangled and pure.<\/li><li>A state can be entangled and mixed.<\/li><\/ul>\n\n\n\n<p>So with that in mind, we will ignore entanglement for now as it is not necessary to understand what we are trying to explain in this blog post.<\/p>\n\n\n\n<div style=\"display:none\">\n\n\\(\n   \\def\\ket#1{{ |#1} \\rangle}\n   \\def\\bra#1{{ \\langle  #1} |}\n   \\def\\braket#1#2{{ \\langle  #1} | #2\\rangle}\n\\)\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Mathematical hint to distinguish pure and mixed states: <\/h4>\n\n\n\n<p>Given the <a href=\"https:\/\/mohamedh.me\/blog\/the-density-matrix\/\" data-type=\"post\" data-id=\"3841\">density matrix<\/a> \\( \\rho \\) of dimension \\( d \\)  for a quantum state, how to tell if it is pure or mixed? <\/p>\n\n\n\n<p>Simply multiply the matrix \\( \\rho \\)  by itself so that you get \\( \\rho^2 \\), then compute the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Trace_(linear_algebra)\">trace<\/a>.<\/p>\n\n\n\n<ul><li>if \\( tr(\\rho^2)=1 \\Rightarrow \\) pure state<\/li><li>if \\(  \\frac{\\mathbb{I}}{d} &lt;tr(\\rho^2)&lt;1 \\Rightarrow \\) mixed state<\/li><li>if \\(  tr(\\rho^2) = \\frac{\\mathbb{I}}{d} \\Rightarrow \\) maximally mixed state [a particular case of mixed states.]<\/li><\/ul>\n\n\n\n<div style=\"height:59px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Now all that is left is to clear up the confusion between &#8220;mixed states&#8221;, &#8220;probabilistic mixtures&#8221; and &#8220;superposition&#8221;. For that, keep reading.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Superposition: <\/h2>\n\n\n\n<p>A superposition is a always pure state. (but not every pure state is a pure state!)<\/p>\n\n\n\n<p>The physical description is that it can be represented by summing wave functions. The phenomenon of superposition is the result of quantum interference between the waves. <\/p>\n\n\n\n<p>Simply put, a superposition looks like this, for example, \\(  \\ket {\\psi_s} = \\frac{1}{\\sqrt{2}} ( \\ket{0} + \\ket{1})  \\) it is at both states at the same time. It is not that we don&#8217;t know which, there is no uncertainty here. We know for sure what the state is, it is just a state in-between.*  The observation, however, when you measure it, is that you still get a probabilistic outcome (depending on the basis).<\/p>\n\n\n\n<p>The difference in terms of density matrix representation: <\/p>\n\n\n\n<ul><li>Superposition has elements on the off-diagonal. These terms represent the presence of quantum interference in the system<\/li><li>Mathematically, if you use the hint given above for the (normalized) density matrix, you should find it is a pure state <\/li><\/ul>\n\n\n\n<p>*: This phrasing may depend a bit on the interpretation of quantum mechanics that you chose. <a href=\"https:\/\/physics.stackexchange.com\/a\/485154\/280552\">See this answer on SE<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mixture:<\/h2>\n\n\n\n<p>A mixed state Can only be described using density matrices (no wave functions). The terms &#8220;probabilistic&#8221;, &#8220;statistical&#8221; mixture, or &#8220;mixed state&#8221;  all refer to the same thing.<\/p>\n\n\n\n<p>A probabilistic mixture has nothing particularly quantum, it is just uncertainty. Just unknown. Like tossing a coin.<\/p>\n\n\n\n<p>Physically, there is no quantum interference between the states, and therefore no (coherence) elements on the off-diagonal.<\/p>\n\n\n\n<p>Example of a matrix that represents a chance of 0.5 for each possibility:<\/p>\n\n\n\n<p>$$ \\rho_m = \\begin{bmatrix}<br>1\/2 &amp; 0 \\\\<br>0 &amp; 1\/2 \\<br>\\end{bmatrix} = 1\/2 ( \\ket{0}\\bra{0}  + \\ket{1}\\bra{1} ) $$<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">distinguishing both (with measurement):<\/h2>\n\n\n\n<p>I am going to skip a bit what a measurement exactly is, and for that, I will let you read the &#8220;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Density_matrix#Measurement\">measurement&#8221; section in density matrices on Wikipedia<\/a>. Basically what we need to know here, is that measuring a state allows us to observe it and know exactly what it is, and it is mathematically achieved by multiplying a given measurement operator by the density matrix (the representation of our quantum state).<\/p>\n\n\n\n<p>Aside from the hints given above to distinguish by squaring density operator and check the purity of the state, the two cases can be distinguished by a measurement.<\/p>\n\n\n\n<p>Let \\( \\rho_s =  \\ket {\\psi_s} \\bra{\\psi_s}  = 1\/2 ( \\ket{0}\\bra{0} + \\ket{0}\\bra{1} + \\ket{1}\\bra{0} + \\ket{1}\\bra{1} )  \\)     <\/p>\n\n\n\n<p>and \\(  \\rho_m =  1\/2 ( \\ket{0}\\bra{0}  + \\ket{1}\\bra{1} )  \\) as defined above.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Computational basis:<\/h5>\n\n\n\n<p>When you perform a measurement in the basis \\( \\{ \\ket {0}, \\ket{1} \\} \\) we will use as measurement operators \\( A_{c0}= \\ket{0}\\bra{0} \\) and  \\(  A_{c1} = \\ket{1}\\bra{1}\\), you won&#8217;t be able to tell the difference between both as both measurements will give the same outcome.<\/p>\n\n\n\n<p><strong> The math: <\/strong><\/p>\n\n\n\n<p>we know for \\( \\rho_s  \\)  the probabilities are \\( (\\frac {1}{\\sqrt{2}})^2  \\) so  \\(Pr(0) = 1\/2 \\)   and  \\(Pr(1) =1\/2\\) <br>As for  \\( \\rho_m   ,   Pr(0) =  Tr ( A_{c0} \\rho_m) = 1\/2  \\)   and  \\( Pr (1) =Tr ( A_{c1} \\rho_m) = 1\/2  \\)<br>Simply do the math between the matrices or check this <a href=\"https:\/\/quantumcomputing.stackexchange.com\/a\/4836\/13569\">on QC SE<\/a>, it is a similar example.<\/p>\n\n\n\n<p>So in both cases, we get similar probabilities,  so the trick to distinguish a superposition from a mixture is to use a different measurement basis!<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Hadamard basis:<\/h5>\n\n\n\n<p>But, When you measure in the Hadamard basis \\( \\{ \\ket {+} , \\ket{-} \\} \\), use as measurement operators \\( A_h0= \\ket{+}\\bra{+} = \\begin{bmatrix} 1\/2 &amp; 1\/2 \\\\  1\/2 &amp; 1\/2 \\ \\end{bmatrix} \\) and \\( A_h1= \\ket{-}\\bra{-}= \\begin{bmatrix} 1\/2 &amp; -1\/2 \\\\  -1\/2 &amp; 1\/2 \\ \\end{bmatrix}\\) <\/p>\n\n\n\n<p><strong> The math: <\/strong><\/p>\n\n\n\n<p>With similar reasoning:  For \\( \\rho_s  \\)  :<br>\\(  Pr(0) =  Tr ( A_{h0} \\rho_s) = 1 \\)   and \\(  Pr(1) =  Tr ( A_{h1} \\rho_s) = 0 \\)  <br>This makes perfect sense as the state we started with is indeed obtained by applying a Hadamard gate to \\( \\ket{0} \\).<\/p>\n\n\n\n<p>For \\( \\rho_m  \\)  :<\/p>\n\n\n\n<p>\\(  Pr(0) =  Tr ( A_{h0} \\rho_m) = Tr( \\begin{bmatrix} 1\/2 &amp; 1\/2 \\\\  1\/2 &amp; 1\/2 \\ \\end{bmatrix} \\begin{bmatrix} 1\/2 &amp; 0 \\\\  0 &amp; 1\/2 \\ \\end{bmatrix} ) = 1\/2 \\)   and \\(  Pr(1) =  Tr ( A_{h1} \\rho_m) = 1\/2 \\)  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Further reading <\/h2>\n\n\n\n<p><a href=\"https:\/\/chem.libretexts.org\/Bookshelves\/Physical_and_Theoretical_Chemistry_Textbook_Maps\/Supplemental_Modules_(Physical_and_Theoretical_Chemistry)\/Quantum_Tutorials_(Rioux)\/Quantum_Fundamentals\/83%3A_Visualizing_the_Difference_Between_a_Superposition_and_a_Mixture\">83: Visualizing the Difference Between a Superposition and a Mixture<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Density_matrix#Pure_and_mixed_states\">Pure and mixed states<\/a> on Wikipedia (honestly gives a perfect explanation!)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When learning about quantum computing, there are various new words that you start to hear and a lot of confusion arises between the classical &#8220;statistical(or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,16,65,1],"tags":[66,69,68,72,71,14],"_links":{"self":[{"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/posts\/3844"}],"collection":[{"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/comments?post=3844"}],"version-history":[{"count":36,"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/posts\/3844\/revisions"}],"predecessor-version":[{"id":3934,"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/posts\/3844\/revisions\/3934"}],"wp:attachment":[{"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/media?parent=3844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/categories?post=3844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohamedh.me\/blog\/wp-json\/wp\/v2\/tags?post=3844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}