Skip to content

Commit

Permalink
add test for rigetti_aspen/agave architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasberent committed Jun 3, 2022
1 parent b9bab68 commit 358ee56
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ Architectures that are available per default (either as strings or under `qmap.A
- `IBMQ_Bogota` (5 qubit, undirected linear chain layout)
- `IBMQ_Casablanca` (7 qubit, undirected H-shape layout)
- `IBMQ_Tokyo` (20 qubit, undirected brick-like layout)
- `Rigetti_Agave` (8 qubit, bidirected ring layout)
- `Rigetti_Aspen` (16 qubit, bidirected dumbbell layout)
- `Rigetti_Agave` (8 qubit, undirected ring layout)
- `Rigetti_Aspen` (16 qubit, undirected dumbbell layout)

Whether the heuristic (*default*) or the exact mapper is used can be controlled by passing `method="heuristic"` or `method="exact"` to the `compile` function.

Expand Down
15 changes: 15 additions & 0 deletions test/test_exact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,18 @@ TEST_F(ExactTest, MapToSubgraphNotConnected) {
const auto& results = IBMQ_London_mapper->getResults();
EXPECT_TRUE(results.timeout);
}
TEST_F(ExactTest, CommanderEncodingRigettiArch) {
Architecture aspen;
aspen.loadCouplingMap(AvailableArchitecture::Rigetti_Aspen);
Architecture agave;
agave.loadCouplingMap(AvailableArchitecture::Rigetti_Agave);

auto aspenMapper = ExactMapper(qc, aspen);
auto agaveMapper = ExactMapper(qc, agave);
aspenMapper.map(settings);
agaveMapper.map(settings);
aspenMapper.printResult(std::cout);
agaveMapper.printResult(std::cout);

SUCCEED() << "Mapping successful";
}

0 comments on commit 358ee56

Please sign in to comment.