Commit 724408dc authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

creating placement folder, adding maptophysical as minor-graph-embedding-placement


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent b429deff
Pipeline #83324 passed with stage
in 4 minutes and 19 seconds
......@@ -19,6 +19,6 @@ add_subdirectory(decorators)
add_subdirectory(circuits)
add_subdirectory(optimizers)
add_subdirectory(ionq)
add_subdirectory(qplacement)
add_subdirectory(placement)
#add_subdirectory(scaffold)
add_subdirectory(xasm)
add_subdirectory(minor_graph_embedding)
\ No newline at end of file
set(LIBRARY_NAME xacc-qplacement)
set(LIBRARY_NAME xacc-minor-graph-embedding-placement)
file (GLOB_RECURSE HEADERS *.hpp)
file (GLOB SRC *.cpp)
......
......@@ -22,7 +22,7 @@ using namespace xacc;
namespace xacc {
namespace quantum {
// MapToPhysical is an IRTransformation that maps the logical program IR qubit indices to the physical qubits available on the given lattice
// MapToPhysical is an IRTransformation that maps the logical program IR qubit indices to the physical qubits available on the given lattice
class MapToPhysical : public xacc::IRTransformation {
protected:
std::vector<std::pair<int,int>> _edges;
......@@ -34,7 +34,7 @@ namespace quantum {
const HeterogeneousMap &optioins = {}) override;
const IRTransformationType type() const override {return IRTransformationType::Placement;}
//std::shared_ptr<IR> transform(std::shared_ptr<IR> ir, std::shared_ptr<Accelerator> acc) override;
const std::string name() const override { return "MapToPhysical"; }
const std::string name() const override { return "minor-graph-embedding-placement"; }
const std::string description() const override { return ""; }
};
......
add_xacc_test(QPlacement)
target_link_libraries(QPlacementTester xacc-minor-graph-embedding-placement)
......@@ -34,7 +34,7 @@ TEST(QPlacementTester, checkBellSimple) {
// use the dummy accelerator
xacc::setAccelerator("dummy");
auto acc = xacc::getAccelerator("dummy");
auto compiler = xacc::getCompiler("xasm");
auto bell_IR = compiler->compile(R"(__qpu__ void bell(qbit q) {
H(q[0]);
......@@ -44,7 +44,7 @@ TEST(QPlacementTester, checkBellSimple) {
})");
auto bell_composite = bell_IR->getComposites()[0];
auto A = xacc::getIRTransformation("MapToPhysical");
auto A = xacc::getIRTransformation("minor-graph-embedding-placement");
HeterogeneousMap m;
A->apply(bell_composite, //std::shared_ptr<CompositeInstruction> function,
acc, //const std::shared_ptr<Accelerator> acc,
......
add_xacc_test(QPlacement)
target_link_libraries(QPlacementTester xacc-qplacement ${PYTHON_LIBRARY})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment