Quantum autonomous magnetic field sensor