☕ Welcome to The Coder Cafe! Today, we explore quantum physics. Not the abstract kind, but the kind that runs inside the device you are reading this on. Indeed, every time you save a file to an SSD, electrons exploit quantum physics to cross a physical barrier they classically have no business crossing. I’m not a physicist, but I’ve been in love with quantum physics for years, and over the last few months I've gone deep into these concepts. Get cozy, grab a coffee, and let’s begin!
An Introduction to Matter
To start, what is matter? Matter is made up of molecules, and molecules are assemblages of atoms, the building blocks of matter. For example, water is an H₂O molecule: 2 hydrogen atoms and 1 oxygen atom.
An atom is itself composed of a nucleus and electrons, which carry a negative charge and orbit around it.
The nucleus contains two types of particles:
Protons, which carry a positive charge, naturally repel each other.
And neutrons, which carry no electric charge and act as a kind of “glue,” helping to keep the nucleus stable.
The attraction between electrons (−) and protons (+) keeps the whole thing in a stable state.
On the other hand, too few or too many neutrons relative to the protons, and the nucleus becomes unstable. It will eventually decay by emitting energy. This is the principle of radioactivity. Carbon-14, for example, is slightly unstable. It decays slowly and predictably. This predictability allows it to be used as a clock to date ancient elements.
One might think that when touching a solid object, like a table, for instance, what gives the table its solidity is that it is “filled” with matter, preventing our finger from passing through. Yet, if we took the nucleus and enlarged it into a marble and placed that marble on a football pitch, the electrons would be orbiting at the level of the stands.

An atom is therefore almost entirely empty. Solid matter is almost nothing, and what gives this impression of solidity are forces between atoms called electromagnetic forces.
The Fundamental Forces in the Universe
The universe is made up of 4 and only 4 fundamental forces:
Gravity: Attracts everything with mass toward everything else with mass.
The strong nuclear force: It glues protons and neutrons together inside the nucleus.
The weak nuclear force: Responsible for certain radioactive decays. It is what allows a neutron to transform into a proton (or vice versa).
And the electromagnetic force.
If we focus on this last one, it is the one that:
Attracts opposite charges
And repels identical charges.
Unlike the two nuclear forces, which only act inside the nucleus, the electromagnetic force has an infinite range. That is why it is the one that governs interactions between atoms at our scale.
It is therefore the electromagnetic force that creates the illusion of solidity. When we touch a table, it is the electrons in our hand and those in the table that repel each other. We never truly touch anything.
Light: Wave and Particle
Let’s now talk about light. So, what is light? It is an electromagnetic wave, a disturbance of the electric and magnetic fields that propagates through space.
Light is a spectrum. Indeed, so-called visible light, the light our eyes can perceive, is only a tiny portion of what exists. The full spectrum is called the electromagnetic spectrum:
Radio wave → Microwave → Infrared → Visible light → UV → X-rays → Gamma rays
When a radio picks up radio waves, it is therefore picking up light, invisible due to its frequency. Indeed, what varies across the electromagnetic spectrum is the frequency of the wave, and therefore its energy.
But light hides a surprise: it is also a particle.
NOTE: A particle can be summarized as follows: an indivisible packet of energy.
We know it is a particle thanks to Einstein in 1905 (for which he received his only Nobel Prize, not for relativity). When a light bulb emits light, it emits specific particles called photons.
When we vary the intensity of that light bulb, one might assume it is the energy of the photon that varies, but that is not the case. The energy of each photon is fixed by its frequency. The higher the frequency of a photon, the more energetic each photon is. That is why, for example, UV rays burn the skin.
What makes a light bulb emit more light is the increase in electric voltage, which therefore produces more photons. It is the quantity of photons that makes a light bulb shine more or less.
In flight, the photon behaves like a wave: it propagates, it oscillates, and it can interfere with other photons. But when it comes into contact with matter, it behaves like a particle: it interacts in one single hit, in one single place.
When a photon collides with matter, it can either be:
Absorbed: The photon ceases to exist. Its energy is transferred to an atom, which moves to a higher energy level. This is what an eye does: it absorbs the photon and converts it into an electrical signal.
Reflected: Technically, this is not a true reflection because it is not the same photon that leaves. The atom absorbs the photon and then re-emits a photon of the same energy in a different direction.
NOTE: What determines whether a photon is absorbed or reflected depends on the energy levels of the electrons in the atoms of the surface. If the photon’s frequency matches an available energy level, the atom absorbs it. Otherwise, the photon is re-emitted. That is why glass is transparent, why the retina absorbs light, and why a mirror reflects almost everything.
The Young’s Double-Slit Experiment
We have seen that light is a wave. But how do we know this? This is where Young’s double-slit experiment comes in, and it is this very experiment that will lay the foundations of quantum physics.
Young’s experiment, carried out for the first time in 1801, is as follows:
A laser projects photons (light)
A wall with two small slits, A and B
A screen behind to detect where the photons land
If light were a “packet” of something, we would see the following result:

Yet, the result of Young’s double-slit experiment is as follows:

We obtain what is called an interference pattern. The wave passes through both slits simultaneously, splits into two, and these two waves meet on the other side.

When two waves meet, they add up or cancel out depending on their respective phase:
Two crests meeting → they add up → bright zone
A crest meeting a trough → they cancel out → dark zone
The result is an alternating pattern of bright and dark bands on the screen: that is an interference pattern.
What If We Did the Same With Matter?
In the 20th century, researchers then had an idea: apply Young’s experiment no longer by projecting photons (light) but electrons (matter). The experiment is therefore similar, but instead of a laser, an electron gun is used to then measure on the screen where the matter lands.
Obviously, with this experiment, we are going to get two bands of matter, right?
Well, still no! An interference pattern is observed as well. This result was not a complete surprise to everyone. In 1924, physicist Louis de Broglie had already theoretically proposed that matter, like light, could have a wave-like nature. But this time, it's not a wave-like light; it's a probability wave.
This is one of the greatest discoveries in quantum physics: at the atomic level, the particle has no defined position. The position of a particle is determined by a function called the wave function, ψ(x), which describes the probabilities of finding that particle at a given location in time.

A small clarification on this concept of undefined position to make sure the concept is clear, because this is the moment where our rational brain can start to “let go.”
Let’s take a coin for a coin toss. We throw it in the air and hide the result. We are in a state of uncertainty, but this uncertainty is called epistemic. We do not know the result (heads or tails) because we have not looked yet, yet that result already exists.
For a particle in the quantum world, the uncertainty is called ontological. It is not that we lack information about the position of the particle; it is that this position simply does not exist yet. This is what is called quantum superposition: an unmeasured particle exists in multiple states simultaneously.
However, measurement changes everything. When we measure the position of a particle, we will find it in one of the possible positions described by the wave function. We then say that the wave function “collapses” because it restricts the possibilities into a single real state.

As an analogy, it is a bit like Minecraft. A default Minecraft map is 60 million x 60 million blocks. For the initial loading, the server does not generate the entire map. It only generates the world around the observer, i.e., the player. However, when the player moves, they force the server to generate the world's continuation.
Where this analogy reaches its limits is that the generation of the Minecraft world, even if it is random, is still deterministic because each world has its own seed. The quantum world, on the other hand, appears to be purely random, meaning without hidden information.
Let’s return to Young’s experiment. What would happen if, when a particle passes through a slit, we placed a detector there to observe which slit the particle goes through? We recall that a wave passes through both slits at once.

This is the moment where the brain completely lets go: observing the particle changes the result of the experiment. Indeed, observing that particle “forces” it to have a defined position, and it then behaves like a classical marble. The result, therefore, gives us two bands of matter.
To summarize what we have seen so far: an unobserved particle exists as a probability wave, in multiple positions simultaneously. As soon as we measure it, this wave collapses, and the particle ends up at a precise location.
But then, why do we never see this in everyday life? The answer is decoherence.
Decoherence
Quantum superposition is only possible as long as a particle remains isolated from its environment. As soon as it interacts with anything, another atom, a photon, an electric field, that interaction constitutes a measurement in the quantum sense. The wave function collapses, and the particle ends up in a precise state.
An isolated electron in a vacuum can remain in superposition. But a macroscopic object like a table is made up of billions upon billions of atoms that permanently interact with the surrounding air, light photons, and electromagnetic fields. These interactions occur billions of times per second. The superposition collapses instantaneously before we can even observe it.
That is why quantum physics is only observable at the atomic scale. And that is also why a single electron in a transistor behaves very differently from an object we can hold in our hand.
The Key is Information
OK, so the original Young’s experiment with light produces an interference pattern because light is a wave. The variation with electrons (or indeed subsequently other elements such as atoms) also produces an interference pattern, which proves that matter is a wave, but this time a probability wave. When we measure the result, we change the result of the experiment because we force the particle to “choose” its position.
But incidentally, how does this measurement work in the experiment? It works thanks to photons. Indeed, when the electron passes through one of the slits, we project a photon which will interact with the electron and be re-emitted in a direction that allows us to deduce which slit the electron went through.
Researchers wanted to know what would happen if they performed the exact same experiment, measuring which slit the particle went through, but this time, instead of reading the information encoded in the orientation of the photon, they destroyed that information.
And here, another surprise: if we destroy the information, we return to an interference pattern. It was as if, since we were not using that information, there was nothing forcing the particle to choose which slit to go through, and so it could remain in the form of a probability wave.
This new experiment, therefore, demonstrates something fundamental in quantum physics: technically, it is not the act of measuring that influences the experiment, but whether or not this information exists somewhere in the universe. If this information is destroyed, the interference pattern returns.
The key is therefore information.
NOTE: How does the destruction of this information work? One might think it would simply be a matter of having the photon absorbed by an absorbing surface before reading it, but this does not work, and we are left with bands. Indeed, by doing so, the information theoretically exists because the absorbing surface could have determined the position of the particle through the orientation of the photon. The destruction works with another incredible principle of quantum physics that I will not detail in this article: entanglement. The photon is sent onto a special crystal, which splits it into two twin photons quantumly linked. One of the twins is then destroyed, making the information unrecoverable because to read the information, one absolutely needs to read both twins. To simplify, the two twins are not copies; they form a single system whose properties are not individually defined.
The Tunnel Effect
We are slowly getting closer to SSDs. But before that, there is one last quantum concept we need to talk about: the tunnel effect.
We said that an unobserved electron does not exist like a marble at a precise location. It exists as a probability wave spread out in space. This wave function gives a probability of finding the electron at each point in space.
Now let’s imagine a physical barrier. We send an electron toward this barrier. Classically, if the electron does not have enough energy to pass over it, it is blocked. Full stop.
Yet quantum mechanically, the wave function of the electron does not stop abruptly at the barrier. Because it is a wave, it propagates and gradually decays through the barrier. It does not fall to zero. On the other side, there therefore remains a non-zero probability of finding the electron.
This is the tunnel effect: a real chance for the electron to end up on the other side, without having had the classical energy needed to cross.
This probability is not fixed. It depends directly on the thickness of the barrier: the thinner the barrier, the more the wave function survives on the other side, and the higher the tunneling probability. At our scale, the barriers are far too thick for this effect to be observable. But at the scale of a few nanometers, the probability exists.
How SSDs Use Quantum Physics
In an SSD, we want to store data. They work with bits, but it is precisely in the management of these bits that the principles of quantum physics come into play.
In an SSD, each bit is encoded in cells called floating gates: small zones isolated on all sides by an insulating layer. This box can contain electrons or not:
Box with electrons: Bit = 0
Box without electrons: Bit = 1

If we need:
To write, we therefore need to make electrons enter this isolated box. What we do is apply an electric voltage that deforms the wave function of the electrons and increases their probability of ending up on the other side. The electrons, therefore, cross the barrier via the tunnel effect.
To erase, we apply a reverse voltage, which also impacts the wave function, and the electrons cross in the other direction.
To read, it is a classical, non-quantum measurement: we measure the electric current passing through the transistor.
Electrons present: weak current: 0.
No electrons: strong current: 1.
We saw, however, that the wave function gives a probability, not a certainty. If we apply a voltage to write or erase, we therefore only have a probability that the electron will cross the barrier.
How can an SSD be reliable then? An individual electron is unpredictable, but we never send just one electron. We send millions simultaneously. Statistically, enough of them cross the barrier to charge the floating gate reliably.
And after each write, the controller immediately re-reads the cell to verify. If not enough electrons have crossed, it tries again. That is why SSDs embed error correction mechanisms, ECC (Error Correcting Code), precisely because the process is probabilistic by nature.
When a cell exceeds a certain error threshold over time, it is finally marked as defective and taken out of service. The data it held is moved to a healthy cell.
That is why SSDs always have an over-provisioning capacity: a reserve of cells invisible to the user, planned from the manufacturing stage to replace defective cells over time. And that is also why an SSD does not fail all at once; it degrades progressively, cell by cell, until the reserve is exhausted.
And this is where quantum physics imposes its limits. The more transistors shrink, the thinner the insulating barriers become, and the more the tunnel effect becomes uncontrollable, electrons escape spontaneously, errors increase, and cells age faster. Moore’s Law, which predicts a doubling of transistor density every two years, is today running up against these fundamental physical limits. This is not an engineering problem: it is quantum physics that sets the boundary.
Summary
Matter is made up of atoms, themselves composed of a nucleus (protons and neutrons) and electrons. An atom is almost entirely empty: what we perceive as “solid” is an illusion created by the electromagnetic forces between atoms.
Light is both an electromagnetic wave and a particle called a photon. In flight, it behaves like a wave, but it is emitted and absorbed like a particle, in one single hit, in one single place.
Young’s double-slit experiment proves that light is a wave: it produces an interference pattern, impossible to obtain with classical particles.
Matter behaves in the same way. But unlike light, its wave is not physical: it is a probability wave that describes the possible positions of a particle. This is quantum superposition: an unmeasured particle exists in multiple states simultaneously.
It is not the act of measuring that collapses the superposition: it is the existence of the information somewhere in the universe. If the information is destroyed, the superposition is restored.
Decoherence explains why we never see superposition at our scale: any macroscopic object permanently interacts with its environment, which instantaneously collapses its wave function.
The tunnel effect is a direct consequence of the wave-like nature of particles: the wave function of an electron does not stop abruptly at a physical barrier. There exists a non-zero probability of finding it on the other side, without having had the classical energy to cross.
SSDs exploit the tunnel effect to write and erase data: an electric voltage deforms the wave function of electrons and increases their probability of crossing the insulating barrier of a floating gate. Reliability rests on the large number of electrons sent and on ECC.
Resources
More From the Systems Category
Sources
Explore Further
The Double-Slit Experiment - Veritasium
❤️ If you enjoyed this post, please hit the like button.
💬 Did you know quantum physics was hiding in your laptop all along? I’d love to hear your reaction in the comments.




