Skip to content

Commit c0e068e

Browse files
committed
feat(doc): update readme
1 parent c787167 commit c0e068e

File tree

7 files changed

+66
-15
lines changed

7 files changed

+66
-15
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
- name: Run test
3939
run: pytest -s --showprogress -vv tests/
4040
env:
41-
PULSER_SCALEWAY_PROJECT_ID: ${{ secrets.STG_PULSEr_SCALEWAY_PROJECT_ID }}
41+
PULSER_SCALEWAY_PROJECT_ID: ${{ secrets.STG_PULSER_SCALEWAY_PROJECT_ID }}
4242
PULSER_SCALEWAY_SECRET_KEY: ${{ secrets.STG_PULSER_SCALEWAY_API_TOKEN }}
4343
PULSER_SCALEWAY_API_URL: ${{ secrets.STG_PULSER_SCALEWAY_API_URL }}

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,18 @@ pip install pulser-scaleway
1616

1717
## Getting started
1818

19-
To instantiate the `ScalewayQuantumService`, you need to have an access token and a project_id
19+
To instantiate the `ScalewayProvider`, you need to have an access token and a project_id
2020

2121
```python
22-
from pulser_scaleway import ScalewayQuantumService
22+
from pulser_scaleway import ScalewayProvider
2323

24-
qaas_connection = ScalewayQuantumService(
24+
qaas_connection = ScalewayProvider(
2525
project_id=os.environ["PULSER_SCALEWAY_PROJECT_ID"],
2626
secret_key=os.environ["PULSER_SCALEWAY_SECRET_KEY"],
27-
url=os.getenv("PULSER_SCALEWAY_API_URL"),
2827
)
2928
```
3029

31-
Alternatively, the `ScalewayQuantumService` can discover your access token from environment variables:
30+
Alternatively, the `ScalewayProvider` can discover your access token from environment variables:
3231

3332
```
3433
export PULSER_SCALEWAY_PROJECT_ID="project_id"
@@ -38,9 +37,9 @@ export PULSER_SCALEWAY_SECRET_KEY="token"
3837
Then you can instantiate the provider without any arguments:
3938

4039
```python
41-
from pulser_scaleway import ScalewayQuantumService
40+
from pulser_scaleway import ScalewayProvider
4241

43-
qaas_connection = ScalewayQuantumService()
42+
qaas_connection = ScalewayProvider()
4443
```
4544

4645
Now you have access to the supported backends and can design your pulse sequence. [See the technical documentation](https://docs.pasqal.com/cloud/first-job/) on how to write a sequence.

examples/.keepit

Whitespace-only changes.

examples/run_fresnel_device.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2025 Scaleway
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.from typing import Optional, List, Dict
14+
import os
15+
import numpy as np
16+
17+
from pulser import Pulse, Sequence, BlackmanWaveform, RampWaveform
18+
from pulser.backend import QPUBackend
19+
from pulser.register import Register
20+
21+
from pulser_scaleway import ScalewayProvider
22+
23+
24+
qaas_connection = ScalewayProvider(
25+
project_id=os.environ["PULSER_SCALEWAY_PROJECT_ID"],
26+
secret_key=os.environ["PULSER_SCALEWAY_SECRET_KEY"],
27+
)
28+
29+
platform = "pasqal_fresnel_simulation"
30+
31+
devices = qaas_connection.fetch_available_devices()
32+
fresnel_device = devices[platform]
33+
register = Register.square(5, 5).with_automatic_layout(fresnel_device)
34+
sequence = Sequence(register, fresnel_device)
35+
36+
sequence.declare_channel("rydberg_global", "rydberg_global")
37+
t = sequence.declare_variable("t", dtype=int)
38+
39+
amp_wf = BlackmanWaveform(t, np.pi)
40+
det_wf = RampWaveform(t, -5, 5)
41+
sequence.add(Pulse(amp_wf, det_wf, 0), "rydberg_global")
42+
43+
backend = QPUBackend(sequence=sequence, connection=qaas_connection)
44+
45+
results = backend.run(
46+
job_params=[
47+
{"runs": 100, "variables": {"t": 1000}},
48+
{"runs": 20, "variables": {"t": 2000}},
49+
],
50+
wait=True,
51+
)
52+
53+
print(results.results)

pulser_scaleway/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
from .scaleway_service import ScalewayQuantumService
15-
from .scaleway_backend import ScalewayBackend
14+
from .scaleway_service import ScalewayProvider

pulser_scaleway/scaleway_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
_DEFAULT_FETCH_INTERVAL = 2 # in second
4343

4444

45-
class ScalewayQuantumService(RemoteConnection):
46-
"""Sacleway Quantum as a Service connection bridge
45+
class ScalewayProvider(RemoteConnection):
46+
"""Sacleway Quantum as a Service connection bridge.
4747
4848
:param project_id: optional UUID of the Scaleway Project, if the provided ``project_id`` is None, the value is loaded from the PULSER_SCALEWAY_PROJECT_ID environment variables
4949

tests/test_fresnel_device.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
from pulser.backend.remote import BatchStatus
2020
from pulser.register import Register
2121

22-
from pulser_scaleway import ScalewayQuantumService
22+
from pulser_scaleway import ScalewayProvider
2323

2424

2525
def test_simple():
26-
qaas_connection = ScalewayQuantumService(
26+
qaas_connection = ScalewayProvider(
2727
project_id=os.environ["PULSER_SCALEWAY_PROJECT_ID"],
2828
secret_key=os.environ["PULSER_SCALEWAY_SECRET_KEY"],
2929
url=os.getenv("PULSER_SCALEWAY_API_URL"),
3030
)
3131

32-
platform = "pasqal_fresnel"
32+
platform = "pasqal_fresnel_simulation"
3333

3434
devices = qaas_connection.fetch_available_devices()
3535
fresnel_device = devices[platform]

0 commit comments

Comments
 (0)