    for i in range(n - 1, 0, -1):
        c_storage[i] = update_c_right(c_storage[i + 1], mps_b[i], mpo_x[i], mps_a[i])

    return c_storage

def reduceD_onesite(tensor_a, tensor_x, c_left, c_right):
    c_left, numind_x = contract_tensors(c_left, 3, (2, ), tensor_a, 3, (0, ))
    c_left, numind_x = contract_tensors(c_left, 4, (1, 3), tensor_x, 4, (0, 3))