We consider the linear and non-linear electromagnetic responses of a nanowire
connecting two bulk superconductors. Andreev states appearing at a finite phase
bias substantially affect the finite-frequency admittance of such a wire
junction. Electron transitions involving Andreev levels are easily saturated,
leading to the nonlinear effects in photon absorption for the sub-gap photon
energies. We evaluate the complex admittance analytically at arbitrary
frequency and arbitrary, possibly non-equilibrium, occupation of Andreev
levels. Special care is given to the limits of a single-channel contact and a
disordered metallic weak link. We also evaluate the quasi-static fluctuations
of admittance induced by fluctuations of the occupation factors of Andreev
levels. In view of possible qubit applications, we compare properties of a weak
link with those of a tunnel Josephson junction. Compared to the latter, a weak
link has smaller low-frequency dissipation. However, because of the deeper
Andreev levels, the low-temperature quasi-static fluctuations of the inductance
of a weak link are exponentially larger than of a tunnel junction. These
fluctuations limit the applicability of nanowire junctions in superconducting
qubits