Skip to content

Commit

Permalink
Get rid of warnings when building readthedocs (#1555)
Browse files Browse the repository at this point in the history
This gets rid of all the warnings and
Fixes: #1535

We've been through the relative vs absolute link wringer before (#857), but this is a temporary solution until I figure out how to display sourcefiles in readthedocs; if it's possible.
  • Loading branch information
Victory Omole authored and CirqBot committed Apr 23, 2019
1 parent 5fc514d commit 0e81e53
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cirq/circuits/circuit.py
Expand Up @@ -792,7 +792,7 @@ def are_all_matches_terminal(self,
predicate: A predicate on ops.Operations which is being checked.
Returns:
Whether or not all `Operation`s in a circuit that satisfy the
Whether or not all `Operation` s in a circuit that satisfy the
given predicate are terminal.
"""
return all(
Expand Down
2 changes: 1 addition & 1 deletion cirq/google/sim/xmon_simulator.py
Expand Up @@ -375,7 +375,7 @@ def sample(self, qubits: List[ops.Qid], repetitions: int=1):
Note that this does not collapse the wave function.
Returns:
Measurement results with True corresponding to the |1> state.
Measurement results with True corresponding to the `|1>` state.
The outer list is for repetitions, and the inner corresponds to
measurements ordered by the supplied qubits.
"""
Expand Down
1 change: 0 additions & 1 deletion docs/api.rst
Expand Up @@ -540,7 +540,6 @@ waiting area.
:toctree: generated/

contrib.acquaintance
contrib.jobs
contrib.paulistring
contrib.qcircuit
contrib.quirk
Expand Down
10 changes: 5 additions & 5 deletions docs/development.md
Expand Up @@ -128,7 +128,7 @@ mypy --config-file=dev_tools/conf/mypy.ini .
```

This can be a bit tedious, because you have to specify the configuration files each time.
A more convenient way to run checks is to via the scripts in the [check/](/check) directory, which specify configuration arguments for you and cover more use cases:
A more convenient way to run checks is to via the scripts in the [check/](https://github.com/quantumlib/Cirq/tree/master/check) directory, which specify configuration arguments for you and cover more use cases:

```bash
# Run all tests in the repository.
Expand All @@ -152,7 +152,7 @@ A more convenient way to run checks is to via the scripts in the [check/](/check

The above scripts are convenient and reasonably fast, but they often won't exactly match the results computed by the continuous integration builds run on travis.
For example, you may be running an older version of `pylint` or `numpy`.
In order to run a check that is significantly more likely to agree with the travis builds, you can use the [continuous-integration/check.sh](/continuous-integration/check.sh) script:
In order to run a check that is significantly more likely to agree with the travis builds, you can use the [continuous-integration/check.sh](https://github.com/quantumlib/Cirq/blob/master/continuous-integration/check.sh) script:

```bash
./continuous-integration/check.sh
Expand All @@ -166,7 +166,7 @@ This flag value can be `pylint`, `typecheck`, `pytest`, `pytest2`, or `increment

### Producing the Python 2.7 code

Run [dev_tools/python2.7-generate.sh](/dev_tools/python2.7-generate.sh) to transpile cirq's python 3 code into python 2.7 code:
Run [dev_tools/python2.7-generate.sh](https://github.com/quantumlib/Cirq/blob/master/dev_tools/python2.7-generate.sh) to transpile cirq's python 3 code into python 2.7 code:

```bash
./dev_tools/python2.7-generate.sh [output_dir] [input_dir] [virtual_env_with_3to2]
Expand Down Expand Up @@ -276,13 +276,13 @@ The HTML output will go into the `docs/_build` directory.

If everything goes smoothly, the script will finish by printing `VERIFIED`.

3. Set the version number in [cirq/_version.py](/cirq/_version.py).
3. Set the version number in [cirq/_version.py](https://github.com/quantumlib/Cirq/blob/master/cirq/_version.py).

Development versions end with `.dev` or `.dev#`.
For example, `0.0.4.dev500` is a development version of the release version `0.0.4`.
For a release, create a pull request turning `#.#.#.dev*` into `#.#.#` and a follow up pull request turning `#.#.#` into `(#+1).#.#.dev`.

4. Run [dev_tools/packaging/produce-package.sh](/dev_tools/packaging/produce-package.sh) to produce pypi artifacts.
4. Run [dev_tools/packaging/produce-package.sh](https://github.com/quantumlib/Cirq/blob/master/dev_tools/packaging/produce-package.sh) to produce pypi artifacts.

```bash
dev_tools/packaging/produce-package.sh dist
Expand Down
2 changes: 1 addition & 1 deletion docs/noise.md
Expand Up @@ -77,7 +77,7 @@ can call `cirq.mixture_channel`.
### Common Channels

Cirq supports many commonly used quantum channels out of the box, see
[`ops/common_channels.py`](/cirq/ops/common_channels.py).
[`ops/common_channels.py`](https://github.com/quantumlib/Cirq/blob/master/cirq/ops/common_channels.py).

#### AsymmetricDepolarizingChannel, DepolarizingChannel, BitFlipChannel, and PhaseFlipChannel

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial.md
Expand Up @@ -174,7 +174,7 @@ print(circuit)
```
One thing to notice here. First `cirq.X` is a `Gate` object. There
are many different gates supported by Cirq. A good place to look
at gates that are defined is in [common_gates.py](/cirq/ops/common_gates.py).
at gates that are defined is in [common_gates.py](https://github.com/quantumlib/Cirq/blob/master/cirq/ops/common_gates.py).
One common confusion to avoid is the difference between a gate class
and a gate object (which is an instantiation of a class). The second is that gate
objects are transformed into `Operation`s (technically `GateOperation`s)
Expand Down Expand Up @@ -237,7 +237,7 @@ Here we see that we can iterate over a `Circuit`'s `Moment`s.
If you look closely at the circuit creation code above you will see that
we applied the `append` method to both a `generator` and a `list` (recall that
in Python one can use generator comprehensions in method calls).
Inspecting the [code](/cirq/circuits/circuit.py) for append one sees that
Inspecting the [code](https://github.com/quantumlib/Cirq/blob/master/cirq/circuits/circuit.py) for append one sees that
the append method generally takes an `OP_TREE` (or a `Moment`). What is
an `OP_TREE`? It is not a class but a contract. Roughly an `OP_TREE`
is anything that can be flattened, perhaps recursively, into a list
Expand Down

0 comments on commit 0e81e53

Please sign in to comment.