From 5cb4a31759f13cd724610b7fd8e156086577db14 Mon Sep 17 00:00:00 2001 From: Abe Coull <85974725+AbeCoull@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:25:16 -0800 Subject: [PATCH] doc: add dual navigation buttons and cleanup some docstrings (#758) --- doc/conf.py | 7 ++++++- src/braket/circuits/circuit.py | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 8a16ca231..b5eae7acc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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", +} htmlhelp_basename = f"{project}doc" language = "en" napoleon_use_rtype = False +napoleon_google_docstring = True +napoleon_numpy_docstring = False apidoc_module_dir = "../src/braket" apidoc_output_dir = "_apidoc" diff --git a/src/braket/circuits/circuit.py b/src/braket/circuits/circuit.py index 02d419cff..e3181a603 100644 --- a/src/braket/circuits/circuit.py +++ b/src/braket/circuits/circuit.py @@ -1537,9 +1537,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,