Skip to content

Commit 6fd52aa

Browse files
mhuckapavoljuhas
andauthored
Do mild editing for grammar, consistency, and Markdown (#7246)
* Add missing Markdown code block language tags * Do mild editing for grammar & consistency In one document, the constructs in a list of cards were not parallel. In other places, just fiddled with constructs that struck me as awkward. * Update _index.yaml Apply fix from @pavoljuhas for lint error. --------- Co-authored-by: Pavol Juhas <[email protected]>
1 parent cc4f208 commit 6fd52aa

File tree

9 files changed

+30
-31
lines changed

9 files changed

+30
-31
lines changed

docs/build/_index.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ landing_page:
3434
- cards
3535
items:
3636
- heading: Operators
37-
description: Unitary operators, measurements and noise channels.
37+
description: Unitary operators, measurements, and noise channels.
3838
path: /cirq/build/operators
3939
- heading: Observables and PauliStrings
4040
description: Build and measure observables from sums and products of Pauli operators.

docs/dev/development.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cd Cirq
1717

1818
The following command will set up large refactoring revisions to be ignored, when using git blame.
1919

20-
```
20+
```bash
2121
git config blame.ignoreRevsFile .git-blame-ignore-revs
2222
```
2323

@@ -27,13 +27,13 @@ Note that if you are using PyCharm, you might have to use the command Restart &
2727
You can build the stable and pre-release Docker images with our `Dockerfile`.
2828

2929
```bash
30-
docker build -t cirq --target cirq_stable .
31-
docker run -it cirq python -c "import cirq_google; print(cirq_google.Sycamore23)"
30+
docker build -t cirq --target cirq_stable .
31+
docker run -it cirq python -c "import cirq_google; print(cirq_google.Sycamore23)"
3232
```
3333

3434
```bash
35-
docker build -t cirq_pre --target cirq_pre_release .
36-
docker run -it cirq_pre python -c "import cirq_google; print(cirq_google.Sycamore23)"
35+
docker build -t cirq_pre --target cirq_pre_release .
36+
docker run -it cirq_pre python -c "import cirq_google; print(cirq_google.Sycamore23)"
3737
```
3838

3939
If you want to contribute changes to Cirq, you will instead want to fork the repository and submit pull requests from your fork.
@@ -152,7 +152,7 @@ See the previous section for instructions.
152152

153153
If you want to pip install Cirq in an editable fashion, you'll have to install it per module, e.g.:
154154
155-
```
155+
```bash
156156
pip install -e ./cirq-core -e ./cirq-google -e ./cirq-ionq -e ./cirq-aqt
157157
```
158158
@@ -273,7 +273,7 @@ For this pull request you may want to mark it as `[Testing]` so that it is not r
273273
Cirq uses [Google style doc strings](http://google.github.io/styleguide/pyguide.html#381-docstrings) with a Markdown flavor and support for LaTeX.
274274
Here is an example docstring:
275275
276-
```
276+
```python
277277
def some_method(a: int, b: str) -> float:
278278
r"""One line summary of method.
279279
@@ -330,7 +330,7 @@ Instead, in the directory `dev_tools/requirements`, create a separate `<job>.env
330330
331331
You can call the following utility to unroll the content of a file:
332332
333-
```
333+
```bash
334334
python dev_tools/requirements/reqs.py dev_tools/requirements/dev.env.txt
335335
```
336336

docs/dev/serialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ print(text)
3535

3636
The JSON can also be written to a file:
3737

38-
```
38+
```python
3939
cirq.to_json(obj, filepath)
4040
```
4141

4242
Or read back in from a file:
4343

44-
```
44+
```python
4545
obj = cirq.read_json(filepath)
4646
```
4747

docs/experiments/_index.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ landing_page:
66
rows:
77
- heading: Experiments using quantum circuits
88
description: This is a collection of algorithms and experiments written in and
9-
using Cirq. A couple of them use only base Cirq, but the rest use additional
9+
using Cirq. A few use only base Cirq; the rest use additional
1010
code stored in ReCirq, a GitHub repository for research code that uses and builds
1111
upon Cirq.
1212
- buttons:
@@ -15,7 +15,7 @@ landing_page:
1515
- label: ReCirq GitHub
1616
path: https://github.com/quantumlib/ReCirq
1717
- heading: Algorithms in base Cirq
18-
description: Algorithms and experiments executable using only default Cirq code.
18+
description: Algorithms and experiments that use only default Cirq code.
1919
options:
2020
- cards
2121
items:
@@ -24,20 +24,20 @@ landing_page:
2424
shown in quantum textbooks.
2525
path: /cirq/experiments/textbook_algorithms
2626
- heading: Shor's Algorithm
27-
description: The famous integer factorization algorithm by Peter Shor.
27+
description: An implementation of the famous integer factorization algorithm by Peter Shor.
2828
path: /cirq/experiments/shor
2929
- heading: Variational Quantum Eigensolver
30-
description: Compute the ground state of a Hamiltonian using the variational
31-
principle.
30+
description: An example of computing the ground state of a Hamiltonian using the
31+
variational principle.
3232
path: /cirq/experiments/variational_algorithm
3333
- heading: Quantum Walks
34-
description: The quantum analog of a random walk algorithm.
34+
description: An example of the quantum analog of a random walk algorithm.
3535
path: /cirq/experiments/quantum_walks
3636
- heading: Fourier Checking
37-
description: Demonstrate the separation between quantum and classical computers.
37+
description: A demonstration of the separation between quantum and classical computers.
3838
path: /cirq/experiments/fourier_checking
3939
- heading: Hidden Linear Function problem
40-
description: Show quantum separation with a constant depth solution.
40+
description: An example showing quantum separation with a constant-depth solution.
4141
path: /cirq/experiments/hidden_linear_function
4242

4343
- heading: ReCirq Experiments

docs/google/calibration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A dropdown menu will let you choose the current characterization or historical
2020
metrics from a previous run. Calibration metrics can also be retrieved
2121
programmatically using an engine instance or with a job.
2222

23-
```
23+
```python
2424
import cirq_google as cg
2525

2626
# Create an Engine object to use.
@@ -167,7 +167,7 @@ calculated by fitting Gaussian distributions to the signals prepared in the
167167
distributions. Note that this is a component of both the p_00 and p_11 errors
168168
and is included within those metrics.
169169

170-
### Isolated 1 qubit randomized benchmark error:
170+
### Isolated 1 qubit randomized benchmark error:
171171
* Metric key: single_qubit_rb_average_error_per_gate
172172
* Metric key: single_qubit_rb_pauli_error_per_gate
173173
* Metric key: single_qubit_rb_incoherent_error_per_gate
@@ -186,7 +186,7 @@ More information about randomized benchmarking can be found in section 6.3
186186
(page 120) of this
187187
[thesis](https://web.physics.ucsb.edu/~martinisgroup/theses/Chen2018.pdf).
188188

189-
### T1
189+
### T1
190190
* Metric key: single_qubit_idle_t1_micros
191191

192192
The T1 of a qubit represents the time constant of the exponential decay of a

docs/google/devices.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If a moment contains only these "virtual" gates, it will disappear.
3737

3838
For example, this circuit will execute the two gates in parallel:
3939

40-
```
40+
```python
4141
cirq.Circuit(
4242
cirq.Moment(cirq.X(cirq.GridQubit(4,4)), cirq.X(cirq.GridQubit(4,5)))
4343
)
@@ -46,7 +46,7 @@ cirq.Circuit(
4646
This circuit will execute the two gates in serial:
4747

4848

49-
```
49+
```python
5050
cirq.Circuit(
5151
cirq.Moment(cirq.X(cirq.GridQubit(4,4))),
5252
cirq.Moment(cirq.X(cirq.GridQubit(4,5)))
@@ -56,7 +56,7 @@ cirq.Circuit(
5656
Lastly, this circuit will only execute one gate, since the first gate
5757
is virtual and its moment will disappear:
5858

59-
```
59+
```python
6060
cirq.Circuit(
6161
cirq.Moment(cirq.Z(cirq.GridQubit(4,4))),
6262
cirq.Moment(cirq.X(cirq.GridQubit(4,5)))
@@ -88,7 +88,7 @@ following code will sweep qubit (4,8)'s pi amplitude from 0.0 to 1.0
8888
in 0.02 increments.
8989

9090

91-
```
91+
```python
9292
descriptor = cirq_google.study.DeviceParameter( ["q4_8", "piAmp"])
9393
sweep = cirq.Linspace("q4_8.piAmp", 0, 1, 51, metadata=descriptor)
9494
```
@@ -153,7 +153,7 @@ to affect the frequency of the qubit.
153153
This can be done by applying a PhysicalZTag to the Z gate,
154154
such as in the following example:
155155

156-
```
156+
```python
157157
cirq.Z(cirq.GridQubit(5, 5)).with_tags(cirq_google.PhysicalZTag())
158158
```
159159

docs/google/engine.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ gcloud client:
2323

2424
From a colab, you can execute:
2525

26-
```
26+
```python
2727
from google.colab import auth
2828
auth.authenticate_user(clear_output=False)
2929
```
@@ -239,4 +239,3 @@ for p in programs:
239239
for j in p.list_jobs(execution_states=[enums.ExecutionStatus.State.FAILURE]):
240240
print(j.job_id, j.status())
241241
```
242-

docs/google/specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ verify a circuit.
9999
The following example illustrates retrieving the device specification live
100100
from the engine and then using it to validate a circuit.
101101

102-
```
102+
```python
103103
import cirq
104104
import cirq_google as cg
105105

docs/transform/_index.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ landing_page:
55
nav: left
66
rows:
77
- heading: Transform a circuit
8-
description: Programmatically transform a provided circuit into another one to
8+
description: Programmatically transform one circuit into another one to
99
implement any compilation or optimization process that changes a circuit.
1010
options:
1111
- cards

0 commit comments

Comments
 (0)