struct QPanda::SU4TopologyMatch::node¶
Overview¶
define struct for nodes in the A* search; More…
struct node { // fields int cost_fixed; int cost_heur; std::vector<int> locations; std::vector<int> qubits; bool is_goal; std::vector<std::pair<int, int>> swaps; std::vector<std::pair<int, int>> remaining_gates; };
Detailed Documentation¶
define struct for nodes in the A* search;
Fields¶
int cost_fixed
fixed cost of the current permutation
std::vector<int> locations
heuristic cost of the current permutation
std::vector<int> qubits
location (i.e. pysical qubit) of a logical qubit
bool is_goal
logical qubits that are mapped to the physical ones
std::vector<std::pair<int, int>> swaps
true if the node is a goal node;
std::vector<std::pair<int, int>> remaining_gates
a sequence of swap operations that have been applied