File size: 286 Bytes
2a87ede | 1 2 3 4 5 6 7 8 9 10 11 12 | """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()
|