Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 13, 2023
1 parent c61bfca commit b89a0e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_models_dbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ def test_energy_fluctuations(backend):
state = np.array([1, 0])
dbf = DoubleBracketIteration(Hamiltonian(1, matrix=h0, backend=backend))
energy_fluctuation = dbf.energy_fluctuation(state=state)
assert energy_fluctuation == 0
assert energy_fluctuation == 0
3 changes: 2 additions & 1 deletion tests/test_models_variational.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,10 @@ def test_custom_loss(test_input, test_param, expected):
)
assert abs(best - expected) <= 0.01


def test_energy_fluctuations(backend):
h0 = np.array([[1, 0], [0, -1]])
state = np.array([1, 0])
dbf = DoubleBracketIteration(Hamiltonian(1, matrix=h0, backend=backend))
energy_fluctuation = dbf.energy_fluctuation(state=state)
assert energy_fluctuation == 0
assert energy_fluctuation == 0

0 comments on commit b89a0e7

Please sign in to comment.