Skip to content

Commit

Permalink
Skip Operator test is qiskit >=1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ihincks committed Feb 2, 2024
1 parent b0903f9 commit a151bc7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/terra/primitives/test_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import numpy as np
from ddt import data, ddt
import qiskit
from qiskit.circuit import Parameter, QuantumCircuit
from qiskit.circuit.library import RealAmplitudes
from qiskit.exceptions import QiskitError
Expand Down Expand Up @@ -84,6 +85,10 @@ def test_estimator(self, abelian_grouping):
np.testing.assert_allclose(result.values, [-0.4], rtol=0.02)

@data(True, False)
@unittest.skipUnless(
qiskit.__version__.startswith("0."),
reason="Operator support in primitives was removed following Qiskit 0.46",
)
def test_init_observable_from_operator(self, abelian_grouping):
"""test for evaluate without parameters"""
circuit = self.ansatz.assign_parameters([0, 1, 1, 2, 3, 5])
Expand Down

0 comments on commit a151bc7

Please sign in to comment.