  Generation of entanglement between modes of a electromagnetic fields by
sudden change of the refractive index of a medium is considered. We use the
analogy between the Fock-space formulation of pair creation caused by the
contraction and expansion of the universe on one hand and the pair creation in
time-dependent electric fields on the other hand. It is shown that entanglement
between photons encodes information concerning the underlying refractive index
of a medium.
