Field notes
Can AI do optical design? I tested it on a CO₂ surgical laser
Ro Bahuguna, Lead Optical Engineer, Opdo · October 20, 2026 · 7 min read
Can AI do optical design? I tested it on a problem I already understood: how adding a third lens to a two-lens telescope lets you control both the beam waist’s size and its location.
Add a third lens - The first lens will remain fixed in position and the second and third will be allowed to slide. The ratio of the focal lengths for the second and third lens with respect to the first lens will need to be calculated appropriately. Moving the second lens will have a greater effect on the waist size, while moving the third lens will move the waist to its intended position. A few iterations of movements between the two lenses and the solution will converge to the target. That is the principle behind a zoom beam expander (or condenser in this case).
Knowing the answer let me judge every step. What I didn't know was whether an AI could take a real problem built on it and do the engineering. The problem was a CO₂ surgical medical laser system with detachable handpieces, where every laser must deliver the same beam size and waist location to different handpieces with their own set of optics. That is what lets a medical practice swap a broken handpiece with little to no downtime, as opposed to sending the whole system back. It also allows physicians to purchase new handpieces with different modalities that can “plug and play” with their existing system. These are my notes on what I typed, what the AI got right, and where it fell short.

Why two lenses can only set one
A Gaussian beam at the output is fixed by two numbers: its waist size and where the waist sits. Both live in the complex beam parameter q, and every lens and gap transforms q through its ABCD matrix:
The waist size comes from the imaginary part of q, the waist location from the real part. To hit both targets you need two things you can change.
With the first lens fixed and the output plane fixed, a two-lens telescope only has one: the spacing. Its magnification is set by the ratio of the focal lengths, so moving the second lens mostly changes focus. One knob moves the output along a single curve of size-and-location pairs. It hits one target, or both only by luck.
A third lens adds a second spacing. Moving the middle and last lenses together changes the effective magnification while the focus is held, which is how a zoom lens works. Two knobs, two targets.

two-lens and three-lens telescopes · adjustments against targets
This matters when the input beam varies. Here every laser had a 3.0 mm waist at it's output, but M² can vary from 1.0 to 1.3, so the beams spread at rates up to 1.3 times apart. Each laser needs its own magnification and its own focus.
What I typed, and what came back
I typed it the way I'd explain it to a colleague. No special prompt format. My first message was:
I want to start a project for beam conditioning of a CO₂ laser for interchangeable handpieces used in medical surgical devices.
The AI didn't start calculating. It asked what it needed: the laser specifications. I asked it to find the laser's datasheet, and it did. Then I gave it the target in one line:
The beam 100 mm after the exit of the arm shall have a waist of 2.8 mm.
From that conversation it wrote 10 requirements in my words, each marked must-have or stretchable, and four numbers to judge every design by: waist size, waist location, largest beam in the arm, and how many adjustments a technician needs. It asked me to confirm them. When I later remembered a constraint, 2.3 m of total beam path, it added it and flagged which earlier results it affected.
Before every calculation it showed me what it was about to run, and it waited for me to say go.
None of this happened because I wrote a clever prompt. It happened because of how the system is set up: it knows to ask for the specs before calculating, to write requirements and wait for my go, to label quick estimates as provisional, to run physical optics checks in Zemax, and to have a second agent check the work. The same plain sentences typed into an assistant with no setup get you confident answers to the wrong question.
What worked
The AI did the full calculation in under an hour of compute, and it showed its work.
Zemax confirmed it. The physical-optics check runs through our Zemax OpticStudio server and returns the beam data for that analysis. Both the AI and Zemax results are in agreement.
It worked in two speeds. Quick checks took minutes and were labelled provisional. One of them caught a problem early: with f3 = +300 mm, a technician could need 5 adjustments, over my limit of 4. I chose to increase the ratio of the focal lengths rather than relax the limit, and f3 became +310 mm. The full logged calculation then took 27 minutes.
| What | Target | Result |
|---|---|---|
| Lenses (ZnSe) | P-N-P, lens 1 fixed | f = +125 / −50 / +310 mm, lens 1 at 300 mm |
| Lens 2 and lens 3 positions | within 19 mm travel each | 323.6 to 333.0 mm and 608.8 to 612.1 mm from the collimator |
| Output waist diameter (1/e²) | 2.8 ± 0.10 mm | 2.80 mm, every laser from M² 1.0 to 1.3 |
| Waist location after the arm | 100 ± 10 mm | 100 mm, every laser |
| Largest beam in the 1.5 m arm | ≤ 12.7 mm | 10.41 mm |
| Telescope length | about 305 mm, up to 355 | 311.8 to 315.1 mm |
| Worst-case technician adjustments | ≤ 4 | 2 |

Three things I would not have done by hand:
- It simulated the technician. 20,000 adjustment sessions per case, each lens move off by a random amount up to ±0.3 mm, measured and corrected until in spec. The worst case was 2 adjustments.
- It told me which knob does what. Moving lens 3 by 1 mm moves the waist 18.6 mm; moving lens 2 by 1 mm changes the waist size by 0.06 mm. Lens 3 is the focus knob, lens 2 the size knob, and the technician's chart is built on that.
- It checked itself twice. It cross-checked the paraxial model with an angular-spectrum propagation through the real lens surfaces. Then a second agent, which had not seen the work, rebuilt the model from scratch and got the same numbers.
What did not work
The AI was wrong once, got stuck once.
- It got a margin wrong. Early on it told me the design tolerated 1.7 times my hand error. The logged calculation showed about 1.2 times, and it corrected the number itself. A margin quoted in conversation is not a result; the logged run is.
- It stopped instead of guessing. The full calculation was told to reuse code from an earlier check, and it couldn't reach those files. It stopped, said exactly what it needed, and finished once I supplied them.
The pattern: the AI is strong where it can write a model and check it two ways. It is only as good as the tools around it, and it says so when they fail.
One thing I'd tell another optical engineer
Start with a problem you already understand. I knew why three lenses beat two before I typed a word, so I could judge every answer. That is how you find out whether the AI does the job: not by asking it something you can't check, but by handing it work you could do yourself and seeing what it does with it.
Two habits made the difference. Give it the requirements the way you'd give them to a new engineer, in plain sentences, and let it ask questions. And ask where every number came from: a good answer names the calculation and says what it assumed.
Frequently asked questions
Do I need to learn how to write prompts? No. You need a well set-up system. I typed plain sentences; the setup made the AI ask the right questions and make the right assumptions.
Does it replace the optical engineer? No. It did the calculations; I chose the hand tolerance, the focal lengths, the adjustment limit and where lens 1 sits. Each of those decisions is on the record with my name and the reason.
How do I know the numbers are right? The same way you'd check a junior engineer's. Every result names the calculation and data it came from, quick estimates are labelled provisional, and a second agent rebuilt the model independently.
Next, we put off-the-shelf lenses close to these focal lengths on a rail at these spacings and measure the beam
How to start
Curious whether AI can do your optics? Try it yourself: take a problem you already know the answer to and give it to any AI tool you like. If it doesn't ask the right questions back or check its own numbers, the problem is the setup, not the AI. That setup is what we do. Talk to us."
Sources
- Siegman AE. "Defining, measuring, and optimizing laser beam quality." Proc. SPIE 1868, 2, 1993. doi:10.1117/12.150601
- M squared, Wikipedia: how M² sets divergence for a given waist.
See how Opdo's AI agents design and verify your optics.
Bring your use case. Our agents run the design iterations in the tools you already use, and an engineer makes the calls that matter.
