Skip to content

Commit

Permalink
remove energy fluctuation tests from models
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoRobbiati committed Dec 13, 2023
1 parent f9b066e commit 2e0b99a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions tests/test_models_dbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,3 @@ def test_hyperopt_step(backend, nqubits):
# evolve following the optimized first step
for gentype in range(look_ahead):
dbf(mode=DoubleBracketGeneratorType(gentype + 1), step=step, d=d)


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
5 changes: 0 additions & 5 deletions tests/test_models_variational.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@ def test_vqe(backend, method, options, compile, filename):
if filename is not None:
assert_regression_fixture(backend, params, filename)

# test energy fluctuation
state = np.ones(2**nqubits) / np.sqrt(2**nqubits)
energy_fluctuation = v.energy_fluctuation(state)
assert energy_fluctuation >= 0


@pytest.mark.parametrize(
"solver,dense",
Expand Down

0 comments on commit 2e0b99a

Please sign in to comment.