Commit 26a7137b authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

updating with num_server sync in python api on tensor name


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 3af05f95
Pipeline #72269 passed with stage
in 4 minutes and 30 seconds
......@@ -332,6 +332,8 @@ PYBIND11_MODULE(_pyexatn, m) {
.def("sync", (bool (exatn::NumServer::*)(const exatn::numerics::Tensor &, bool)) &exatn::NumServer::sync, "")
.def("sync", (bool (exatn::NumServer::*)(exatn::numerics::TensorOperation &, bool)) &exatn::NumServer::sync, "")
.def("sync", (bool (exatn::NumServer::*)(exatn::numerics::TensorNetwork &, bool)) &exatn::NumServer::sync, "")
.def("sync", (bool (exatn::NumServer::*)(const std::string &, bool)) & exatn::NumServer::sync, "")
.def("getTensorRef", &exatn::NumServer::getTensorRef, "")
.def("createTensor", [](exatn::NumServer& n, const std::string name, std::vector<std::size_t> dims) {
bool created = false;
created = n.createTensor(name, exatn::numerics::TensorShape(dims));
......
......@@ -24,6 +24,7 @@ num_server.initTensor("S2",0.001)
num_server.evaluateTensorNetwork("{0,1} 3-site MPS closure",
"Z0() = T0(a,b) * T1(b,c,d) * T2(d,e) * H0(a,c,f,g) * S0(f,h) * S1(h,g,i) * S2(i,e)")
num_server.sync("Z0", True)
num_server.destroyTensor("Z0")
num_server.destroyTensor("T0")
......
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