Function hercules::python_interopt::generate_rule_1_1
source · pub fn generate_rule_1_1(
problem: (Vec<usize>, Vec<usize>, Vec<f64>, Vec<f64>, usize)
) -> PyResult<Vec<(usize, usize)>>
Expand description
This function generates the rule 1.1 for the QUBO from the glover paper and returns the rules in vec form
Example
import hercules
# read in the QUBO from a file
problem = hercules.read_qubo("file.qubo")
# generate the rules
rules = hercules.generate_rule_1_1(problem)
§Errors
This shouldn’t error, but if it does, it will abort.