Skip to content
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

doc: add dual navigation buttons and cleanup some docstrings #758

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,23 @@
]

source_suffix = ".rst"
master_doc = "index"
root_doc = "index"

autoclass_content = "both"
autodoc_member_order = "bysource"
default_role = "py:obj"

html_theme = "sphinx_rtd_theme"
html_theme_options = {
"prev_next_buttons_location": "both",
laurencap marked this conversation as resolved.
Show resolved Hide resolved
}
htmlhelp_basename = f"{project}doc"

language = "en"

napoleon_use_rtype = False
napoleon_google_docstring = True
napoleon_numpy_docstring = False
Comment on lines +37 to +38
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why is this explicitly necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

napoleon_numpy_docstring defaults to true so I was explicitly setting these values within the conf.


apidoc_module_dir = "../src/braket"
apidoc_output_dir = "_apidoc"
Expand Down
6 changes: 3 additions & 3 deletions src/braket/circuits/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1536,9 +1536,9 @@ def to_unitary(self) -> np.ndarray:
`qubit count` > 10.

Returns:
np.ndarray: A numpy array with shape (2^qubit_count, 2^qubit_count) representing the
circuit as a unitary. For an empty circuit, an empty numpy array is returned
(`array([], dtype=complex)`)
np.ndarray: A numpy array with shape (2 :sup:`qubit_count`, 2 :sup:`qubit_count`)
representing the circuit as a unitary. For an empty circuit, an empty numpy array
is returned (`array([], dtype=complex)`)

Raises:
TypeError: If circuit is not composed only of `Gate` instances,
Expand Down