diff --git a/src/compiler/constraints.jl b/src/compiler/constraints.jl index beaa7e1..98ec5d8 100644 --- a/src/compiler/constraints.jl +++ b/src/compiler/constraints.jl @@ -600,21 +600,3 @@ function constraint( return nothing end - - -function encoding_constraints!(model::Virtual.Model{T}, ::AbstractArchitecture) where {T} - for v in model.variables - i = Virtual.source(v) - χ = Virtual.penaltyfn(v) - - if !isnothing(χ) - if i isa VI - model.h[i] = χ - elseif i isa CI - model.s[i] = χ - end - end - end - - return nothing -end diff --git a/test/integration/examples/quadratic/quadratic_2.jl b/test/integration/examples/quadratic/quadratic_2.jl index b94121e..8f4b788 100644 --- a/test/integration/examples/quadratic/quadratic_2.jl +++ b/test/integration/examples/quadratic/quadratic_2.jl @@ -12,14 +12,14 @@ min x₁ + x₂ + ρ (x₁ * x₂ - 1)² """ function test_quadratic_2() - ρ̄ = 3 + ρ̄ = 4 Q̄ = [ 1 -ρ̄ 0 2 ] ᾱ = 1 - β̄ = 0 - x̄ = [0, 1] + β̄ = ρ̄ + x̄ = [1, 1] model = Model(() -> ToQUBO.Optimizer(ExactSampler.Optimizer))