In classical mechanics:
If a Lagrangian L$\mathcal{L}$ is preserved by an infinitesimal change in the state space variables qi -> qi + εKi(q)$q_i \to q_i + \varepsilon K_i(q)$, this leads to only second order change in the Lagrangian: $$ 0 = \frac{dL}{d\epsilon} = \sum_i \left( \frac{\partial L}{\partial q_i}K_i + \frac{\partial L}{\partial \dot{q}_i} \dot{K}_i \right) = \frac{d}{dt}\left(\sum_i \frac{\partial L}{\partial \dot{q}_i} K_i \right) $$$$ 0 = \frac{d\mathcal{L}}{d\varepsilon} = \sum_i \left( \frac{\partial \mathcal{L}}{\partial q_i}K_i + \frac{\partial \mathcal{L}}{\partial \dot{q}_i} \dot{K}_i \right) = \frac{d}{dt}\left(\sum_i \frac{\partial \mathcal{L}}{\partial \dot{q}_i} K_i \right). $$
Then we get our conserved momentum because the rate of change on the right side is 0$0$.
In quantum mechanics, an observable A$A$ commuting with the Hamiltonian [H,A] = 0 i.e. with $[\hat{H},A] = 0$, corresponds to a symmetry of the time-independent SchrodingerSchrödinger equation Hψ = Eψ$\hat{H}\Psi = E \Psi$. How todo we compute the conserved quantity related to A$A$? In particular, what is the the conserved quantity associated with the identity operator?