We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a070d5 commit cb4e53eCopy full SHA for cb4e53e
src/qml_benchmarks/models/base.py
@@ -203,7 +203,7 @@ def probability(self, x):
203
x (np.array): A configuration
204
"""
205
206
- if not(hasattr(self, 'partition_function')):
+ if self.partition_function is None:
207
self.compute_partition_function()
208
209
return jnp.exp(-self.energy(self.params_, x)[0]) / self.partition_function
0 commit comments