File find_embedding.hpp¶
-
namespace
find_embedding Functions
-
int
findEmbedding(graph::input_graph &var_g, graph::input_graph &qubit_g, optional_parameters ¶ms, vector<vector<int>> &chains)¶ The main entry function of this library.
This method primarily dispatches the proper implementation of the algorithm where some parameters/behaviours have been fixed at compile time.
In terms of dispatch, there are three dynamically-selected classes which are combined, each according to a specific optional parameter.
- a domain_handler, described in embedding_problem.hpp, manages constraints of the form “variable a’s chain must be a subset of…”
- a fixed_handler, described in embedding_problem.hpp, manages contstraints of the form “variable a’s chain must be exactly…”
- a pathfinder, described in pathfinder.hpp, which come in two flavors, serial and parallel The optional parameters themselves can be found in util.hpp. Respectively, the controlling options for the above are restrict_chains, fixed_chains, and threads.
-
class
parameter_processor - #include <find_embedding.hpp>
Public Functions
-
parameter_processor(graph::input_graph &var_g, graph::input_graph &qubit_g, optional_parameters ¶ms_)¶
-
map<int, vector<int>>
input_chains(map<int, vector<int>> &m)¶
-
vector<int>
input_vars(vector<int> &V)¶
Public Members
-
int
num_vars¶
-
int
num_qubits¶
-
vector<int>
qub_reserved_unscrewed¶
-
vector<int>
var_fixed_unscrewed¶
-
int
num_reserved¶
-
graph::components
qub_components¶
-
int
problem_qubits¶
-
int
problem_reserved¶
-
int
num_fixed¶
-
vector<int>
unscrew_vars¶
-
vector<int>
screw_vars¶
-
optional_parameters
params¶
-
vector<vector<int>>
var_nbrs¶
-
vector<vector<int>>
qubit_nbrs¶
Private Functions
-
int
_reserved(optional_parameters ¶ms_)¶
-
vector<int>
_filter_fixed_vars()¶
-
vector<int>
_inverse_permutation(vector<int> &f)¶
-
-
template<bool
parallel, boolfixed, boolrestricted, boolverbose>
classpathfinder_type - #include <find_embedding.hpp>
Public Types
-
typedef std::conditional<fixed, fixed_handler_hival, fixed_handler_none>::type
fixed_handler_t¶
-
typedef std::conditional<restricted, domain_handler_masked, domain_handler_universe>::type
domain_handler_t¶
-
typedef std::conditional<verbose, output_handler_full, output_handler_error>::type
output_handler_t¶
-
typedef embedding_problem<fixed_handler_t, domain_handler_t, output_handler_t>
embedding_problem_t¶
-
typedef std::conditional<parallel, pathfinder_parallel<embedding_problem_t>, pathfinder_serial<embedding_problem_t>>::type
pathfinder_t¶
-
typedef std::conditional<fixed, fixed_handler_hival, fixed_handler_none>::type
-
class
pathfinder_wrapper - #include <find_embedding.hpp>
Public Functions
-
pathfinder_wrapper(graph::input_graph &var_g, graph::input_graph &qubit_g, optional_parameters ¶ms_)¶
-
~pathfinder_wrapper()¶
-
void
get_chain(int u, vector<int> &output) const¶
-
int
heuristicEmbedding()¶
-
int
num_vars()¶
-
void
set_initial_chains(map<int, vector<int>> &init)¶
-
void
quickPass(vector<int> &varorder, int chainlength_bound, int overlap_bound, bool local_search, bool clear_first, double round_beta)¶
Private Functions
-
template<bool
parallel, boolfixed, boolrestricted, boolverbose, typename ...Args>
std::unique_ptr<pathfinder_public_interface>_pf_parse4(Args&&... args)¶
-
template<bool
parallel, boolfixed, boolrestricted, typename ...Args>
std::unique_ptr<pathfinder_public_interface>_pf_parse3(Args&&... args)¶
-
template<bool
parallel, boolfixed, typename ...Args>
std::unique_ptr<pathfinder_public_interface>_pf_parse2(Args&&... args)¶
-
template<bool
parallel, typename ...Args>
std::unique_ptr<pathfinder_public_interface>_pf_parse1(Args&&... args)¶
-
template<typename ...
Args>
std::unique_ptr<pathfinder_public_interface>_pf_parse(Args&&... args)¶
-
-
int