The first lesson of quantum mechanics: the question asked determines the answer obtained. Light and electrons behave as waves when tested for wave behavior, and as particles when tested for particle behavior.
The same pattern appears in many systems where the query shapes the result.
Quantum objects don’t carry a fixed “wave” or “particle” label. Their behavior depends on the experimental setup — on how they are probed.
Consider a data structure that presents different interfaces depending on how it is queried: iterated, it behaves like a stream; indexed into, it behaves like an array; tested for membership, it behaves like a set.
The data structure doesn’t secretly “become” a stream or an array. It simply responds to the query.
An API hides implementation behind an interface — but the implementation is fixed. A quantum object has no fixed implementation. There is no underlying “real” nature being hidden. The measurement context is part of the physics.
This is the core strangeness: it’s not abstraction. It’s ontology.
Fire electrons one at a time at a barrier with two slits. Detect them on a screen behind.
The act of determining which slit the electron passed through destroys the wave pattern.
A clumsy detector is not required to destroy interference. Even a subtle interaction that could in principle reveal which slit the electron took is enough. If path information is available anywhere in the universe, the interference pattern disappears.
This is why “observation” in quantum mechanics doesn’t mean a conscious observer. It means any physical interaction that correlates the system’s path with another degree of freedom.
Einstein showed that light ejects electrons from metal surfaces in a way only explainable if light arrives in discrete packets — photons. Increasing light intensity (more photons) ejects more electrons, but only increasing frequency (energy per photon) ejects faster ones.
The same light that produces interference fringes (wave) also kicks out electrons one photon at a time (particle).
Niels Bohr formalized this with the complementarity principle: wave and particle descriptions are mutually exclusive but both necessary.
No experiment can be designed that reveals full wave behavior and full particle behavior simultaneously. The experimental setup that shows one necessarily hides the other.
A conflict-free replicated data type (a data structure designed so that independent replicas converge to the same state without coordination) can support multiple query patterns:
This is not a perfect analogy — quantum complementarity is more fundamental — but it captures the key idea: the interface used constrains what can be observed, and the constraints are not design choices. They are structural.
Quantum Key Distribution (QKD) exploits duality for security. An eavesdropper trying to read quantum-encoded bits must choose a measurement basis. Choosing the wrong basis disturbs the state — and the legitimate parties detect the intrusion.
Security comes from the physics: an unknown quantum state cannot be cloned (the no-cloning theorem), and measurement is irreversible.
This lesson establishes:
Next: Superposition