A superconducting cavity model was proposed as a way to experimentally investigate the work performed in a quantum system. We found a simple mathematical relationship between the free energy variation and visibility measurement in quantum cavity context. If we consider the difference of Hamiltonian at time $t_0$ and $t_lambda$ (protocol time) as a quantum work, then the Jarzynski equality is valid and the visibility can be used to determine the work done on the cavity.