50. The state of a quantum mechanical system is described by a wave function

. Consider two physical observables that have discrete eigenvalues: observer A with eigenvalue

, and observable B with eigenvalues

. Under what circumstances can all wave functions be expanded in a set of basis states, each of which is a simultaneous eigenfunction of both A and B?
(A) Only if the values

and

are nondegenerate
(B) Only if A and B commute
(C) Only if A commutes with the Hamiltonian of the system
(D) Only if B commutes with the Hamiltonian of the system
(E) Under all circumstances