Skip to content

Commit a85b8d2

Browse files
authored
pyqrack installation revisions and install page suggestions (#263)
Made the install page a bit more cohesive as well as removing a mention of `bloqade-pyqrack` considering it's now deprecated and users just need to install `pyqrack` by itself. I also added an explicit warning about installing `pyqrack-cpu` for Intel Macs because @lamq317 ran into this issue on his machine and it didn't seem like we had it documented anywhere. I think it might even be worth bringing up this pyqrack install info on the bloqade install page instead of having it tucked away in its current state in an "under construction" page.
1 parent 3453df1 commit a85b8d2

File tree

2 files changed

+51
-43
lines changed

2 files changed

+51
-43
lines changed

docs/install.md

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,13 @@
11
# Installation
22

3-
Bloqade is available in [PyPI](https://pypi.org/) and
4-
thus can be installed via [`pip`](https://pypi.org/project/pip/).
5-
Install Bloqade using the following command:
3+
Bloqade is compatible with Python 3.10+ and available on [PyPI](https://pypi.org/project/bloqade/).
4+
You can install it via [`pip`](https://pypi.org/project/pip/) into your environment:
5+
66

77
```bash
88
pip install bloqade
99
```
1010

11-
Bloqade support python 3.10+.
12-
13-
We strongly recommend developing your compiler project using [`uv`](https://docs.astral.sh/uv/),
14-
which is the official development environment for Bloqade. You can install `uv` using the following command:
15-
16-
17-
=== "Linux and macOS"
18-
19-
```bash
20-
curl -LsSf https://astral.sh/uv/install.sh | sh
21-
```
22-
23-
then
24-
25-
```bash
26-
uv add kirin-toolchain
27-
```
28-
29-
=== "Windows"
30-
31-
```cmd
32-
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
33-
```
34-
35-
then
36-
37-
```cmd
38-
uv add kirin-toolchain
39-
```
40-
4111

4212
## Bloqade and its friends
4313

@@ -87,16 +57,37 @@ If you want to contribute to Bloqade, you can clone the repository from GitHub:
8757
git clone https://github.com/QuEraComputing/bloqade.git
8858
```
8959

90-
We use `uv` to manage the development environment, after you install `uv`, you can install the development dependencies using the following command:
60+
We use [`uv`](https://docs.astral.sh/uv/) to manage the development environment.
61+
62+
You can install `uv` via the following:
63+
64+
=== "Linux and macOS"
65+
66+
```bash
67+
curl -LsSf https://astral.sh/uv/install.sh | sh
68+
```
69+
70+
===
71+
72+
```cmd
73+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
74+
```
75+
76+
Then you can install the development dependencies executing one of the following commands:
9177

9278
```bash
93-
uv sync
79+
# For contributing to code
80+
uv sync --group dev
81+
# For contributions to documentation
82+
uv sync --group doc
83+
# For just getting everything mentioned above
84+
uv sync --all-groups
9485
```
9586

96-
Our code review requires that you pass the tests and the linting checks. We recommend
97-
you to install `pre-commit` to run the checks before you commit your changes, the command line
98-
tool `pre-commit` has been installed as part of the development dependencies. You can setup
99-
`pre-commit` using the following command:
87+
Our code review requires that you pass the tests and linting checks. We recommend
88+
you install `pre-commit` to run the checks before you commit your changes. `pre-commit`
89+
is already specified as a development dependency for bloqade and once installed,
90+
you can setup `pre-commit` using the following command:
10091

10192
```bash
10293
pre-commit install

docs/quick_start/circuits/interpreters_and_analysis/pyqrack_emulator.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,34 @@
55

66
## Running simulations
77

8-
The program can be executed via a simulator backend, e.g. PyQrack, you can install it via
8+
The program can be executed via a simulator backend, e.g. PyQrack, you can install it for M-series Macs and other machines via:
99

1010

1111
```bash
12-
pip install bloqade-pyqrack[backend]
12+
pip install pyqrack
1313
```
1414

15-
with the `backend` being one of ` pyqrack`, `pyqrack-cpu`, `pyqrack-cuda` depending on
16-
the hardware and OS you have. See [README](https://github.com/QuEraComputing/bloqade-pyqrack?tab=readme-ov-file#which-extra-do-i-install) for mote details.
15+
!!! warning
16+
17+
If you are using a Mac with an Intel CPU you will need to instead install the following:
18+
19+
```bash
20+
pip install pyqrack-cpu
21+
```
22+
23+
Alternatively, if you have access to a GPU with CUDA support you can leverage that via:
24+
25+
```bash
26+
pip install pyqrack-cuda
27+
```
28+
29+
1730

1831
```python
32+
33+
from bloqade import qasm2
34+
from bloqade.pyqrack import PyQrack
35+
1936
@qasm2.extended
2037
def main():
2138
return qft(qasm2.qreg(3), 3)

0 commit comments

Comments
 (0)