What's the quantum origin of electric polarization? In electrostatics, the polarization vector $\vec{P}$ is introduced as the sum of dipoles in materials. But from the viewpoint of microscopic, the dipole is ill-defined due to all materials are discretized. So how can we understand the origin of the polarization vector $\vec{P}$ with consideration of the nature of the discretization of the real materials? 
 A: You are right, that the medium is made of quantum systems which have to be treated accordingly. When you consider every individual molecule/atom in your material the induced polarization at that individual molecule/atom is given by the induced dipole moment $d(t)$, which is well defined via 
$$
d(t) = \langle \psi(t) | \hat d | \psi(t) \rangle,
$$
where $\hat d$ is the dipole operator. Thus the polarization of your medium is
$$
P (t) = \sum_i N_i \langle \psi_i(t) | \hat d | \psi_i(t) \rangle,
$$ 
where we have introduced the number density of the molecules/atoms $N_i$ in the state $|\psi_i(t)\rangle$ ($N_i$ is typically Boltzmann-distributed). And the sum $\sum_i$ accounts for the initial incoherent distribution of different states to describe the overall polarization averaged over this distribution. 
At a side note, I also want to mention that the material may be discrete, but, in classical electrostatics your polarization, as the sum of dipoles, is already discrete. A dipole essentially consist of two opposite charges at some distance, which in this sense is already a discrete distribution of charges. And microscopically the induced dipole is well defined through the expectation value of your dipole operator. I hope that this addresses your concern.   
