Skip to content

Commit cb4e53e

Browse files
committed
fix prob function
1 parent 6a070d5 commit cb4e53e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qml_benchmarks/models/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def probability(self, x):
203203
x (np.array): A configuration
204204
"""
205205

206-
if not(hasattr(self, 'partition_function')):
206+
if self.partition_function is None:
207207
self.compute_partition_function()
208208

209209
return jnp.exp(-self.energy(self.params_, x)[0]) / self.partition_function

0 commit comments

Comments
 (0)