diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 82e95cc8..1e4719b3 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -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 diff --git a/constraints.txt b/constraints.txt index e69de29b..bbe0a36d 100644 --- a/constraints.txt +++ b/constraints.txt @@ -0,0 +1,2 @@ +astroid~=3.0.1 # Must be kept aligned to what pylint wants +ipykernel==6.11.0 \ No newline at end of file diff --git a/docs/utils.rst b/docs/utils.rst index 77a2f19f..413feec8 100644 --- a/docs/utils.rst +++ b/docs/utils.rst @@ -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), @@ -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), diff --git a/requirements-dev.txt b/requirements-dev.txt index a5ec14ae..69b99c48 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ qiskit-aer>=0.13 pytest -pylint==2.16.2 +pylint~=3.0.2 pycodestyle Sphinx>=7.0,<=8 qiskit_sphinx_theme~=1.12.0 @@ -9,6 +9,5 @@ pylatexenc jupyter-sphinx nbsphinx psutil -ipykernel<6 Jinja2<3.1 quantum-styles diff --git a/tutorials/10_basic_vqe.ipynb b/tutorials/10_basic_vqe.ipynb index fb17ea88..837682e9 100644 --- a/tutorials/10_basic_vqe.ipynb +++ b/tutorials/10_basic_vqe.ipynb @@ -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",