  The accuracies of modern quantum logic clocks have surpassed those of
standard atomic fountain clocks. These clocks also provide a greater degree of
control, because before and after clock queries, we are able to apply chosen
unitary operations and measurements. Here, we take advantage of these choices
and present a numerical technique designed to increase the accuracy of these
clocks. We use a greedy approach, minimizing the phase variance of a noisy
classical oscillator with respect to a perfect frequency standard after an
interrogation step; we do not optimize over successive interrogations or the
probe times. We consider arbitrary prior frequency knowledge and compare clocks
with varying numbers of ions and queries interlaced with unitary control. Our
technique is based on the semidefinite programming formulation of quantum query
complexity, a method first developed in the context of deriving algorithmic
lower bounds. The application of semidefinite programming to an inherently
continuous problem like that considered here requires discretization; we derive
bounds on the error introduced and show that it can be made suitably small.
