-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small doc formatting issues #10574
Small doc formatting issues #10574
Conversation
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 5866793708
💛 - Coveralls |
qiskit/circuit/gate.py
Outdated
label: optional gate label | ||
ctrl_state: The control state in decimal or as a bitstring | ||
(e.g. '111'). If None, use 2**num_ctrl_qubits-1. | ||
(e.g. ``'111'``). If None, use 2**``num_ctrl_qubits``-1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nicer to also wrap the **
in code, since it's also Python syntax
(e.g. ``'111'``). If None, use 2**``num_ctrl_qubits``-1. | |
(e.g. ``'111'``). If None, use ``2**num_ctrl_qubits - 1``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Things in this entry need another pass. Checked in a504bb0
qiskit/converters/circuit_to_dag.py
Outdated
@@ -17,7 +17,7 @@ | |||
|
|||
|
|||
def circuit_to_dag(circuit, copy_operations=True, *, qubit_order=None, clbit_order=None): | |||
"""Build a ``DAGCircuit`` object from a ``QuantumCircuit``. | |||
"""Build a :class:`~.DAGCircuit` object from a :class:`~.QuantumCircuit`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note, the leading ~
is not needed here as this simply truncates the path of the object. Since here there's no path, as you just used .<Object>
, there's nothing to truncate (but it's not harmful afaik so no need to change) 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: Julien Gacon <[email protected]>
Pull Request Test Coverage Report for Build 5998056952
💛 - Coveralls |
Thanks for your comments, @Cryoris I think I addressed them all. |
qiskit/dagcircuit/__init__.py
Outdated
DAG (directed acyclic graph) Circuits | ||
===================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unusual to put the definition of an acronym in a title. Probably a bit better to say it as:
DAG Circuits
Quantum operations in the absence of control-flow operations can be represented by a directed acyclic graph (DAG).
...
or have the title as "Circuits as Directed Acyclic Graphs" and define the "DAG" acronym in the prose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 430d0b3
qiskit/dagcircuit/dagdependency.py
Outdated
"""Object to represent a quantum circuit as a directed acyclic graph | ||
"""Object to represent a quantum circuit as a DAG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think using the full text here was clearer, but I don't feel strongly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 16b75c7
This function needs `pydot <https://github.com/erocarrera/pydot>`__, which in turn needs | ||
`Graphviz <https://www.graphviz.org/>`__ to be installed. | ||
This function needs `pydot <https://github.com/pydot/pydot>`_, which in turn needs | ||
`Graphviz <https://www.graphviz.org/>`_ to be installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The double underscore is also fine here - the single creates a named hyperlink (so you could later use <Graphviz_>
as if it was the URL and it'd alias the first one), while the double doesn't allow the re-use. The docs are here: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#embedded-uris-and-aliases.
No need to change anything here - both are fine - just pointing out that you don't need to worry about this in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always learning new things. reverting in c6af56c so the diff is cleaner.
* small doc fixes * more small changes * Update qiskit/extensions/quantum_initializer/squ.py Co-authored-by: Julien Gacon <[email protected]> * improve gate docs * Apply suggestions from code review Co-authored-by: Julien Gacon <[email protected]> * Update qiskit/converters/circuit_to_dag.py * Update qiskit/execute_function.py * Circuits as Directed Acyclic Graphs * a quantum circuit as a Directed Acyclic Graphs (DAG * __ * Fix errant plural --------- Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: Jake Lishman <[email protected]> (cherry picked from commit d3a6172)
* small doc fixes * more small changes * Update qiskit/extensions/quantum_initializer/squ.py Co-authored-by: Julien Gacon <[email protected]> * improve gate docs * Apply suggestions from code review Co-authored-by: Julien Gacon <[email protected]> * Update qiskit/converters/circuit_to_dag.py * Update qiskit/execute_function.py * Circuits as Directed Acyclic Graphs * a quantum circuit as a Directed Acyclic Graphs (DAG * __ * Fix errant plural --------- Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: Jake Lishman <[email protected]> (cherry picked from commit d3a6172) Co-authored-by: Luciano Bello <[email protected]>
Some small formatting issues in docstring found around.