Class find_embedding::embedding_problem_base¶
-
class
embedding_problem_base¶ Common form for all embedding problems.
Needs to be extended with a fixed handler and domain handler to be complete.
Subclassed by find_embedding::embedding_problem< fixed_handler, domain_handler, output_handler >
Public Functions
-
void
reset_mood()¶ resets some internal, ephemeral, variables to a default state
-
void
populate_weight_table(int max_weight)¶ precomputes a table of weights corresponding to various overlap values
c, forcfrom 0 tomax_weight, inclusive.
-
distance_t
weight(unsigned int c) const¶ returns the precomputed weight associated with an overlap value of
c
-
const vector<int> &
var_neighbors(int u) const¶ a vector of neighbors for the variable
u
-
const vector<int> &
var_neighbors(int u, shuffle_first)¶ a vector of neighbors for the variable
u, pre-shuffling them
-
const vector<int> &
var_neighbors(int u, rndswap_first)¶ a vector of neighbors for the variable
u, applying a random transposition before returning the reference
-
const vector<int> &
qubit_neighbors(int q) const¶ a vector of neighbors for the qubit
q
-
int
num_vars() const¶ number of variables which are not fixed
-
int
num_qubits() const¶ number of qubits which are not reserved
-
int
num_fixed() const¶ number of fixed variables
-
int
num_reserved() const¶ number of reserved qubits
-
int
randint(int a, int b)¶ make a random integer between 0 and
m-1
-
template<typename
A, typenameB>
voidshuffle(A a, B b)¶ shuffle the data bracketed by iterators
aandb
-
void
qubit_component(int q0, vector<int> &component, vector<int> &visited)¶ compute the connected component of the subset
componentof qubits, containingq0, and usingvisitedas an indicator for which qubits have been explored
-
const vector<int> &
var_order(VARORDER order = VARORDER_SHUFFLE)¶ compute a variable ordering according to the
orderstrategy
-
void
dfs_component(int x, const vector<vector<int>> &neighbors, vector<int> &component, vector<int> &visited)¶ Perform a depth first search.
Public Members
-
optional_parameters &
params¶ A mutable reference to the user specified parameters.
-
void