New method of wavefunction matching helps solve quantum many