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

Fix Github Actions #37

Merged
merged 1 commit into from
Feb 8, 2021
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
10 changes: 3 additions & 7 deletions .github/actions/install-master-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ runs:
conda activate
fi
pip install https://github.com/Qiskit/qiskit-terra/archive/master.zip
pip install https://github.com/Qiskit/qiskit-ibmq-provider/archive/master.zip
sudo apt-get -y install g++-7
sudo apt-get -y install libopenblas-dev
git clone https://github.com/Qiskit/qiskit-aer.git /tmp/qiskit-aer
cd /tmp/qiskit-aer
python /tmp/qiskit-aer/setup.py bdist_wheel -- -DCMAKE_CXX_COMPILER=g++-7 -DAER_THRUST_BACKEND=OMP -- -j4
pip install /tmp/qiskit-aer/dist/qiskit_aer*whl
pip install https://github.com/Qiskit/qiskit-ignis/archive/master.zip
pip install https://github.com/Qiskit/qiskit-aer/archive/master.zip
# install Aqua until code is converted to use qiskit-terra
pip install https://github.com/Qiskit/qiskit-aqua/archive/master.zip
shell: bash
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ sphinx-autodoc-typehints
jupyter-sphinx
discover
qiskit-aer
qiskit-ibmq-provider
mypy>=0.780
mypy-extensions>=0.4.3
networkx>=2.2
Expand Down
3 changes: 2 additions & 1 deletion test/test_readme_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def setUp(self):
# pylint: disable=import-outside-toplevel
# pylint: disable=unused-import
from qiskit import Aer
except Exception as ex: # pylint: disable=broad-except
_ = Aer.get_backend('statevector_simulator')
except ImportError as ex: # pylint: disable=broad-except
self.skipTest("Aer doesn't appear to be installed. Error: '{}'".format(str(ex)))
return

Expand Down
12 changes: 6 additions & 6 deletions test/test_uccsd_hartree_fock.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ def test_uccsd_hf_aer_statevector(self):
try:
# pylint: disable=import-outside-toplevel
from qiskit import Aer
except Exception as ex: # pylint: disable=broad-except
backend = Aer.get_backend('statevector_simulator')
except ImportError as ex: # pylint: disable=broad-except
self.skipTest("Aer doesn't appear to be installed. Error: '{}'".format(str(ex)))
return
backend = Aer.get_backend('statevector_simulator')
solver = VQE(var_form=self.var_form, optimizer=self.optimizer,
quantum_instance=QuantumInstance(backend=backend))

Expand All @@ -108,10 +108,10 @@ def test_uccsd_hf_aer_qasm(self):
try:
# pylint: disable=import-outside-toplevel
from qiskit import Aer
except Exception as ex: # pylint: disable=broad-except
backend = Aer.get_backend('qasm_simulator')
except ImportError as ex: # pylint: disable=broad-except
self.skipTest("Aer doesn't appear to be installed. Error: '{}'".format(str(ex)))
return
backend = Aer.get_backend('qasm_simulator')
optimizer = SPSA(maxiter=200, last_avg=5)
solver = VQE(var_form=self.var_form, optimizer=optimizer,
expectation=PauliExpectation(),
Expand All @@ -129,10 +129,10 @@ def test_uccsd_hf_aer_qasm_snapshot(self):
try:
# pylint: disable=import-outside-toplevel
from qiskit import Aer
except Exception as ex: # pylint: disable=broad-except
backend = Aer.get_backend('qasm_simulator')
except ImportError as ex: # pylint: disable=broad-except
self.skipTest("Aer doesn't appear to be installed. Error: '{}'".format(str(ex)))
return
backend = Aer.get_backend('qasm_simulator')
optimizer = SPSA(maxiter=200, last_avg=5)
solver = VQE(var_form=self.var_form, optimizer=optimizer,
expectation=AerPauliExpectation(),
Expand Down
4 changes: 2 additions & 2 deletions test/test_vqe_uccsd_adapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ def test_vqe_adapt(self):
try:
# pylint: disable=import-outside-toplevel
from qiskit import Aer
except Exception as ex: # pylint: disable=broad-except
backend = Aer.get_backend('statevector_simulator')
except ImportError as ex: # pylint: disable=broad-except
self.skipTest("Aer doesn't appear to be installed. Error: '{}'".format(str(ex)))
return

self.var_form_base = UCCSD(self.num_spin_orbitals,
self.num_particles, initial_state=self.init_state)
backend = Aer.get_backend('statevector_simulator')
optimizer = L_BFGS_B()

warnings.filterwarnings('ignore', category=DeprecationWarning)
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ setenv =
ARGS="-V"
deps = https://github.com/Qiskit/qiskit-terra/archive/master.zip
https://github.com/Qiskit/qiskit-aer/archive/master.zip
https://github.com/Qiskit/qiskit-ibmq-provider/archive/master.zip
https://github.com/Qiskit/qiskit-aqua/archive/master.zip
-r{toxinidir}/requirements-dev.txt
commands =
Expand Down