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 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. 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 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="",