Skip to content

Commit

Permalink
Fix Aer Deprecate Messages (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
manoelmarques authored Jun 26, 2022
1 parent acbe946 commit 0ccb02d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ jobs:
shell: bash
- name: Combined Deprecation Messages
run: |
sort -f -u /tmp/o37/opt.dep /tmp/o38/opt.dep /tmp/o39/opt.dep /tmp/o310/opt.dep /tmp/m38/opt.dep /tmp/m310/opt.dep /tmp/w38/opt.dep tmp/w310/opt.dep || true
sort -f -u /tmp/o37/opt.dep /tmp/o38/opt.dep /tmp/o39/opt.dep /tmp/o310/opt.dep /tmp/m38/opt.dep /tmp/m310/opt.dep /tmp/w38/opt.dep /tmp/w310/opt.dep || true
shell: bash
- name: Coverage combine
run: coverage3 combine /tmp/o37/opt.dat
Expand Down
13 changes: 8 additions & 5 deletions test/algorithms/test_grover_optimizer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
# (C) Copyright IBM 2020, 2022.
#
# 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 All @@ -18,8 +18,8 @@
import numpy as np
from ddt import data, ddt
from docplex.mp.model import Model
from qiskit import Aer
from qiskit.utils import QuantumInstance, algorithm_globals
import qiskit
from qiskit.utils import QuantumInstance, algorithm_globals, optionals
from qiskit.algorithms import NumPyMinimumEigensolver
from qiskit_optimization.algorithms import (
GroverOptimizer,
Expand All @@ -41,16 +41,19 @@
class TestGroverOptimizer(QiskitOptimizationTestCase):
"""GroverOptimizer tests."""

@unittest.skipUnless(optionals.HAS_AER, "qiskit-aer is required to run this test")
def setUp(self):
super().setUp()
algorithm_globals.random_seed = 1
self.sv_simulator = QuantumInstance(
Aer.get_backend("aer_simulator_statevector"),
qiskit.providers.aer.Aer.get_backend("aer_simulator_statevector"),
seed_simulator=921,
seed_transpiler=200,
)
self.qasm_simulator = QuantumInstance(
Aer.get_backend("aer_simulator"), seed_simulator=123, seed_transpiler=123
qiskit.providers.aer.Aer.get_backend("aer_simulator"),
seed_simulator=123,
seed_transpiler=123,
)
self.n_iter = 8

Expand Down

0 comments on commit 0ccb02d

Please sign in to comment.