Skip to content

Commit

Permalink
Update qiskit support version to 0.46 (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxiLi authored Apr 3, 2024
1 parent eb38dbb commit 3a71dd9
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ jobs:
- case-name: qiskit+qir
os: windows-latest
qutip-version: ''
qiskit-version: '==0.36.*'
qiskit-version: '==0.46.*'
pyqir-version: '==0.6.2'
python-version: '3.9'
- case-name: qiskit+qir
os: macOS-latest
qutip-version: ''
qiskit-version: '==0.36.*'
qiskit-version: '==0.46.*'
pyqir-version: '==0.6.2'
python-version: '3.9'
- case-name: qiskit+qir
os: ubuntu-latest
qutip-version: ''
qiskit-version: '==0.36.*'
qiskit-version: '==0.46.*'
pyqir-version: '==0.6.2'
python-version: '3.9'

Expand All @@ -70,7 +70,7 @@ jobs:
- name: Install Qiskit from PyPI
if: ${{ matrix.qiskit-version != '' }}
run: python -m pip install 'qiskit${{ matrix.qiskit-version }}'
run: python -m pip install 'qiskit${{ matrix.qiskit-version }}' 'qiskit-aer==0.14.0.1'

- name: Install PyQIR from PyPI
if: ${{ matrix.pyqir-version != '' }}
Expand Down
3 changes: 2 additions & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ docutils==0.17.1
sphinxcontrib-bibtex==2.4.2
pyqir-generator==0.6.2
pyqir-parser==0.6.2
qiskit==0.37.2
qiskit==0.46.1
qiskit-aer==0.14.0.1
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ full =
%(tests)s
%(control)s
qiskit =
qiskit>=0.36.2
qiskit<1.0.0
qiskit_aer
2 changes: 2 additions & 0 deletions tests/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ filterwarnings =
ignore:matplotlib not found:UserWarning
ignore:the imp module is deprecated in favour of importlib:DeprecationWarning
ignore:Dedicated options class are no longer needed, options should be passed as dict to solvers.:FutureWarning
ignore::DeprecationWarning:qiskit.utils.algorithm_globals:

26 changes: 11 additions & 15 deletions tests/test_qiskit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,21 @@
DispersiveCavityQED,
)

try:
from qiskit import QuantumCircuit
from qiskit.providers.aer import AerSimulator
from qutip_qip.qiskit.provider import (
QiskitCircuitSimulator,
QiskitPulseSimulator,
)
from qutip_qip.qiskit.converter import (
convert_qiskit_circuit,
_get_qutip_index,
)
except ImportError:
pass


# will skip tests in this entire file
# if qiskit is not installed
pytest.importorskip("qiskit")

from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator
from qutip_qip.qiskit.provider import (
QiskitCircuitSimulator,
QiskitPulseSimulator,
)
from qutip_qip.qiskit.converter import (
convert_qiskit_circuit,
_get_qutip_index,
)


class TestConverter:
"""
Expand Down

0 comments on commit 3a71dd9

Please sign in to comment.