Quantum Computing, 2

stcredzero 3 months ago

A note for the savvy: A quantum computer is not a magic bit-string that mysteriously flips to the correct answer. A n-qubit quantum computer is not like 2^n phantom computers running at the same time in some quantum superposition phantom-zone. That’s the popular misconception, but it’s effectively ignorant techno-woo.

Here’s what really happens. If you have a string of n-qubits, when you measure them, they might end up randomly in [one] of the 2^n possible configurations. However, if you apply some operations to your string of n-qubits using quantum gates, you can usefully bias their wave equations, such that the probabilities of certain configurations are much more likely to appear. (You can’t have too many of these operations, however, as that runs the risk of decoherence.) Hopefully, you can do this in such a way, that the biased configurations are the answer to a problem you want to solve.

So then, if you have a quantum computer in such a setup, you can run it a bunch of times, and if everything goes well after enough iterations, you will be able to notice a bias towards certain configurations of the string of bits. If you can do this often enough to get statistical significance, then you can be pretty confident you’ve found your answers.

— An Argument Against Quantum Computers

— Hacker News



2018.05.17 Thursday ACHK

Van der Waals equation 1.2

Whether X_{\text{measured}} is bigger or smaller than X_{\text{ideal}} ultimately depends on the assumptions and definitions used in the derivation of the ideal gas equation itself.


In the ideal gas equation derivation, the volume used in the equation refers to the volume that the gas molecules can move within. So

V_{\text{ideal}} = V_{\text{available for a real gas' molecules to move within}}

Then, when deriving the pressure, it is assumed that there are no intermolecular forces among gas molecules. So

P_{\text{ideal}} = P_{\text{assuming no intermolecular forces}}


These are the reasons that

V_{\text{ideal}} < V_{\text{measured}}

P_{\text{ideal}} > P_{\text{measured}}

P_{\text{ideal}} V_{\text{ideal}} = nRT

\left(P_\text{measured} + a\left(\frac{n}{V}\right)^2\right) \left(V_\text{measured}-nb\right) = nRT

— Me@2018-05-16 07:12:51 PM


… the thing to keep in mind is that the “pressure we use in the ideal gas law” is not the pressure of the gas itself. The pressure of the gas itself is too low: to relate that pressure to “pressure for the ideal gas law” we have to add a number. While the volume occupied by the real gas is too large – the “ideal volume” is less than that. – Floris Sep 30 ’16 at 17:34

— Physics Stackexchange



2018.05.16 Wednesday (c) All rights reserved by ACHK

Van der Waals equation 1.1

Why do we add, and not subtract, the correction term for pressure in [Van der Waals] equation?

Since the pressure of real gases is lesser than the pressure exerted by (imaginary) ideal gases, shouldn’t we subtract some correction term to account for the decrease in pressure?

I mean, that’s what we have done for the volume correction: Subtracted a correction term from the volume of the container V since the total volume available for movement is reduced.

asked Sep 30 ’16 at 15:20
Ram Bharadwaj

— Physics Stackexchange


Ideal gas law:

P_{\text{ideal}} V_{\text{ideal}} = nRT

However, since in a real gas, there are attractions between molecules, so the measured value of pressure P is smaller than that in an ideal gas:

P_{\text{measured}} = P_{\text{real}}

P_{\text{measured}} < P_{\text{ideal gas}}

Also, since the gas molecules themselves occupy some space, the measured value of the volume V is bigger that the real gas really has:

V_{\text{measured}} > V_{\text{real}}

P_{\text{ideal}} V_{\text{ideal}} = nRT

If we substitute P_{\text{measured}} onto the LHS, since P_{\text{measured}} < P_{\text{ideal}}, the LHS will be smaller than the RHS:

P_{\text{measured}} V_{\text{ideal}} < nRT

So in order to maintain the equality, a correction term to the pressure must be added:

\left(P_\text{measured} + a\left(\frac{n}{V}\right)^2\right) V_{\text{ideal}} = nRT

P_{\text{ideal}} V_{\text{ideal}} = nRT

If we substitute V_{\text{measured}} onto the LHS, since that volume is bigger that actual volume available for the gas molecules to move, the LHS will be bigger than the RHS:

P_{\text{ideal}} V_{\text{measured}} > nRT

So in order to maintain the equality, a correction term to the pressure must be subtracted:

P_{\text{ideal}} \left(V_\text{measured}-nb\right) = nRT


In other words,

V_{\text{measured}} > V_{\text{real}}

V_{\text{ideal}} = V_{\text{real}}

V_{\text{measured}} > V_{\text{ideal}}

— Me@2018-05-13 03:37:18 PM


Why? I still do not understand.


How come

P_{\text{measured}} = P_{\text{real}}


V_{\text{measured}} \ne V_{\text{real}}?


How come

V_{\text{real}} = V_{\text{ideal}}


P_{\text{real}} \ne P_{\text{ideal}}?

— Me@2018-05-13 03:22:54 PM


The above is wrong.

The “real volume” V_{\text{real}} has 2 possible different meanings.

One is “the volume occupied by a real gas”. In other words, it is the volume of the gas container.

Another is “the volume available for a real gas’ molecules to move”.


To avoid confusion, we should define

V_{\text{real}} \equiv V_{\text{measured}}

P_{\text{real}} \equiv P_{\text{measured}}


Or even better, avoid the terms P_{\text{real}} and V_{\text{real}} altogether. Instead, just consider the relationship between (P_{\text{ideal}}, P_{\text{measured}}) and that between (V_{\text{ideal}}, V_{\text{measured}}).

Whether X_{\text{measured}} is bigger or smaller than X_{\text{ideal}} ultimately depends on the assumptions and definitions used in the derivation of the ideal gas equation itself.

— Me@2018-05-13 04:15:34 PM



2018.05.13 Sunday (c) All rights reserved by ACHK


這段改編自 2015 年的對話。



E = m c^2



E = c^2 m

能量 =(光速二次方)\times 質量


1 \text{USD} \approx 8 \times 1 \text{HKD}

1 美元 \approx 8 \times 1 港元


公式中的 c^2(光速平方),角色其實正正就是,能量 E 和質量 m 之間的「貨幣兌換率」。

(而光速 c,則是時間和空間的兌換率。)

— Me@2018-05-11 09:10:00 PM



2018.05.11 Friday (c) All rights reserved by ACHK

The Sixth Sense, 3

Mirror selves, 2 | Anatta 3.2 | 無我 3.2


You cannot feel your own existence or non-existence. You can feel the existence or non-existence of (such as) your hair, your hands, etc.

But you cannot feel the existence or non-existence of _you_.

— Me@2018-03-17 5:12 PM


Only OTHER people or beings can feel your existence or non-existence.

— Me@2018-04-30 11:29:08 AM



2018.04.30 Monday (c) All rights reserved by ACHK

Quantum decoherence 8

12. On the other hand, consistent histories are just a particular convenient framework to formulate physical questions in a certain way; the only completely invariant consequence of this formalism is the Copenhagen school’s postulate that physics can only calculate the probabilities, they follow the laws of quantum mechanics, and when decoherence is taken into account, to find both the quantum/classical boundary as well as the embedding of the classical limit within the full quantum theory, some questions about quantum systems follow the laws of classical probability theory (and may be legitimately asked) while others don’t (and can’t be asked)[.]

— Decoherence is a settled subject

— Lubos Motl



2018.04.24 Tuesday ACHK

Digital physics, 8

Check whether this world is a Matrix:

Some physical results (such as Lorentz symmetry) in this universe cannot be simulated by a classical digital computer.

— Me@2011.08.21



2018.04.16 Monday (c) All rights reserved by ACHK

Logical arrow of time, 6.3

“Time’s arrow” is only meaningful when considering with respect to an observer.


c.f. the second law of thermodynamics

The direction of time is direction of losing microscopic information… by whom?


“Time’s arrow” is only meaningful when considering with respect to an observer.

— Me@2018-01-01 6:14 PM



2018.04.09 Monday (c) All rights reserved by ACHK

Density matrix, 4

Consider a system that is in a mixed state. The system has 0.3 of probability in a pure state |\psi_1 \rangle and 0.7 of probability in another pure state |\psi_2 \rangle. Then the density matrix \rho is

0.3 | \psi_1 \rangle \langle \psi_1 | + 0.7 | \psi_2 \rangle \langle \psi_2 |

In the most general cases, neither |\psi_1 \rangle nor |\psi_2 \rangle is an eigenstate. So we cannot expect that \rho is diagonal.

For example, if each of the pure state |\psi_1 \rangle and |\psi_2 \rangle is a superposition of two eigenstates (|\phi_1\rangle, |\phi_2\rangle), then

| \psi_1 \rangle = \frac{1}{\sqrt 2} |\phi_1 \rangle + \frac{1}{\sqrt 2} |\phi_2 \rangle

| \psi_2 \rangle = \frac{1}{\sqrt 3} |\phi_1 \rangle + \sqrt{\frac{2}{3}} |\phi_2 \rangle



= 0.3 | \psi_1 \rangle \langle \psi_1 | + 0.7 | \psi_2 \rangle \langle \psi_2 |

= 0.3 \left( \frac{1}{\sqrt 2} |\phi_1 \rangle + \frac{1}{\sqrt 2} |\phi_2 \rangle \right) \left( \frac{1}{\sqrt 2} \langle \phi_1 | + \frac{1}{\sqrt 2} \langle \phi_2 | \right)

+ 0.7 \left( \frac{1}{\sqrt 3} |\phi_1 \rangle + \sqrt{\frac{2}{3}} |\phi_2 \rangle \right) \left( \frac{1}{\sqrt 3} \langle \phi_1 | + \sqrt{\frac{2}{3}} \langle \phi_2 | \right)


For simplicity, assume that the eigenstates \{ |\phi_1\rangle, |\phi_2\rangle \} form a complete orthonormal set.

If we use \{ | \phi_1 \rangle, |\phi_2 \rangle \} as basis,


= 0.3 \begin{bmatrix} \frac{1}{\sqrt 2} \\ \frac{1}{\sqrt 2} \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt 2} & \frac{1}{\sqrt 2} \end{bmatrix} + 0.7 \begin{bmatrix} \frac{1}{\sqrt 3} \\ \sqrt{\frac{2}{3}} \end{bmatrix} \begin{bmatrix} \frac{1}{\sqrt 3} & \sqrt{\frac{2}{3}} \end{bmatrix}

= \frac{0.3}{2} \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} + \frac{0.7}{3} \begin{bmatrix} 1 & \sqrt{2} \\ \sqrt{2} & 2 \end{bmatrix}


— Me@2018.03.12 11:51 AM



2018.03.14 Wednesday (c) All rights reserved by ACHK

Mixed states

To me the claim that mixed states are states of knowledge while pure states are not is a little puzzling because of the fact that it is not possible to uniquely recover what aspects of the mixed state are subjective and what aspects are objective.

The simple case is this:

Let’s work with a spin-1/2 particle, so there are states:

|0 \rangle
|1 \rangle
|+ \rangle = \frac{1}{\sqrt{2}} \left( |0 \rangle + |1 \rangle \right)
|- \rangle = \frac{1}{\sqrt{2}} \left( |0 \rangle - |1 \rangle \right)

The mixed state corresponding to 50% |0> + 50% |1> is the SAME as the mixed state corresponding to 50% |+> + 50% |->.

— Daryl McCullough

— Comment #13 November 19th, 2011 at 2:00 pm

— The quantum state cannot be interpreted as something other than a quantum state


\frac{1}{2}_c | + \rangle \langle + | + \frac{1}{2}_c | - \rangle \langle - |

=\frac{1}{2}_c \left( \frac{1}{\sqrt{2}}_q | 0 \rangle + \frac{1}{\sqrt{2}}_q | 1 \rangle \right) \left( \frac{1}{\sqrt{2}}_q \langle 0 | + \frac{1}{\sqrt{2}}_q \langle 1 | \right)+ \frac{1}{2}_c \left( \frac{1}{\sqrt{2}}_q | 0 \rangle - \frac{1}{\sqrt{2}}_q | 1 \rangle \right) \left( \frac{1}{\sqrt{2}}_q \langle 0 | - \frac{1}{\sqrt{2}}_q \langle 1 | \right)

=\frac{1}{2}_c \frac{1}{\sqrt{2}}_q \frac{1}{\sqrt{2}}_q \left( | 0 \rangle + | 1 \rangle \right) \left( \langle 0 | + \langle 1 | \right)+ \frac{1}{2}_c \frac{1}{\sqrt{2}}_q \frac{1}{\sqrt{2}}_q \left( | 0 \rangle - | 1 \rangle \right) \left( \langle 0 | - \langle 1 | \right)

=\frac{1}{2}_c \frac{1}{2}_q \left( | 0 \rangle + | 1 \rangle \right) \left( \langle 0 | + \langle 1 | \right) + \frac{1}{2}_c \frac{1}{2}_q \left( | 0 \rangle - | 1 \rangle \right) \left( \langle 0 | - \langle 1 | \right)

=\frac{1}{2}_c \frac{1}{2}_q \left( | 0 \rangle \langle 0 | + | 1 \rangle \langle 1 | + | 0 \rangle \langle 0 | + | 1 \rangle \langle 1 | \right)

=\frac{1}{2}_c \frac{1}{2}_q \left( 2_c | 0 \rangle \langle 0 | + 2_c | 1 \rangle \langle 1 | \right)

= \frac{1}{2}_q | 0 \rangle \langle 0 | + \frac{1}{2}_q | 1 \rangle \langle 1 |

— Me@2018-03-11 03:14:57 PM


How come the classical probabilities \frac{1}{2}_c of a density matrix in one representation can become quantum probabilities \frac{1}{2}_q in another?

\frac{1}{2}_c | + \rangle \langle + | + \frac{1}{2}_c | - \rangle \langle - | = \frac{1}{2}_q | 0 \rangle \langle 0 | + \frac{1}{2}_q | 1 \rangle \langle 1 |

1. Physically, whether we label the coefficients as “classical probabilities” or “quantum probabilities” gives no real consequences. The conflict lies only in the interpretations.

2. The interpretation conflict might be resolved by realizing that probabilities, especially classical probabilities, is meaningful only when being with respect to an observer.

For example,

\frac{1}{2}_c | + \rangle \langle + | + \frac{1}{2}_c | - \rangle \langle - | = \frac{1}{2}_q | 0 \rangle \langle 0 | + \frac{1}{2}_q | 1 \rangle \langle 1 |

represents the fact that the observer knows that the system is either in state |+\rangle \langle+| or |-\rangle \langle-|, but not |0 \rangle \langle 0| nor |1 \rangle \langle 1|.


\frac{1}{2}_c | 0 \rangle \langle 0 | + \frac{1}{2}_c | 1 \rangle \langle 1 |

represents the fact that the observer knows that the system is either in state |0 \rangle \langle 0| or |1 \rangle \langle 1|, but not |+\rangle \langle+| nor |-\rangle \langle-|.

— Me@2018-03-13 08:10:46 PM



2018.03.14 Wednesday (c) All rights reserved by ACHK

機遇再生論 1.6





假設,你現在手中,有一副樸克牌,存在於某一個排列 A 。洗牌一次之後,排列仍然是 A 的機會極微。

一副完整的撲克牌,共有 N = 52! \approx 8.07 \times 10^{67} 個,可能的排列。亦即是話,洗牌後仍然是排列 A 的機會率,只有 \frac{1}{N}

由於分母 N 太大(相當於 8 之後,還有 67 個位),洗牌後,理應變成另外一個排列 B 。

P(A) = \frac{1}{N}

P(\text{not} A) = 1 - \frac{1}{N}

洗了一次牌後,發覺排列是 B 不是 A 後,我們可以再問,如果再洗一次牌,「是 A」和「不是 A」的機會,分別是多少?


由於,機會率只是與未知的事情有關,或者說,已知的事件,發生的機會率必為 1;所以,如果發生了第一次洗牌,而你又知道其結果的情況下,問「如果再洗一次牌,『是 A』和『不是 A』的機會,分別是多少」,第二次洗牌各個可能結果,發生的機會率,與第一次洗牌的結果無關。

第二次洗牌結果為組合 A 的機會率,仍然是

P(A) = \frac{1}{N}

不是組合 A 的機會率,仍然是

P(\text{not} A) = 1 - \frac{1}{N}





「如果洗牌兩次,起碼一次洗到原本排列 A 的機會率是多少?」

把該事件標示為 A_2

A_2 = 兩次洗牌的結果,起碼一次洗到原本排列 A

再把該事件的機會率,標示為 P(A_2)

由於 P(A_2) 相對麻煩,我們可以先行運算其「互補事件」的機會率。

A_2 的互補事件為「不是 A_2」:

不是 A_2

= 兩次洗牌的結果,不是起碼一次洗到原本排列 A

= 兩次洗牌的結果,都不是排列 A


P(\text{not} A_2) = (1 - \frac{1}{N})^2


= 1 - P(\text{not} A_2)
= 1 - (1 - \frac{1}{N})^2



如果洗牌 m 次,起碼一次洗到原本排列 A 的機會率是多少?


P(A_m)= 1 - (1 - \frac{1}{N})^m

留意,N = 52! \approx 8.07 \times 10^{67},非常之大,導致 (1 - \frac{1}{N}) 極端接近 1。在一般情況,m 的數值還是正常時, P(A_m) 會仍然極端接近 0。

例如,你將會連續洗一千萬次牌(m = 10,000,000),起碼有一次,回到原本排列 A 的機會是:

= 1 - (1 - \frac{1}{N})^m
= 1 - (1 - \frac{1}{52!})^{10,000,000}

你用一般手提計算機的話,它會給你 0。你用電腦的話,它會給你

1.239799930857148592 \times 10^{-61}

— Me@2018-01-25 12:38:39 PM



2018.02.13 Tuesday (c) All rights reserved by ACHK

Logical arrow of time, 6.2

Source of time asymmetry in macroscopic physical systems

Second law of thermodynamics



Physics is not about reality, but about what one can say about reality.

— Bohr

— paraphrased



Physics should deduce what an observer would observe,

not what it really is, for that would be impossible.

— Me@2018-02-02 12:15:38 AM



1. Physics is about what an observer can observe about reality.

2. Whatever an observer can observe is a consistent history.

observer ~ a consistent story

observing ~ gathering a consistent story from the quantum reality

3. Physics [relativity and quantum mechanics] is also about the consistency of results of any two observers _when_, but not before, they compare those results, observational or experimental.

4. That consistency is guaranteed because the comparison of results itself can be regarded as a physical event, which can be observed by a third observer, aka a meta observer.

Since whenever an observer can observe is consistent, the meta-observer would see that the two observers have consistent observational results.

5. Either original observers is one of the possible meta-observers, since it certainly would be witnessing the comparison process of the observation data.

— Me@2018-02-02 10:25:05 PM




2018.02.03 Saturday (c) All rights reserved by ACHK

機遇再生論 1.5



是句「科學句」(經驗句),因為你知道在什麼情境下,可以否證到它 —— 如果你在甲過身後,等了一千億年,甲還未重生的話,那句就為之錯。













假設,你現在手中,有一副樸克牌,存在於某一個排列 A 。洗牌一次之後,排列仍然是 A 的機會極微。

一副完整的撲克牌,共有 N = 54! = 2.3 \times 10^{71} 個,可能的排列。亦即是話,洗牌後仍然是排列 A 的機會率,只有 \frac{1}{N}

由於分母 N 太大(相當於 2 之後,還有 71 個位),洗牌後,理應變成另外一個排列 B 。

P(A) = \frac{1}{N}

P(not A) = 1 - \frac{1}{N}

— Me@2017-12-18 02:51:11 PM
2017.12.18 Monday (c) All rights reserved by ACHK


    The miracle of the appropriateness of the language of mathematics for the formulation of the laws of physics is a wonderful gift which we neither understand nor deserve.

    A possible explanation of the physicist’s use of mathematics to formulate his laws of nature is that he is a somewhat irresponsible person. As a result, when he finds a connection between two quantities which resembles a connection well-known from mathematics, he will jump at the conclusion that the connection is that discussed in mathematics simply because he does not know of any other similar connection.

— The Unreasonable Effectiveness of Mathematics in the Natural Sciences

— E. P. Wigner

2017.10.07 Saturday ACHK

Uncertainty Principle 8

EPR paradox for entangled particles

Bohr was compelled to modify his understanding of the uncertainty principle after another thought experiment by Einstein. In 1935, Einstein, Podolsky and Rosen (see EPR paradox) published an analysis of widely separated entangled particles. Measuring one particle, Einstein realized, would alter the probability distribution of the other, yet here the other particle could not possibly be disturbed. This example led Bohr to revise his understanding of the principle, concluding that the uncertainty was not caused by a direct interaction.

But Einstein came to much more far-reaching conclusions from the same thought experiment. He believed the “natural basic assumption” that a complete description of reality, would have to predict the results of experiments from “locally changing deterministic quantities”, and therefore, would have to include more information than the maximum possible allowed by the uncertainty principle.

In 1964, John Bell showed that this assumption can be falsified, since it would imply a certain inequality between the probabilities of different experiments. Experimental results confirm the predictions of quantum mechanics, ruling out Einstein’s basic assumption that led him to the suggestion of his hidden variables. Ironically this fact is one of the best pieces of evidence supporting Karl Popper’s philosophy of invalidation of a theory by falsification-experiments. That is to say, here Einstein’s “basic assumption” became falsified by experiments based on Bell’s inequalities.

While it is possible to assume that quantum mechanical predictions are due to nonlocal, hidden variables, and in fact David Bohm invented such a formulation, this resolution is not satisfactory to the vast majority of physicists. The question of whether a random outcome is predetermined by a nonlocal theory can be philosophical, and it can be potentially intractable. If the hidden variables are not constrained, they could just be a list of random digits that are used to produce the measurement outcomes.

— Wikipedia on Uncertainty principle

2017.01.18 Wednesday ACHK

Superposition always exist

A Non-classical Feature, 2

superposition ~ linear overlapping

~ f(ax + by) = a f(x) + b f(y)

Reality is a linear overlapping of potential realities, although different components may have different weightings.

Superposition always exists, if it exists at the beginning of a process.

So the expression “the wave function collapses and the superposition ceases to exist” does not make sense. 

Superposition always exist; interference (pattern) does not.

For a superposition to have an interference pattern, the two (for example) component eigenstates need to have a constant phase difference.

In other words, they have to be coherent.

superposition without an interference pattern

~ microscopically decoherent component states

~ macroscopically a classical state

— Me@2016-09-01 4:42 AM

2016.11.27 Sunday (c) All rights reserved by ACHK