This question is directly related to two other questions:
The question is based on the premise that, unlike the tweet referred to from Mr Crawford in answer two, the DM permits the unusual case of the variant familiar imp or pseudodragon, an situation that has informed numerous questions and answers on this SE regarding the use of that variant familiar by PCs.
This is not a dupe of the summoned creatures question, since these two familiars cannot be summoned by a spell, and that question is about creatures summoned by a spell. That is why I asked this question: it is an edge case, an unusual case.
The imp, quasit, and pseudodragon variant familiar as described in the Monster Manual are treated as NPCs. Because NPCs who aid a party during an encounter get a share of XP (DMG, p. 260) it would seem that those unique familiars would be expected to earn/share XP with the party whenever (1) XP is awarded and (2) they were present and participating in the event. Other familiars, being not NPC's, but instead the results of a summoning spell, would not.
On the other hand, the variant familiars are not described as having class levels, nor levels of experience, so it's unclear why they would have or earn XP.
The variant familiar information in the Monster Manual for quasit, imp, and pseudodragon are on MM pages p. 63, 76, and 254.
Does the party have to share XP with an imp, quasit, or pseudodragon variant familiar who is serving one of the party members as a familiar? While I suspect that the answer is no, I am open to understanding why the answer would be yes.