  We calculate exactly the probability to find the ground state of the XY chain
in a given spin configuration in the transverse $\sigma^z$-basis. By
determining finite-volume corrections to the probabilities for a wide variety
of configurations, we obtain the universal Boundary Entropy at the critical
point. The latter is a benchmark of the underlying Boundary Conformal Field
Theory characterizing each quantum state. To determine the scaling of the
probabilities, we prove a theorem that expresses, in a factorized form, the
eigenvalues of a sub-matrix of a circulant matrix as functions of the
eigenvalues of the original matrix. Finally, the Boundary Entropies are
computed by exploiting a generalization of the Euler-MacLaurin formula to
non-differentiable functions. It is shown that, in some cases, the spin
configuration can flow to a linear superposition of Cardy states. Our methods
and tools are rather generic and can be applied to all the periodic quantum
chains which map to free-fermionic Hamiltonians.
