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

updated python to 3.12 #205

Merged
merged 4 commits into from
Jul 30, 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
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
38 changes: 29 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -30,27 +42,35 @@ 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.

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.
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _parse_requirements(path: pathlib.Path):
url="http://github.com/quantumlib/unitary",
author="Quantum AI team and collaborators",
author_email="[email protected]",
python_requires=">=3.6.0",
python_requires=">=3.12.0",
install_requires=install_requires,
license="Apache 2",
description="",
Expand Down
Loading