Irreversible work and inner friction in quantum thermodynamic processes