Flow-Based Sampling for Entanglement Entropy and the Machine Learning of Defects,