I couldn't find an example for this in the docs, but are Interval values (not unknowns) allowed in the root function?
I tried the following (note the interval g1 parameter), but it doesn't appear to finish. Any advice on if this is doable?
Note that the code works great if I plug in a number for g2, but I would like the result interval to reflect the uncertainty in g2.
using IntervalRootFinding, IntervalArithmetic, StaticArrays
function f(z)
# units in MHz
f1 = 5303.5 # frequency for resonator 1
χ1 = 0.34144 # shift for resonator 1
g1 = 38..42 # estimated coupling for resonator 1
f2 = 4522.7 # frequency for resonator 2
χ2 = 0.24841 # shift for resonator 2
fq, g2 = z # unknown qubit freq and coupling for resonator 2
return SVector(
(fq-f1)*χ1 + g1^2,
(fq-f2)*χ2 + g2^2
)
end
rts = roots(f, IntervalBox(0..8000, 0..100))
I couldn't find an example for this in the docs, but are Interval values (not unknowns) allowed in the root function?
I tried the following (note the interval
g1parameter), but it doesn't appear to finish. Any advice on if this is doable?Note that the code works great if I plug in a number for
g2, but I would like the result interval to reflect the uncertainty ing2.