  Polyyne, a sp1-hybridized linear allotrope of carbon, has a tunable
quasiparticle energy gap, which depends on the terminated chemical ending
groups as well as the chain length. Previously, nitrogen doping was utilized to
tailor the properties of different kinds of allotrope of carbon. However, how
the nitrogen doping tailors the properties of the polyyne remains unexplored.
Here, we applied the GW method to study the quasiparticle energy gaps of the
N-doped polyynes with different lengths. When a C atom is substituted by a N
atom in a polyyne, the quasiparticle energy gap varies with the substituted
position in the polyyne. The modification is particularly pronounced when the
second-nearest-neighboring carbon atom of a hydrogen atom is substituted. In
addition, the nitrogen doping makes the Fermi level closer to the lowest
unoccupied molecular orbital, resulting in a n-type semiconductor. Our results
suggest another route to tailor the electronic properties of polyyne in
addition to the length of polyyne and the terminated chemical ending groups.
