Installing Cirq¶
Choose your operating system:
If you want to create a development environment, see development.md.
Alpha Disclaimer¶
Cirq is currently in alpha. We are still making breaking changes. We will break your code when we make new releases. We recommend that you target a specific version of Cirq, and periodically bump to the latest release. That way you have control over when a breaking change affects you.
Installing on Linux¶
Make sure you have python 3.5.2 or greater (or else python 2.7).
See Installing Python 3 on Linux @ the hitchhiker’s guide to python.
Consider using a virtual environment.
Use
pip
to installcirq
:pip install --upgrade pip pip install cirq
(Optional) install system dependencies that pip can’t handle.
sudo apt-get install python3-tk texlive-latex-base latexmk
- Without
python3-tk
, plotting functionality won’t work. - Without
texlive-latex-base
andlatexmk
, pdf writing functionality will not work.
- Without
Check that it works!
python -c 'import cirq; print(cirq.google.Foxtail)' # should print: # (0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10) # │ │ │ │ │ │ │ │ │ │ │ # │ │ │ │ │ │ │ │ │ │ │ # (1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)
Installing on Mac OS X¶
Make sure you have python 3.5 or greater (or else python 2.7).
See Installing Python 3 on Mac OS X @ the hitchhiker’s guide to python.
Consider using a virtual environment.
Use
pip
to installcirq
:pip install --upgrade pip pip install cirq
Check that it works!
python -c 'import cirq; print(cirq.google.Foxtail)' # should print: # (0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10) # │ │ │ │ │ │ │ │ │ │ │ # │ │ │ │ │ │ │ │ │ │ │ # (1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)
Installing on Windows¶
If you are using the Windows Subsystem for Linux, use the Linux install instructions instead of these instructions.
Make sure you have python 3.5 or greater (or else python 2.7.9+).
See Installing Python 3 on Windows @ the hitchhiker’s guide to python.
Use
pip
to installcirq
:python -m pip install --upgrade pip python -m pip install cirq
Check that it works!
python -c "import cirq; print(cirq.google.Foxtail)" # should print: # (0, 0)───(0, 1)───(0, 2)───(0, 3)───(0, 4)───(0, 5)───(0, 6)───(0, 7)───(0, 8)───(0, 9)───(0, 10) # │ │ │ │ │ │ │ │ │ │ │ # │ │ │ │ │ │ │ │ │ │ │ # (1, 0)───(1, 1)───(1, 2)───(1, 3)───(1, 4)───(1, 5)───(1, 6)───(1, 7)───(1, 8)───(1, 9)───(1, 10)