Skip to content

Commit

Permalink
test(algorithms): skip vqe
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhaoyilunnn committed Aug 20, 2024
1 parent 5af7aa6 commit 3050b4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/quafu/algorithms/varational_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import math

import numpy as np
import pytest
import scipy.sparse as sp
from quafu.algorithms.gradients import grad_adjoint, grad_finit_diff, grad_para_shift
from quafu.algorithms.hamiltonian import Hamiltonian, PauliMats, PauliOp
Expand Down Expand Up @@ -125,6 +126,7 @@ def test_ctrl_adjoint(self):
for i in range(len(grads_fd)):
assert abs(grads_fd[i] - grads_ad[i]) < 1e-5

@pytest.mark.skip("Cannot reproduce stably due to randomness")
def test_vqe(self):
from scipy.optimize import minimize

Expand Down Expand Up @@ -195,6 +197,7 @@ def callback(x):
plt.xlabel("iteration")
plt.ylabel("E")

@pytest.mark.skip("Cannot reproduce stably due to randomness")
def test_vqe_with_wrap(self):
from scipy.optimize import minimize

Expand Down

0 comments on commit 3050b4b

Please sign in to comment.