How did Einstein come up with the quantum theory?

Einstein did not think of the quantum theory, Max Planck did. Einstein has contributed to quantum physics