Generators and Application Modeling

Benchmarking

anti_crossing_clique(num_variables)

Generate an anti-crossing problem with a single clique.

anti_crossing_loops(num_variables)

Generate an anti-crossing problem with two loops.

chimera_anticluster(m[, n, t, multiplier, ...])

Generate an anticluster problem on a Chimera lattice.

doped(p, graph[, cls, seed, fm])

Generate a BQM for a doped ferromagnetic (FM) or antiferromagnetic (AFM) problem.

frustrated_loop(graph, num_cycles[, R, ...])

Generate a frustrated-loop problem.

Constraints

and_gate(in0, in1, out, *[, strength])

Return a binary quadratic model with ground states corresponding to an AND gate.

binary_encoding(v, upper_bound)

Return a binary quadratic model encoding an integer.

combinations(n, k[, strength, vartype])

Generate a binary quadratic model that is minimized when k of n variables are selected.

fulladder_gate(in0, in1, in2, sum_, carry, *)

Return a binary quadratic model with ground states corresponding to a full adder gate.

halfadder_gate(in0, in1, sum_, carry, *[, ...])

Return a binary quadratic model with ground states corresponding to a half adder gate.

or_gate(in0, in1, out, *[, strength])

Return a binary quadratic model with ground states corresponding to an OR gate.

xor_gate(in0, in1, out, aux, *[, strength])

Return a binary quadratic model with ground states corresponding to an XOR gate.

Optimization

random_bin_packing(num_items[, seed, ...])

Generate a bin packing problem as a constrained quadratic model.

random_knapsack(num_items[, seed, ...])

Returns a Constrained Quadratic Model encoding a knapsack problem.

random_multi_knapsack(num_items, num_bins[, ...])

Return a constrained quadratic model encoding a multiple knapsack problem.

Random

doped(p, graph[, cls, seed, fm])

Generate a BQM for a doped ferromagnetic (FM) or antiferromagnetic (AFM) problem.

gnm_random_bqm(variables, num_interactions, ...)

Generate a random binary quadratic model with a fixed number of variables and interactions.

gnp_random_bqm(n, p, vartype[, cls, ...])

Generate a BQM structured as an Erdős-Rényi graph.

randint(graph, vartype[, low, high, cls, seed])

Generate a binary quadratic model with random biases and offset.

random_bin_packing(num_items[, seed, ...])

Generate a bin packing problem as a constrained quadratic model.

random_knapsack(num_items[, seed, ...])

Returns a Constrained Quadratic Model encoding a knapsack problem.

random_multi_knapsack(num_items, num_bins[, ...])

Return a constrained quadratic model encoding a multiple knapsack problem.

ran_r(r, graph[, cls, seed])

Generate an Ising model for a RANr problem.

uniform(graph, vartype[, low, high, cls, seed])

Generate a binary quadratic model with random biases and offset.