The present invention provided a thin-film electromagnet including a magnetic
yoke and a thin-film coil, characterized in that the magnetic yoke includes a first
magnetic yoke and a second magnetic yoke making contact with the first magnetic
yoke, the first magnetic yoke is located at a center of a winding of the thin-film
coil, and the second magnetic yoke is arranged above or below the thin-film coil
such that the second magnetic yoke faces the thin-film coil, and overlaps at least
a part of the thin-film coil.