A question about type of semiconductor I have a confusion regarding the semiconductors. 
Is the type of doping the only factor to decide what type of semiconductor we will get? For example:


*

*doping of Si with phosphorus $\Longrightarrow$ n-type semiconductor

*doping of Si with aluminum   $\Longrightarrow$ p-type semiconductor


Can a semiconductor be n-type (or p-type) without any doping at all ? If yes can we call such type of semiconductor intrinsic semiconductor?
The reason I am asking this question is that in many papers reporting the bandstructures of semiconductors, many of them have the Fermi level displaced from the center of the band gap even without application of any doping whatsoever. For example see this paper https://www.nature.com/articles/s41598-020-64866-9.pdf
The Figure 4a is for pure $B_4N4$. Inspite of being pure material without any doping the Fermi  level is not at the center of the band gap. How can we explain this?
 A: 
Can a semiconductor be n-type (or p-type) without any doping at all ?

No. If a semiconductor has no doping at all, at a given temperature some electrons will be thermally exited and will have enough energy to make a transition from the valence band to the conduction band (at $T=0\ K$ there are no electrons in the conduction band). These electrons will leave holes in the valence band. The number of holes in the valence band will be the same as the number of electrons in the conduction band, because a hole in the valence band is just the absence of an electron. This is why we say that electrons and holes are created in pairs. So in this case $n=p$ and the semiconductor is intrinsic.

Is the type of doping the only factor to decide what type of semiconductor we will get?

Yes and no. Let me explain:


*

*Some atoms, when introduced as impurities in a semiconductor, can create both acceptor and donor levels inside the band gap. For example, in silicon doped with copper or gold, some atoms of copper/gold can act as donors and some as acceptors.

*Even in the simplest case where the impurity only acts as donor or acceptor, the fraction of doping atoms that are ionized depends on temperature. Following your example, in silicon doped with phosphorus, the phosphorus acts as a donor, meaning it can lose an electron if the temperature is high enough. At low temperatures, only a fraction will be ionized, but all the electrons in the conduction band come from the impurities because the energy at which these electrons are is very close to the conduction band, whereas the valence band is far away (type-N silicon). At room temperature, practically all the impurities are ionized and some (very few) electrons from the valence band start to go to the conduction band and therefore some holes start to appear in the valence band. You see that there are many electrons in the CB, but very few holes in the VB (still type-N silicon). If the temperature is even higher, there will be a point in which the number of electrons that come from the VB exceed in number to those that come from the impurities. At that moment the semiconductor starts to become intrinsic again and for higher temperatures we can consider it intrinsic because $n$ and $p$ will be very large compared to the ionized phosphorus atoms and the impurities don't play a role anymore.


I think that in the graph they refer to the Fermi energy, not the Fermi level. The Fermi energy is the energy of the highest occupied state at $0$ K. In a semiconductor that energy is the maximum of the valence band. The Fermi level would be the level which makes the Fermi-Dirac distribution 1/2 and it is defined at all temperatures.
A: The Fermi level is only in the middle of the band gap if A) the system is at zero temperature or B) if the electron and hole effective mass are the same. This is such a common question here that I have even memorized a reference: Robert Pierret's Semiconductor Device Fundamentals section 2.5 in general and 2.5.6 in specific.
The Fermi level is a function of temperature (see above reference), so it is almost never put at zero energy on band structure plots.
Out of curiosity, why do you think that the Fermi level needs to be in the middle of the gap? I'm really curious where this misconception comes from. Do bad teachers tell people this? Do people just assume it? Confusion between Fermi level and Fermi energy?
