Solving the Bose–Hubbard Model with Machine Learning