Commit 7e3cdcb2 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

updating to get getState working in python api

Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <>
parent d7ec6f7a
#include "XACC.hpp"
#include "IRGenerator.hpp"
#include <pybind11/complex.h>
#include <pybind11/numpy.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
......@@ -233,12 +234,10 @@ PYBIND11_MODULE(_pyxacc, m) {
}, "Convenience function for creating a new GateIR.");
[](std::shared_ptr<Accelerator> acc, std::shared_ptr<Function> f) -> Eigen::VectorXcd {
[](std::shared_ptr<Accelerator> acc, std::shared_ptr<Function> f) {
auto results = acc->getAcceleratorState(f);
for (auto r : results) {
std::cout << r << "\n";
return Eigen::Map<Eigen::VectorXcd>(, results.size());
Eigen::VectorXcd ret = Eigen::Map<Eigen::VectorXcd>(, results.size());
return ret;
}, "Compute and return the state after execution of the given program on the given accelerator.");
Supports Markdown
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