Skip to content
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: 0 additions & 2 deletions .github/actions/install-main-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
Expand Down
2 changes: 0 additions & 2 deletions .github/actions/install-pipeline/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
Expand Down Expand Up @@ -33,7 +31,7 @@ runs:
PYTHONWARNINGS: default
run: |
# run slow tests only on scheduled event or if input flag is set
if [ "${{ inputs.os }}" == "ubuntu-latest" ] && [ "${{ inputs.python-version }}" == "3.9" ]; then
if [ "${{ inputs.os }}" == "ubuntu-latest" ] && [ "${{ inputs.python-version }}" == "3.11" ]; then
export PYTHON="coverage3 run --source qaoa_training_pipeline --parallel-mode"
fi
stestr --test-path test run 2> >(tee /dev/stderr out.txt > /dev/null)
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
Expand Down Expand Up @@ -33,7 +31,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: [3.11]
steps:
- name: Print Concurrency Group
env:
Expand Down Expand Up @@ -75,14 +73,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9, 3.12]
python-version: [3.11, 3.12]
include:
- os: macos-latest
python-version: 3.9
python-version: 3.11
- os: macos-latest
python-version: 3.12
- os: windows-latest
python-version: 3.9
python-version: 3.11
- os: windows-latest
python-version: 3.12
steps:
Expand Down Expand Up @@ -118,7 +116,7 @@ jobs:
mkdir ./ci-artifact-data
coverage3 combine
mv .coverage ./ci-artifact-data/pipeline.dat
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11 }}
shell: bash
- uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ This repository is still in development: new functionality is being added and th
| 12 | More data in result saving in train.py | #26 |
| 13 | Create PPEvaluator from configs | #25 |
| 14 | Custom ansatz operator to state vector | #29 |
| 15 | Remove python 3.9 support | #31 |

## IBM Public Repository Disclosure

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"

[tool.black]
line-length = 100
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
target-version = ['py310', 'py311', 'py312', 'py313']

[tool.pylint.main]
py-version = "3.9" # update it when bumping minimum supported python version
py-version = "3.12" # update it when bumping minimum supported python version

[tool.pylint.basic]
good-names = ["a", "b", "i", "j", "k", "d", "n", "m", "ex", "v", "w", "x", "y", "z", "Run", "_", "logger", "q", "c", "r", "qr", "cr", "qc", "nd", "pi", "op", "b", "ar", "br", "p", "cp", "ax", "dt", "__unittest", "iSwapGate", "mu"]
Expand Down
2 changes: 1 addition & 1 deletion qaoa_training_pipeline/training/param_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(
"system": platform.system(),
"processor": platform.processor(),
"platform": platform.platform(),
"qaoa_training_pipeline_version": 14,
"qaoa_training_pipeline_version": 15,
}

# Convert, e.g., np.float to float
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
coverage>=4.4.0,<7.0
coverage>=4.4.0
black[jupyter]~=24.1
pylint>=2.15.0
ddt>=1.2.0,!=1.4.0,!=1.4.3
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ scipy
quimb>=1.8.2
matplotlib>=3.3
python-sat
qiskit>=1.0,<2.0
qiskit
qiskit-optimization[cplex]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
),
install_requires=REQUIREMENTS,
include_package_data=True,
python_requires=">=3.9",
python_requires=">=3.10",
zip_safe=False,
)
14 changes: 7 additions & 7 deletions test/utils/test_graph_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from qiskit import QuantumCircuit
from qiskit.circuit import Parameter
from qiskit.circuit.library import QAOAAnsatz
from qiskit.circuit.library import qaoa_ansatz
from qiskit.transpiler import PassManager
from qiskit.transpiler.passes import HighLevelSynthesis
from qiskit.quantum_info import SparsePauliOp
Expand Down Expand Up @@ -72,12 +72,12 @@ def test_circuit_to_graph(self):

cost_operator = SparsePauliOp.from_list([("IIZZ", -1), ("ZIIZ", 1), ("IZIZ", 2)])

cost_layer = QAOAAnsatz(
cost_layer = qaoa_ansatz(
cost_operator,
mixer_operator=QuantumCircuit(4),
mixer_operator=SparsePauliOp.from_list([("IIII", 1)]),
initial_state=QuantumCircuit(4),
reps=1,
).decompose()
)

pass_manager = PassManager([HighLevelSynthesis(basis_gates=["rzz"])])
cost_layer = pass_manager.run(cost_layer)
Expand All @@ -93,12 +93,12 @@ def test_circuit_to_graph_single_z(self):

cost_operator = SparsePauliOp.from_list([("IZZ", -1), ("IIZ", 1), ("ZIZ", 2)])

cost_layer = QAOAAnsatz(
cost_layer = qaoa_ansatz(
cost_operator,
mixer_operator=QuantumCircuit(3),
mixer_operator=SparsePauliOp.from_list([("III", 1)]),
initial_state=QuantumCircuit(3),
reps=1,
).decompose()
)

pass_manager = PassManager([HighLevelSynthesis(basis_gates=["rzz", "rz"])])
cost_layer = pass_manager.run(cost_layer)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
# Sets this min.version because of differences with env_tmp_dir env.
minversion = 4.0.2
envlist = py38, py39, py310, py311, py312, lint
envlist = py310, py311, py312, lint
skipsdist = True

[testenv]
Expand Down
Loading