Skip to content

Commit 9c4575e

Browse files
authored
Fix minor typos (microsoft#678)
1 parent f385008 commit 9c4575e

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

azure-quantum/tests/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ To be able to run the tests in recording or live mode, make sure:
3636
## Recordings
3737

3838
Our testing infrastructure uses Python VCR to record HTTP calls against a live service and then use
39-
the recordings (aka "cassetes") to playback the responses, essentially creating a mock of the live-service.
39+
the recordings (aka "cassettes") to playback the responses, essentially creating a mock of the live-service.
4040

4141
### Cannot Overwrite Existing Cassette Exception
4242

@@ -63,7 +63,7 @@ See [Sequence ids](#Sequence-ids) and [Non-deterministic Job ids and Session ids
6363

6464
To prevent potentially sensitive information to be checked-in in the repository (like authentication tokens, access keys, etc) inside the recordings, we do several text replacements in the HTTP requests and responses in the VCR pipeline before they end-up persisted in the recorded files.
6565

66-
The [QuantumTestBase.\_\_init\_\_ method](https://github.com/microsoft/azure-quantum-python/blob/main/azure-quantum/tests/unit/common.py#L73) contains several rules (mostly regular expressions) that are applied in the HTTP requests and reponses via several recording and playback processors that are injected in the VCR HTTP pipeline.
66+
The [QuantumTestBase.\_\_init\_\_ method](https://github.com/microsoft/azure-quantum-python/blob/main/azure-quantum/tests/unit/common.py#L73) contains several rules (mostly regular expressions) that are applied in the HTTP requests and responses via several recording and playback processors that are injected in the VCR HTTP pipeline.
6767
We use some common processors provided by the Azure SDK framework (including AccessTokenReplacer, InteractiveAccessTokenReplacer, RequestUrlNormalizer) but we also apply custom text replacement logic in URLs and HTTP Headers via the `process_request` and `process_response` methods and some other processors/filters found at the end of the file.
6868

6969
### Ability to Pause Recordings
@@ -106,14 +106,14 @@ To run the tests, simply run `pytest` from the root of the `azure-quantum` direc
106106
pytest
107107
```
108108

109-
To run the a specific test class, run `pytest [test_file.py]`.
109+
To run a specific test class, run `pytest [test_file.py]`.
110110
Example:
111111

112112
```bash
113113
pytest ./tests/unit/test_job.py
114114
```
115115

116-
To run the a specific test case, run `pytest -k [test_method_name]`.
116+
To run a specific test case, run `pytest -k [test_method_name]`.
117117
Example:
118118

119119
```bash

azure-quantum/tests/unit/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,9 @@ def _apply_scrubbings(self, value: str):
527527
return value
528528

529529
def process_request(self, request):
530-
# when loading the VCR cassete during
530+
# when loading the VCR cassette during
531531
# the test playback, just return the request
532-
# that is recorded in the cassete
532+
# that is recorded in the cassette
533533
if self._quantumTest.in_test_setUp:
534534
return request
535535

@@ -591,9 +591,9 @@ def _get_content_type(self, entity):
591591
return content_type
592592

593593
def process_response(self, response):
594-
# when loading the VCR cassete during
594+
# when loading the VCR cassette during
595595
# the test playback, just return the response
596-
# that is recorded in the cassete
596+
# that is recorded in the cassette
597597
if self._quantumTest.in_test_setUp:
598598
return response
599599

azure-quantum/tests/unit/test_ionq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_job_submit_ionq_100_shots(self):
4848
@pytest.mark.ionq
4949
@pytest.mark.live_test
5050
def test_job_submit_ionq_100_shots_with_deprecated_num_shots(self):
51-
# Call submit with a depteracted 'num_shots' argument, need to emit a deptecation warning.
51+
# Call submit with a deprecated 'num_shots' argument, need to emit a deprecation warning.
5252
with pytest.warns(
5353
DeprecationWarning,
5454
match="The 'num_shots' parameter will be deprecated. Please, use 'shots' parameter instead."

azure-quantum/tests/unit/test_pasqal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
TEST_PULSER = """{"sequence_builder": "{\\"version\\": \\"1\\", \\"name\\": \\"pulser-exported\\", \\"register\\": [{\\"name\\": \\"q0\\", \\"x\\": -10.0, \\"y\\": 0.0}, {\\"name\\": \\"q1\\", \\"x\\": -5.0, \\"y\\": -8.660254}, {\\"name\\": \\"q2\\", \\"x\\": -5.0, \\"y\\": 0.0}, {\\"name\\": \\"q3\\", \\"x\\": 0.0, \\"y\\": 0.0}, {\\"name\\": \\"q4\\", \\"x\\": 5.0, \\"y\\": -8.660254}, {\\"name\\": \\"q5\\", \\"x\\": 7.5, \\"y\\": 4.330127}], \\"channels\\": {\\"ch_global\\": \\"rydberg_global\\"}, \\"variables\\": {}, \\"operations\\": [{\\"op\\": \\"pulse\\", \\"channel\\": \\"ch_global\\", \\"protocol\\": \\"min-delay\\", \\"amplitude\\": {\\"kind\\": \\"constant\\", \\"duration\\": 124, \\"value\\": 12.566370614359172}, \\"detuning\\": {\\"kind\\": \\"constant\\", \\"duration\\": 124, \\"value\\": 25.132741228718345}, \\"phase\\": 0.0, \\"post_phase_shift\\": 0.0}, {\\"op\\": \\"pulse\\", \\"channel\\": \\"ch_global\\", \\"protocol\\": \\"min-delay\\", \\"amplitude\\": {\\"kind\\": \\"constant\\", \\"duration\\": 400, \\"value\\": 0.0}, \\"detuning\\": {\\"kind\\": \\"constant\\", \\"duration\\": 400, \\"value\\": -25.132741228718345}, \\"phase\\": 0.0, \\"post_phase_shift\\": 0.0}, {\\"op\\": \\"pulse\\", \\"channel\\": \\"ch_global\\", \\"protocol\\": \\"min-delay\\", \\"amplitude\\": {\\"kind\\": \\"constant\\", \\"duration\\": 100, \\"value\\": 12.566370614359172}, \\"detuning\\": {\\"kind\\": \\"constant\\", \\"duration\\": 100, \\"value\\": 25.132741228718345}, \\"phase\\": 0.0, \\"post_phase_shift\\": 0.0}, {\\"op\\": \\"pulse\\", \\"channel\\": \\"ch_global\\", \\"protocol\\": \\"min-delay\\", \\"amplitude\\": {\\"kind\\": \\"constant\\", \\"duration\\": 400, \\"value\\": 0.0}, \\"detuning\\": {\\"kind\\": \\"constant\\", \\"duration\\": 400, \\"value\\": -25.132741228718345}, \\"phase\\": 0.0, \\"post_phase_shift\\": 0.0}, {\\"op\\": \\"pulse\\", \\"channel\\": \\"ch_global\\", \\"protocol\\": \\"min-delay\\", \\"amplitude\\": {\\"kind\\": \\"constant\\", \\"duration\\": 100, \\"value\\": 12.566370614359172}, \\"detuning\\": {\\"kind\\": \\"constant\\", \\"duration\\": 100, \\"value\\": 25.132741228718345}, \\"phase\\": 0.0, \\"post_phase_shift\\": 0.0}], \\"measurement\\": null, \\"device\\": {\\"version\\": \\"1\\", \\"channels\\": [{\\"id\\": \\"rydberg_global\\", \\"basis\\": \\"ground-rydberg\\", \\"addressing\\": \\"Global\\", \\"max_abs_detuning\\": 31.41592653589793, \\"max_amp\\": 12.566370614359172, \\"min_retarget_interval\\": null, \\"fixed_retarget_t\\": null, \\"max_targets\\": null, \\"clock_period\\": 4, \\"min_duration\\": 16, \\"max_duration\\": 100000000, \\"mod_bandwidth\\": 2, \\"eom_config\\": {\\"limiting_beam\\": \\"RED\\", \\"max_limiting_amp\\": 251.32741228718345, \\"intermediate_detuning\\": 4398.22971502571, \\"controlled_beams\\": [\\"BLUE\\", \\"RED\\"], \\"mod_bandwidth\\": 11}}], \\"name\\": \\"Fresnel\\", \\"dimensions\\": 2, \\"rydberg_level\\": 60, \\"min_atom_distance\\": 5, \\"max_atom_num\\": 20, \\"max_radial_distance\\": 35, \\"interaction_coeff_xy\\": null, \\"supports_slm_mask\\": false, \\"max_layout_filling\\": 0.5, \\"reusable_channels\\": false, \\"pre_calibrated_layouts\\": [], \\"is_virtual\\": false}, \\"layout\\": {\\"coordinates\\": [[-12.5, 4.330127], [-10.0, 0.0], [-7.5, -4.330127], [-7.5, 4.330127], [-5.0, -8.660254], [-5.0, 0.0], [-5.0, 8.660254], [-2.5, -4.330127], [-2.5, 4.330127], [0.0, -8.660254], [0.0, 0.0], [0.0, 8.660254], [2.5, -4.330127], [2.5, 4.330127], [5.0, -8.660254], [5.0, 0.0], [5.0, 8.660254], [7.5, -4.330127], [7.5, 4.330127], [10.0, 0.0]], \\"slug\\": \\"TriangularLatticeLayout(20, 5.0\\\\u00b5m)\\"}}"}"""
1717

18-
# Comment out due to the misalignment of paspal target name.
19-
# Will update once paspal
18+
# Comment out due to the misalignment of pasqal target name.
19+
# Will update once pasqal
2020
@pytest.mark.pasqal
2121
@pytest.mark.live_test
2222
class TestPasqalTarget(QuantumTestBase):

0 commit comments

Comments
 (0)