Open PietropaoloFrisoni opened 1 week ago
Hi @PietropaoloFrisoni, thanks for the issue, will look into shortly. For info, what is the error that is raised?
Thanks @jcmgray!
I forgot to report the output error. I get:
ValueError: math domain error
I suspect that in quimb/tensor/circuit.py:1353, in rehearsal_dict(tn, tree)
we are trying to compute the logarithm of a negative number. Thanks again!
Ah yes, probably the circuit simplifies to a scalar, with contraction cost 0, which causes the domain error. Probably a simple max(1, tree.contraction_cost())
guard would suffice here.
What is your issue?
Good morning @jcmgray, I hope you are doing well.
I was studying the Rehearsals section of the documentation, which hopefully can be very helpful for optimizing circuits using
quimb
.However, I encounter some errors that are probably bugs, but it is also possible that I am missing something and misusing this functionality. I leave a few minimal examples here to show where the problems arise:
I just noticed that also the following example (taken from the documentation) seems to have issues:
I am using
quimb 1.8.2
.As always, thank you so much for your time!