diff --git a/ext/QuantumCliffordJuMPExt/min_distance_mixed_integer_programming.jl b/ext/QuantumCliffordJuMPExt/min_distance_mixed_integer_programming.jl index 2305da4cd..4c420bd9e 100644 --- a/ext/QuantumCliffordJuMPExt/min_distance_mixed_integer_programming.jl +++ b/ext/QuantumCliffordJuMPExt/min_distance_mixed_integer_programming.jl @@ -234,8 +234,8 @@ function _minimum_distance(hx, lx) cnt += 1 end @constraint(model, sum(weight[i] * x[i] for i in 1:num_var) == 1) - # Ensure the model is solved and feasible optimize!(model) + # Ensure the model is solved and feasible is_solved_and_feasible(model) || error("Did not solve model") opt_val = sum(value(x[i]) for i in 1:n) return Int(opt_val)