Spin‐restricted ensemble‐referenced Kohn–Sham method: basic principles and application to strongly correlated ground and excited states of molecules | Synapse