A quantum bound on the compactness