On the series of querying attributes with our meta-solver/reformulator I encountered a corner case when retrieving attributes after reformulation without an inner optimizer.
Basically, we have an operation mode in psrenergy/ToQUBO.jl where a call to optimize!
without an optimizer will just reformulate the problem to the QUBO form, e.g.,
model = Model(ToQUBO.Optimizer)
...
optimize!(model)
instead of the usual
model = Model(
() -> ToQUBO.Optimizer(QuantumSolver.Optimizer)
)
...
optimize!(model) # Returns termination status from `QuantumSolver`
The problem is that the OPTIMIZE_NOT_CALLED
status prevents attribute retrieval for cases where is_set_by_optimizer = true
.
I couldn't find any other suitable status for this case besides OTHER_ERROR
which is kind of misleading since there was no error to begin with.
Note: Using optimize!
is not necessary, we could be using something like reformulate!
or compile!
but this makes no big difference in the issue.