Controlling the magnetic state of inductor cores