Sensor comprising a sensor element for measuring a magnetic field, the sensor element comprising - a set of at least two first input ports, - a set of at least two exit ports each of which is connected to one of the first input ports via a corresponding first beam path, - a set of at least two second input ports each of which is connected to a second beam path, - wherein the first beam paths extend through a common plane located inside the sensor element, said plane comprising a plurality of magneto-optically responsive defect centers, - wherein the second beam paths also extend through said common plane, but are angled with respect to the first beam paths such that a plurality of intersections between the first and second beam paths is defined, and - wherein each intersection forms a sensor pixel located at at least one of said magneto-optically responsive defect centers, wherein the sensor further comprises - a set of detectors each of which is individually assigned to one of said exit ports, - an evaluation unit connected to said set of detectors and configured to evaluate detection signals of the detectors in order to generate one or more measurement values, - a first emitter unit which is capable of generating a first radiation and activating at least one of the first beam paths by injecting the first radiation, - a second emitter unit which is capable of generating a second radiation and activating at least one of the second beam paths by injecting the second radiation, - a control unit configured to control the first and second emitter unit (40, 50), and - a microwave generator capable of generating a microwave field at the intersection points of the beam paths (B1, B2). - a set of at least two first input ports, - a set of at least two exit ports each of which is connected to one of the first input ports via a corresponding first beam path, - a set of at least two second input ports each of which is connected to a second beam path, - wherein the first beam paths extend through a common plane located inside the sensor element, said plane comprising a plurality of magneto-optically responsive defect centers, - wherein the second beam paths also extend through said common plane, but are angled with respect to the first beam paths such that a plurality of intersections between the first and second beam paths is defined, and - wherein each intersection forms a sensor pixel located at at least one of said magneto-optically responsive defect centers, - a set of detectors each of which is individually assigned to one of said exit ports, - an evaluation unit connected to said set of detectors and configured to evaluate detection signals of the detectors in order to generate one or more measurement values, - a first emitter unit which is capable of generating a first radiation and activating at least one of the first beam paths by injecting the first radiation, - a second emitter unit which is capable of generating a second radiation and activating at least one of the second beam paths by injecting the second radiation, - a control unit configured to control the first and second emitter unit (40, 50), and - a microwave generator capable of generating a microwave field at the intersection points of the beam paths (B1, B2).