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

Restrict cvxpy testing to python 3.7 and 3.8 #1074

Merged
merged 5 commits into from
Dec 8, 2020
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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
run: |
set -e
cd qiskit-tutorials
rm -rf tutorials/chemistry tutorials/circuits tutorials/circuits_advanced tutorials/finance tutorials/optimization tutorials/noise
rm -rf tutorials/chemistry tutorials/circuits tutorials/circuits_advanced tutorials/finance tutorials/optimization tutorials/algorithms tutorials/operators tutorials/noise
sphinx-build -b html . _build/html
- uses: actions/upload-artifact@v2
with:
Expand Down
4 changes: 3 additions & 1 deletion qiskit/providers/aer/pulse/controllers/digest_pulse_qobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ def experiment_to_structs(experiment, ham_chans, pulse_inds, pulse_to_int, dt, q
structs['channels'][chan_name][1].extend([inst['t0'] * dt,
inst['phase'],
cond])

# Delay instruction
elif inst['name'] == 'delay':
pass # nothing to be done in this case
# A standard pulse
else:
start = inst['t0'] * dt
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake!=3.17.1,!=3.17.0
conan>=1.22.2
scikit-build
asv
cvxpy>=1.0.0
cvxpy>=1.0.0;python_version>'3.6' and python_version<='3.8'
pylint
pycodestyle
Sphinx>=1.8.3
Expand Down
2 changes: 1 addition & 1 deletion test/terra/backends/test_config_pulse_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_from_backend(self):
for idx, entry in enumerate(sim_dict[key]):
for entry_key in entry:
if entry_key == 'samples':
self.assertTrue(all(entry[entry_key] == backend_dict[key][idx][entry_key]))
self.assertTrue(np.array_equal(entry[entry_key], backend_dict[key][idx][entry_key]))
else:
self.assertTrue(entry[entry_key] == backend_dict[key][idx][entry_key])
else:
Expand Down
7 changes: 7 additions & 0 deletions test/terra/noise/test_noise_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
NoiseTransformer class tests
"""

import unittest
from ..common import QiskitAerTestCase

import numpy
Expand All @@ -26,7 +27,13 @@
from qiskit.providers.aer.noise.errors.standard_errors import pauli_error
from qiskit.providers.aer.noise.errors.quantum_error import QuantumError

try:
import cvxpy
HAS_CVXPY = True
except ImportError:
HAS_CVXPY = False

@unittest.skipUnless(HAS_CVXPY, 'cvxpy is required to run these tests')
class TestNoiseTransformer(QiskitAerTestCase):
def setUp(self):
super().setUp()
Expand Down