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.

random_2in4sat(variables, num_clauses, *[, ...])

Generate a random 2-in-4 satisfiability problem as a binary quadratic model.

random_nae3sat(variables, num_clauses, *[, ...])

Generate a random not-all-equal 3-satisfiability problem as a binary quadratic model.

Constraints#

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

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

binary_encoding(v, upper_bound)

Generate 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, *)

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

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

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

multiplication_circuit(num_arg1_bits[, ...])

Generate a binary quadratic model with ground states corresponding to a multiplication circuit.

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

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

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

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

Optimization#

coordinated_multipoint(lattice[, ...])

Generate a coordinated multi-point (CoMP) decoding problem.

independent_set(edges[, nodes])

Generate a binary quadratic model encoding an independent set problem.

maximum_independent_set(edges[, nodes, strength])

Generate a binary quadratic model encoding a maximum independent set problem.

maximum_weight_independent_set(edges[, ...])

Generate a binary quadratic model encoding a maximum-weight independent set problem.

mimo([modulation, y, F, ...])

Generate a multi-input multiple-output (MIMO) channel-decoding problem.

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

Generate a bin packing problem as a constrained quadratic model.

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

Generates a constrained quadratic model encoding a knapsack problem.

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

Generate 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_2in4sat(variables, num_clauses, *[, ...])

Generate a random 2-in-4 satisfiability problem as a binary quadratic model.

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

Generate a bin packing problem as a constrained quadratic model.

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

Generates a constrained quadratic model encoding a knapsack problem.

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

Generate a constrained quadratic model encoding a multiple-knapsack problem.

random_nae3sat(variables, num_clauses, *[, ...])

Generate a random not-all-equal 3-satisfiability problem as a binary quadratic model.

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.

Single-Variable Models#

Generators for single-variable models used in symbolic math.

Binary([label, bias, dtype])

Return a binary quadratic model with a single binary variable.

Binaries(labels[, dtype])

Yield binary quadratic models, each with a single binary variable.

BinaryArray(labels[, dtype])

Return a NumPy array of binary quadratic models, each with a single binary variable.

Integer([label, bias, dtype, lower_bound, ...])

Return a quadratic model with a single integer variable.

Integers(labels[, dtype])

Yield quadratic models, each with a single integer variable.

IntegerArray(labels[, dtype])

Return a NumPy array of quadratic models, each with a single integer variable.

Spin([label, bias, dtype])

Return a binary quadratic model with a single spin variable.

Spins(labels[, dtype])

Yield binary quadratic models, each with a single spin variable.

SpinArray(labels[, dtype])

Return a NumPy array of binary quadratic models, each with a single spin variable.