Commit 862b5c14 authored by Thien Nguyen's avatar Thien Nguyen
Browse files

Fixed regression due to ExaTN changes

This change in ExaTN renamed the root tensor to a hex string even for tensor networks constructed by strings:
https://github.com/ORNL-QCI/exatn/commit/587f45253277610cabfe5f671195d1e4621cc629#diff-9d6d10c6caced802d1c50c95e06040475537495e1c86f13551202a51b8e907d0R262

Hence, the name checking logic in MPS visitor was broken. Fixed accordingly.
parent 5bc51ada
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ void ExatnMpsVisitor::initialize(std::shared_ptr<AcceleratorBuffer> buffer, int
    for (auto iter = m_tensorNetwork->cbegin(); iter != m_tensorNetwork->cend(); ++iter)
    {
        const auto& tensorName = iter->second.getTensor()->getName();
        if (tensorName != ROOT_TENSOR_NAME)
        if (iter->first != 0)
        {
            auto tensor = iter->second.getTensor();
            const auto newTensorName = "Q" + std::to_string(iter->first - 1);
@@ -518,7 +518,7 @@ void ExatnMpsVisitor::initialize(std::shared_ptr<AcceleratorBuffer> buffer, int
    for (auto iter = m_tensorNetwork->cbegin(); iter != m_tensorNetwork->cend(); ++iter)
    {
        const auto& tensorName = iter->second.getTensor()->getName();
        if (tensorName != ROOT_TENSOR_NAME)
        if (iter->first != 0)
        {
            auto tensor = iter->second.getTensor();
            const auto newTensorName = "Q" + std::to_string(iter->first - 1);