From fec231bdf821256567bbd63144b61d75d947bd26 Mon Sep 17 00:00:00 2001 From: Peter Solodov Date: Thu, 25 Jul 2024 12:36:50 -0400 Subject: [PATCH 1/4] updated python to 3.12 --- .github/workflows/pylint.yml | 2 +- .github/workflows/pythonpackage.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 75de73da..d8a0da8b 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: '3.10' + python-version: '3.12' architecture: 'x64' - name: Install Pylint run: | diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index ccc92ae1..c7820cae 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: '3.9' + python-version: '3.12' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -62,6 +62,6 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: '3.9' + python-version: '3.12' - name: Doc check run: dev_tools/nbfmt From 03b34bc68c44bb9cfb57bbbe1a658649d3c61462 Mon Sep 17 00:00:00 2001 From: Peter Solodov Date: Thu, 25 Jul 2024 13:11:36 -0400 Subject: [PATCH 2/4] added setuptools dependency --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 99b49c5d..0251de69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ cirq-core>=0.15.0 cirq-google>=0.15.0 # When changing Cirq requirements be sure to update dev_tools/write-ci-requirements.py +setuptools scipy ipython black From c36704b2d1b7b03c2f69b75b040b4f46f297537b Mon Sep 17 00:00:00 2001 From: Peter Solodov Date: Thu, 25 Jul 2024 13:21:21 -0400 Subject: [PATCH 3/4] added note about python 3.12 and venv --- README.md | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ae26d420..b7531472 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,23 @@ found in the `quantum_chess` directory. ## Installation and Documentation +Unitary uses Python 3.12. It's recommended to use a virtual environment for installing Unitary to +avoid interfering with other system packages: + +```sh +python3.12 -v venv ~/unitary +source ~/unitary/bin/activate +``` + +Unitary can then be installed within that virtual environment. + Unitary is not available as a PyPI package. Please clone this repository and install from source: - cd unitary/ - pip install . +```sh +cd unitary/ +pip install . +``` Documentation is available at https://quantumai.google/cirq/experiments. @@ -30,9 +42,11 @@ upper right corner). You can then clone the repository into your development environment by using (substitute USER with your github username) - git clone https://github.com/USER/unitary.git - cd unitary - git remote add upstream https://github.com/quantumlib/unitary.git +```sh +git clone https://github.com/USER/unitary.git +cd unitary +git remote add upstream https://github.com/quantumlib/unitary.git +``` This will clone your fork so that you can work on it, while marking the name 'upstream' as the original repository. @@ -40,17 +54,23 @@ name 'upstream' as the original repository. You can then pull from the original and update your fork, for instance, by doing this: - git pull upstream main - git push origin main +```sh +git pull upstream main +git push origin main +``` In order to push changes to unitary, create a branch in your fork: - git checkout -b BRANCH_NAME +```sh +git checkout -b BRANCH_NAME +``` Perform your changes, then commit (i.e. `git commit -a`) then push to your fork: - git push origin BRANCH_NAME +```sh +git push origin BRANCH_NAME +``` This will give you a link to create a PR (pull request). Create this pull request and pick some reviewers. Once approved, it will be merged into the original repository. From ad2b76e9438f9ac80bf9825e4b14e40eb9ecf183 Mon Sep 17 00:00:00 2001 From: Peter Solodov Date: Tue, 30 Jul 2024 12:37:22 -0400 Subject: [PATCH 4/4] bump required python --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1a1ceba7..55dd99a3 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def _parse_requirements(path: pathlib.Path): url="http://github.com/quantumlib/unitary", author="Quantum AI team and collaborators", author_email="quantum-chess-engineering@googlegroups.com", - python_requires=">=3.6.0", + python_requires=">=3.12.0", install_requires=install_requires, license="Apache 2", description="",