5#include <nlohmann/json.hpp>
23 std::map<int, nlohmann::json>
generateRuleSets(messages::ConnectionSetupRequest* req,
unsigned long ruleset_id);
34 void generateReverseSwapAtHalfRuleSets(
int left_node_index,
int right_node_index, std::map<
int, std::vector<std::unique_ptr<rules::Rule>>>& rules_map, std::vector<int>& path,
35 int& shared_rule_tag);
44 std::vector<int>
collectPath(messages::ConnectionSetupRequest* req);
55 std::unique_ptr<rules::Rule>
tomographyRule(
int partner_address,
int owner_address,
int num_measure,
int shared_rule_tag);
84 std::unique_ptr<rules::Rule>
swapRule(std::pair<int, int> partner_address,
int shared_rule_tag);
93 std::unique_ptr<rules::Rule>
swapCorrectionRule(
int swapper_address,
int shared_rule_tag);
Definition RuleSetGenerator.h:12
int responder_addr
Definition RuleSetGenerator.h:95
std::unique_ptr< rules::Rule > swapRule(std::pair< int, int > partner_address, int shared_rule_tag)
create entanglement swapping rule
Definition RuleSetGenerator.cc:159
std::unique_ptr< rules::Rule > swapCorrectionRule(int swapper_address, int shared_rule_tag)
create rule that waits for the swapping correction/notification from swapper node
Definition RuleSetGenerator.cc:175
RuleSetGenerator(int responder_addr)
Definition RuleSetGenerator.h:14
void generateReverseSwapAtHalfRuleSets(int left_node_index, int right_node_index, std::map< int, std::vector< std::unique_ptr< rules::Rule > > > &rules_map, std::vector< int > &path, int &shared_rule_tag)
generate rules for each node in the path.
Definition RuleSetGenerator.cc:12
std::vector< int > collectPath(messages::ConnectionSetupRequest *req)
collect path infomation from initiator to responder
Definition RuleSetGenerator.cc:79
std::unique_ptr< rules::Rule > purificationCorrelationRule(int partner_address, rules::PurType purification_protocol, int shared_rule_tag)
create rule that waits for purification measurement result and check for its correlation
Definition RuleSetGenerator.cc:144
std::unique_ptr< rules::Rule > purifyRule(int partner_address, rules::PurType purification_type, int shared_rule_tag)
create purification rule
Definition RuleSetGenerator.cc:109
std::unique_ptr< rules::Rule > tomographyRule(int partner_address, int owner_address, int num_measure, int shared_rule_tag)
create tomography rule
Definition RuleSetGenerator.cc:90
std::map< int, nlohmann::json > generateRuleSets(messages::ConnectionSetupRequest *req, unsigned long ruleset_id)
generate RuleSets for the given connection setup request.
Definition RuleSetGenerator.cc:32
Definition RuleSetGenerator.cc:8
PurType
Definition Action.h:15