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 broken CI #210

Merged
merged 6 commits into from
Apr 11, 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 .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
- name: Install dependencies
run: |
conda config --set always_yes yes --set changeps1 no
pip install -U -r requirements.txt
pip install -U -r requirements.txt -c constraints.txt
- name: Lint with pylint and pycodestyle
run: |
pip install -U -r requirements-dev.txt
pip install -U -r requirements-dev.txt -c constraints.txt
python setup.py build_ext --inplace
pylint -rn mthree
pycodestyle --max-line-length=100 mthree
Expand Down
2 changes: 2 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
astroid~=3.0.1 # Must be kept aligned to what pylint wants
ipykernel==6.11.0
4 changes: 2 additions & 2 deletions docs/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ For example let us compare raw data verse the mitigated results in a simple case
qc.cx(1, 0)
qc.measure_all()

raw_counts = execute(qc, backend).result().get_counts()
raw_counts = backend.run(qc).result().get_counts()
mit = mthree.M3Mitigation(backend)
mit.cals_from_system()
mit_counts = mit.apply_correction(raw_counts, qubits=range(4),
Expand Down Expand Up @@ -117,7 +117,7 @@ mitigate 5 circuits:

.. jupyter-execute::

raw_counts = execute([qc]*5, backend).result().get_counts()
raw_counts = backend.run([qc]*5).result().get_counts()
mit = mthree.M3Mitigation(backend)
mit.cals_from_system()
mit_counts = mit.apply_correction(raw_counts, qubits=range(4),
Expand Down
3 changes: 1 addition & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
qiskit-aer>=0.13
pytest
pylint==2.16.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry this might be too loose for pylint which notoriously has had issues with rule stability between even on bugfix releases. But lets give it a try and we can do an exact version pin if needed

pylint~=3.0.2
pycodestyle
Sphinx>=7.0,<=8
qiskit_sphinx_theme~=1.12.0
Expand All @@ -9,6 +9,5 @@ pylatexenc
jupyter-sphinx
nbsphinx
psutil
ipykernel<6
Jinja2<3.1
quantum-styles
2 changes: 1 addition & 1 deletion tutorials/10_basic_vqe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
"source": [
"def vqe_func(params, *args):\n",
" # Attach parameters to the transpiled circuit variables\n",
" bound_circs = [circ.bind_parameters(params) for circ in trans_circs]\n",
" bound_circs = [circ.assign_parameters(params) for circ in trans_circs]\n",
" # Submit the job and get the resultant counts back\n",
" counts = backend.run(bound_circs, shots=4096).result().get_counts()\n",
" # Apply mitigation to get quasi-probabilities\n",
Expand Down
Loading