-
Notifications
You must be signed in to change notification settings - Fork 62
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
Update matplotlib #1413
Update matplotlib #1413
Conversation
Tests are not passing, but the problems are all caused by PyTorch on Windows. Any idea? @BrunoLiegiBastonLiegi @renatomello @Simone-Bordoni |
Note that this branch bumped PyTorch from 2.3.1 to 2.4.0, but it was allowed by the specified range in If we do not support PyTorch 2.4.0 (or not on Windows), we should update the |
I was experiencing similar problems with some tests of |
@BrunoLiegiBastonLiegi I remembered of your troubles with Windows in QiboML (though I also remember you ended up deactivating the tests on Windows in qiboteam/qiboml#20 😞). That's why I asked you as well. In any case, thanks for your answer. Let's wait for @renatomello and @Simone-Bordoni, who spent the most time with the torch backend. |
Just to add on my previous comment I tested this simple example from qibo import gates, hamiltonians
from qibo.quantum_info import random_clifford
from qibo.symbols import Z
from qibo.backends import PyTorchBackend
backend = PyTorchBackend()
nqubits = 5
c = random_clifford(nqubits, backend=backend)
c.add(gates.M(*range(nqubits)))
observable = hamiltonians.SymbolicHamiltonian(
sum([(i+1)**2*Z(i) for i in range(nqubits)]),
nqubits=nqubits,
backend=backend,
)
for _ in range(10):
print(observable.expectation_from_samples(backend.execute_circuit(c).frequencies())) which results in a widely different expectation value every time:
The
|
This is a rough patch, to attempt limiting the issues discussed in #1413 (comment)
@scarrazza should we keep an open issue about the PyTorch version? To be fair, if yes, we should even move it to Qiboml, since the torch backend won't be here forever... |
Yes, I think so. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1413 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 78 78
Lines 11222 11225 +3
=======================================
+ Hits 11216 11219 +3
Misses 6 6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Issue opened qiboteam/qiboml#31 |
Thanks. |
Cf. #1411 (comment)