A lithium niobate crystal is like a layered cake: inside, electric fields alternate like layers of filling. If you slice such a crystal into thin films and imprint stripes of alternating polarity, you get a periodic structure that makes light change color as it passes through. This is how pairs of photons are born, entangled like twins. But if the stripes are uneven, light scatters and quantum properties are lost.
A two-photon microscope works like a flashlight in a dark room: it sends short pulses of light, and only in the brightest spots, where the structure is right, does a response glow appear. A camera captures this glow and turns it into a map. Software measures the width of the stripes, their uniformity, and how accurately they match the desired pattern. In just a few minutes, you can check hundreds of devices on a single wafer.
This method is like quality control on an assembly line: every part passes through a scanner, and defects are weeded out immediately. For factories producing photonic integrated circuits, this saves weeks of work. As a result, quantum devices, from sensors to secure communication lines, become cheaper and more reliable.
Lithium niobate is called the 'silicon of photonics': it is transparent to a wide range of light and changes its properties under an electric field, like a liquid crystal in a screen.