# Optimizing a physics experiment

**URL:** <https://discourse.julialang.org/t/optimizing-a-physics-experiment/93434>\
**Category:** Optimization (Mathematical)\
**Created:** [January 24, 2023, 12:52am UTC](https://discourse.julialang.org/t/optimizing-a-physics-experiment/93434 "2023-01-24T00:52:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Yly](https://avatars.discourse-cdn.com/v4/letter/y/b9e5f3/32.png) [@Yly](https://discourse.julialang.org/u/Yly)\
**Post date:** [January 24, 2023, 12:52am UTC](https://discourse.julialang.org/t/optimizing-a-physics-experiment/93434/1 "2023-01-24T00:52:21Z")

</div>

I’m a member of an atomic physics lab, where a big part of our day to day work involves optimizing performance of a complicated machine with lots of “knobs”. We are currently not very sophisticated in how we perform the optimization, and we usually only turn one or two knobs at a time. I’ve thought many times that it would be nice to automate this process as much as possible. I am wondering what Julia packages might help in doing this.

The problem I am trying to solve can be broadly characterized as follows:

- We seek to optimize a scalar function f(x\_1,x\_2,\dots,x\_n). What we actually measure is this function plus some noise, f(x\_1,\dots) + \epsilon. The function f is measured “by hand” or by some program outside of Julia, so in particular it is not amenable to differentiable programming. f is smooth, but pathological in every other way (non-convex, many local extrema, etc.).
- Some of the input parameters x\_i can be measured precisely (e.g. voltage set points). Others can only be measured approximately (e.g. knobs on optics mounts).
- I would like a set of tools that helps me optimize f by suggesting new combinations of settings for parameters x\_i and receiving input I provide from a measurement, keeping track of the evolution of f as parameters are changed.

Based on what I know of common optimization toolboxes, two major challenges this problem poses are (1) optimizing a noisy signal, and (2) the manual data input. The second in particular implies that the algorithm must work with limited samples, as input is very slow.

Note that the desired toolbox doesn’t have to accomplish spectacular optimization–it just has to do better than what we can do entirely by hand.

So my questions are:

1. Are there any Julia packages suitable for this application?
2. If not, would anyone be interested in collaborating or providing guidance on a package for this purpose? I think this problem has broad applicability in hard sciences (anything with complicated, custom machines).

---

_[View the full topic](https://discourse.julialang.org/t/optimizing-a-physics-experiment/93434)._
