New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TensorNetwork.find_order() returns None when cost/cw is high #24
Comments
Hello ChienKaiMa, Thank you very much for raising this issue. We will look into that and make corrections accordingly. In the meantime, could you provide a test script that reproduces this error? Thanks! Cupjin |
I have difficulties attaching files right here, so I forked the repository and committed the modified code and circuit files in use in ChienKaiMa@fce402e |
to alibaba/acqdp alibaba#24
Hello @ChienKaiMa , I have added a warning when the order finding returns Regarding your concern that it took too long for the process to halt, I have also slightly changed the code logic for slight improvement of performance. I would like to mention that there are cases where it is not clear if the tensor network is indeed intractable or not without a heavy pre-processing. In cases where such pre-processing is not needed, I suggest changing the Hope this helps. Cupjin |
I executed
examples/circuit_simulation.py
on the workstation machine (Ubuntu 20.04), withorder_finder_name
inkhp_params.json
set todefault
.The code spend more than 2 hours but halts with AttributeError. I found in line 97 to 102 in
tensor_network.py
thatResourceWarning
should be raised when cost is too high. However, sinceres
is None, it does not have thecost
attribute. A temporary fix is to raise error or warning before thefind_order
function returnsNone
, but it would be nice to investigate why line 92res = next(get_order_finder(**kwargs).find_order(self))
returnsNone
. It would be great to raise warning before the software wastes too much time searching for contraction order if the result is probablyNone
.The text was updated successfully, but these errors were encountered: