Download tests/_helpers.py from Tatopenn/dense-Evolution: direct link, hf CLI and curl.
- Browser
- Download file 286 Bytes
-
https://huggingface.co/Tatopenn/dense-Evolution/resolve/main/tests/_helpers.py
- Command line
-
hf download hf://Tatopenn/dense-Evolution/tests/_helpers.py
-
curl -L -o _helpers.py https://huggingface.co/Tatopenn/dense-Evolution/resolve/main/tests/_helpers.py
286 Bytes
| """Small assertion helpers shared across a few test files (not fixtures -- | |
| plain functions, imported explicitly where needed).""" | |
| import numpy as np | |
| def norm(sim): | |
| return float(np.linalg.norm(sim.get_statevector())) | |
| def probs(sim): | |
| return sim.get_probabilities() | |