Active compensation of field errors within ±2 ppm in superconducting magnets