  We present an autonomous Maxwell's demon scheme. It is first analysed
theoretically in term of information exchange in a closed system and then
implemented experimentally with a single Rydberg atom and a high-quality
microwave resonator. The atom simulates both a qubit interacting with the
cavity, and a demon carrying information on the qubit state. While the cold
qubit crosses the hot cavity, the demon prevents energy absorption from the
cavity mode, apparently violating the second law of thermodynamics. Taking into
account the change of the mutual information between the demon and the
qubit-cavity system gives rise to a generalized expression of the second law
that we establish and measure. Finally, considering the closed
qubit-cavity-demon system, we establish and measure that the generalized second
law can be recast into an entropy conservation law, as expected for a unitary
evolution.
