For the purpose of efficiently correcting a quadratic term component of a
static magnetic field, when an inhomogeneity error of a static magnetic
field generated by a pair of magnets supported by yokes so that the
magnets face each other across a space is to be corrected, a quadratic
term component of the static magnetic field is corrected by a quadratic
term component of a magnetic field generated by a pair of circular loop
coils, and a zero-th order term component of the magnetic field from the
pair of circular loop coils is compensated by a zero-th order term
component of a magnetic field generated by coils wound around the yokes.