Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add algorithms to component_attr in relevant tests #43

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions qiskit_neko/tests/nature/test_ground_state_solver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022, 2023.
# (C) Copyright IBM 2022, 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -34,7 +34,7 @@ class TestGroundStateSolvers(base.BaseTestCase):
tuple(map(int, qiskit_nature.__version__.split(".")[:2])) < (0, 7),
"This test is incompatible with qiskit_nature versions below 0.7.0",
)
@decorators.component_attr("terra", "backend", "nature")
@decorators.component_attr("terra", "backend", "nature", "algorithms")
def test_ground_state_solver(self):
"""Test the execution of a bell circuit with an explicit shot count."""
driver = PySCFDriver(atom="H 0.0 0.0 0.0; H 0.0 0.0 0.735", basis="sto3g")
Expand Down
10 changes: 5 additions & 5 deletions qiskit_neko/tests/primitives/test_vqe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022, 2023.
# (C) Copyright IBM 2022, 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -35,7 +35,7 @@ def setUp(self):
if hasattr(self.backend.options, "seed_simulator"):
self.backend.set_options(seed_simulator=42)

@decorators.component_attr("terra", "backend")
@decorators.component_attr("terra", "backend", "algorithms")
def test_sampling_vqe(self):
"""Test the execution of SamplingVQE with BackendSampler."""
sampler = BackendSampler(self.backend)
Expand All @@ -48,7 +48,7 @@ def test_sampling_vqe(self):
expected = -1.38
self.assertAlmostEqual(expected, eigenvalue, delta=0.3)

@decorators.component_attr("terra", "aer")
@decorators.component_attr("terra", "aer", "algorithms")
def test_aer_sampling_vqe(self):
"""Test the aer sampler with SamplingVQE."""
sampler = Sampler(backend_options={"seed_simulator": 42})
Expand All @@ -61,7 +61,7 @@ def test_aer_sampling_vqe(self):
expected = -1.38
self.assertAlmostEqual(expected, eigenvalue, delta=0.3)

@decorators.component_attr("terra", "backend")
@decorators.component_attr("terra", "backend", "algorithms")
def test_vqe(self):
"""Test the execution of VQE with BackendEstimator."""
estimator = BackendEstimator(self.backend)
Expand All @@ -74,7 +74,7 @@ def test_vqe(self):
expected = -1.38
self.assertAlmostEqual(expected, eigenvalue, delta=0.3)

@decorators.component_attr("terra", "aer")
@decorators.component_attr("terra", "aer", "algorithms")
def test_aer_vqe(self):
"""Test the execution of VQE with Aer Estimator."""
estimator = Estimator(backend_options={"seed_simulator": 42})
Expand Down
Loading