The Compiler

Work in progress

We hope to write this part of the documentation soon. Please come back later!

Compilation Steps

Setup

Parsing

ToQUBO.Compiler.parse!Function
parse!(
    model::Virtual.Model{T},
    g::PBO.PBF{VI,T},
    f::MOI.AbstractFunction,
    arch::AbstractArchitecture
) where {T}

Parses the given MOI function f into PBF g.

source

Reformulation

ToQUBO.Compiler.sense!Function
sense!(model::Virtual.Model, ::AbstractArchitecture)

Copies MOI.ObjectiveSense from model.source_model to model.target_model.

source

Copying

ToQUBO.Compiler.isquboFunction
isqubo(model::MOI.ModelLike)

Tells if a given model is ready to be interpreted as a QUBO model.

For it to be true, a few conditions must be met:

  1. All variables must be binary (MOI.VariableIndex ∈ MOI.ZeroOne)
  2. No other constraints are allowed
  3. The objective function must be of type MOI.ScalarQuadraticFunction, MOI.ScalarAffineFunction or MOI.VariableIndex
  4. The objective sense must be either MOI.MIN_SENSE or MOI.MAX_SENSE
source

Hamiltonian Assembly