  We study the response of a two-dimensional classical XY model to a finite
(non-infinitesimal) twist of the boundary conditions. We use Monte Carlo
simulations to evaluate the free energy difference between periodic and
twisted-periodic boundary conditions and find deviations from the expected
quadratic dependence on the twist angle. Consequently, the helicity modulus
(spin-stiffness) shows a non-trivial dependence on the twist angle. We show
that the deviation from the expected behavior arises because of a degeneracy
due to the chirality of the spin-waves which leads to an additional entropy
contribution in the quasi-long-range ordered phase. We give an improved
prescription for the numerical evaluation of the helicity modulus and resolve
some open questions related to anti-periodic boundary conditions. We also
discuss applications to discrete spin systems and some experimental scenarios
where boundary conditions with finite twist are necessary.
