# Materials in Electronics/The Aufbau Principle
## Pauli Exclusion Principle

The Pauli Exclusion Principle states that no two fermions (particles with half-integer spin such as electrons, protons, neutrons) can have identical wavefunctions. This principle follows from the definition of the rotation operator in quantum mechanics, and the derivation is outside the scope of this book. More information can be found on the Wikipedia page.
What this means for a quantum well (in any number of dimensions) is that for each quantum state, there can be only two electrons - one spin-down and one spin-up.

## Aufbau Principle

The Aufbau Principle, from the German for "build up", states that electrons in a well tend to occupy the lowest available energy levels first, before occupying higher levels. Before a higher state is used, the lowest state will have both a spin-up and spin-down electron in it.

### 1-Dimensional Wells

The digram below shows a 1D quantum well being filled by electrons. The electron are represented by a upwards arrow for spin-up and downward arrow for spin down. States with just one occupying electron are yellow and states with two are red.
When a state has only one electron, it could be either spin-up or spin-down. However, according the Pauli Exclusion Principle, when there are two in a state, there must be one of each.

### 2-Dimensional Wells

When we have a 2-dimensional well, we can plot all the possible states in a 2D array. This is called the state space. The digram below showns a quantum well containing 39 electrons (19 full states, and one half-full state):
The energy of a given state is given by:
       $E_{n_{x},n_{y}}$ $=\,$ ${\frac {\hbar ^{2}}{2m}}\left[\left({\frac {n_{x}\pi }{L}}\right)^{2}+\left({\frac {n_{y}\pi }{L}}\right)^{2}\right]$ $=\,$ ${\frac {\hbar ^{2}\pi ^{2}}{2mL^{2}}}\left(n_{x}^{2}+n_{y}^{2}\right)$
Notice that the distance from the origin to the state in state space is given by the Pythagorean Theorem:
       $d={\sqrt {n_{x}^{2}+n_{y}^{2}}}$
This means that the energy of a state is proportional to the square of the distance from origin in state space. By the Aufbau Principle, the states closest to the origin fill with electrons first.

### Degeneracy and Hund's Rule

Now, consider the two wavefunctions ψ$_{1,2}$ and ψ$_{2,1}$ in a square 2D box. The wavefunctions are given by:
       $\psi _{n_{x},n_{y}}=\psi _{0}\sin \left({\frac {n_{x}\pi x}{L}}\right)\sin \left({\frac {n_{y}\pi y}{L}}\right)$
The wavefunctions, along with their associated energies, are shown below:
| $z=\psi _{1,2}\,$ | $z=\psi _{2,1}\,$ |
| $E_{1,2}={\frac {\hbar ^{2}}{2m}}\left[\left({\frac {\pi }{L}}\right)^{2}+\left({\frac {2\pi }{L}}\right)^{2}\right]$ | $E_{2,1}={\frac {\hbar ^{2}}{2m}}\left[\left({\frac {2\pi }{L}}\right)^{2}+\left({\frac {\pi }{L}}\right)^{2}\right]$ |
We can easily see that the two energies are the same. Wavefunctions with the same energies are said to be degenerate. When the well is filling, neither one of these states will be prefered over the other for getting the first electron. However, once one state has one electron, a principle called Hund's Rule states that the other state will get the next electron before the first state receives its second. Thus, only one state is ever half-filled at one time.