Line | Branch | Decision | Exec | Source |
---|---|---|---|---|
1 | // Copyright 2019-2022 Cambridge Quantum Computing | |||
2 | // | |||
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |||
4 | // you may not use this file except in compliance with the License. | |||
5 | // You may obtain a copy of the License at | |||
6 | // | |||
7 | // http://www.apache.org/licenses/LICENSE-2.0 | |||
8 | // | |||
9 | // Unless required by applicable law or agreed to in writing, software | |||
10 | // distributed under the License is distributed on an "AS IS" BASIS, | |||
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
12 | // See the License for the specific language governing permissions and | |||
13 | // limitations under the License. | |||
14 | #include "Mapping/LexiLabelling.hpp" | |||
15 | ||||
16 | namespace tket { | |||
17 | ||||
18 | 2954 | std::pair<bool, unit_map_t> LexiLabellingMethod::routing_method( | ||
19 | MappingFrontier_ptr& mapping_frontier, | |||
20 | const ArchitecturePtr& architecture) const { | |||
21 |
1/2✓ Branch 1 taken 2954 times.
✗ Branch 2 not taken.
|
2954 | LexiRoute lr(architecture, mapping_frontier); | |
22 |
2/4✓ Branch 1 taken 2954 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 2954 times.
✗ Branch 6 not taken.
|
5908 | return {lr.solve_labelling(), {}}; | |
23 | 2954 | } | ||
24 | ||||
25 | 23 | nlohmann::json LexiLabellingMethod::serialize() const { | ||
26 | 23 | nlohmann::json j; | ||
27 |
2/4✓ Branch 1 taken 23 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 23 times.
✗ Branch 5 not taken.
|
23 | j["name"] = "LexiLabellingMethod"; | |
28 | 23 | return j; | ||
29 | } | |||
30 | ||||
31 | 1 | LexiLabellingMethod LexiLabellingMethod::deserialize( | ||
32 | const nlohmann::json& /*j*/) { | |||
33 | 1 | return LexiLabellingMethod(); | ||
34 | } | |||
35 | ||||
36 | } // namespace tket | |||
37 |