A simple linear algebra identity to optimize large-scale neural network quantum states | Synapse