Module python_interopt

Source
Expand description

Acts as the interface to rust code from python. Currently only supports reading the QUBO from a file, and running one of the search algorithms.

Functionsยง

convex_symmetric_form
This function converts the QUBO to a convex symmetric form and returns the QUBO in vec form
generate_rule_1_1
This function generates the rule 1.1 for the QUBO from the glover paper and returns the rules in vec form
generate_rule_2_1
This function generates the rule 2.1 for the QUBO from the glover paper and returns the rules in vec form
get_persistence
This function computes the persistence of the QUBO, e.g. an initial set of variables that can be fixed to reduce the size of the problem.
gls
This reads in the QUBO from a file, and solves the QUBO using gain guided local search, returns the best solution found.
gls_from_file
This reads in the QUBO from a file, and solves the QUBO using gain guided local search, returns the best solution found.
k_opt
This function solves the QUBO using the k-opt algorithm and returns the best solution found.
mls
This solves the QUBO using mixed local search, returns the best solution found.
mls_from_file
This reads in the QUBO from a file, and solves the QUBO using mixed local search, returns the best solution found.
msls
This solves the QUBO using multi-start local search, returns the best solution found.
msls_from_file
This reads in the QUBO from a file, and solves the QUBO using multi-start local search, returns the best solution found.
pso
This reads in the QUBO from a file, and solves the QUBO using particle swarm optimization, returns the best solution found.
pso_from_file
This reads in the QUBO from a file, and solves the QUBO using particle swarm optimization, returns the best solution found.
rand
This reads in the QUBO from a file, and solves the QUBO using random search, returns the best solution found.
rand_from_file
This reads in the QUBO from a file, and solves the QUBO using random search, returns the best solution found.
read_qubo
This reads in the QUBO from a .qubo file
solve_branch_bound
Solves the QUBO using branch and bound, returns the best solution found.
write_qubo
This reads in the QUBO from a .qubo file