480 lines
28 KiB
HTML
480 lines
28 KiB
HTML
<!doctype html>
|
||
<html class="no-js" lang="en">
|
||
<head><meta charset="utf-8"/>
|
||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Jupyter" href="../sphinx_guide/jupyter.html" /><link rel="prev" title="api_example.my_function1" href="../stubs/api_example.my_function1.html" />
|
||
|
||
<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
|
||
<title>Inline classes - Example Docs 9.99</title>
|
||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/styles/qiskit-sphinx-theme.css?v=9e3589df" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
|
||
|
||
|
||
|
||
|
||
<style>
|
||
body {
|
||
--color-code-background: #f8f8f8;
|
||
--color-code-foreground: black;
|
||
|
||
}
|
||
@media not print {
|
||
body[data-theme="dark"] {
|
||
--color-code-background: #202020;
|
||
--color-code-foreground: #d0d0d0;
|
||
|
||
}
|
||
@media (prefers-color-scheme: dark) {
|
||
body:not([data-theme="light"]) {
|
||
--color-code-background: #202020;
|
||
--color-code-foreground: #d0d0d0;
|
||
|
||
}
|
||
}
|
||
}
|
||
</style><link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap" rel="stylesheet"></head>
|
||
<body>
|
||
|
||
<script>document.body.dataset.theme = "light";</script>
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||
<title>Contents</title>
|
||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||
<defs><style>.cls-1{fill:none;}</style></defs>
|
||
<path d="M28,4H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM4,6H20V26H4ZM28,26H22V6h6Z"/>
|
||
<rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"/>
|
||
</svg>
|
||
</symbol>
|
||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||
<title>Menu</title>
|
||
<svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||
<defs><style>.cls-1{fill:none;}</style></defs>
|
||
<rect x="4" y="6" width="24" height="2"/>
|
||
<rect x="4" y="24" width="24" height="2"/>
|
||
<rect x="4" y="12" width="24" height="2"/>
|
||
<rect x="4" y="18" width="24" height="2"/>
|
||
<rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"/>
|
||
</svg>
|
||
</symbol>
|
||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||
<title>Expand</title>
|
||
<svg version="1.1" id="icon" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
||
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve"><polygon points="22,16 12,26 10.6,24.6 19.2,16 10.6,7.4 12,6 " stroke="currentColor"/>
|
||
<rect id="_x3C_Transparent_Rectangle_x3E_" fill="none" width="32" height="32"/>
|
||
</svg>
|
||
</symbol>
|
||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||
<title>Light mode</title>
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||
<circle cx="12" cy="12" r="5"></circle>
|
||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||
</svg>
|
||
</symbol>
|
||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||
<title>Dark mode</title>
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||
</svg>
|
||
</symbol>
|
||
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||
<title>Auto light/dark mode</title>
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||
<circle cx="12" cy="12" r="9" />
|
||
<path d="M13 12h5" />
|
||
<path d="M13 15h4" />
|
||
<path d="M13 18h1" />
|
||
<path d="M13 9h4" />
|
||
<path d="M13 6h1" />
|
||
</svg>
|
||
</symbol>
|
||
</svg>
|
||
|
||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||
<label class="overlay sidebar-overlay" for="__navigation">
|
||
<div class="visually-hidden">Hide navigation sidebar</div>
|
||
</label>
|
||
<label class="overlay toc-overlay" for="__toc">
|
||
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||
</label>
|
||
|
||
|
||
|
||
<div class="page">
|
||
<header class="mobile-header">
|
||
<div class="header-left">
|
||
<label class="nav-overlay-icon" for="__navigation">
|
||
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||
</label>
|
||
</div>
|
||
<div class="header-center">
|
||
<a href="../index.html"><div class="brand">Example Docs 9.99</div></a>
|
||
</div>
|
||
<div class="header-right">
|
||
<div class="theme-toggle-container theme-toggle-header">
|
||
<button class="theme-toggle">
|
||
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||
</button>
|
||
</div>
|
||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||
</label>
|
||
</div>
|
||
</header>
|
||
<aside class="sidebar-drawer">
|
||
<div class="sidebar-container">
|
||
|
||
<div class="sidebar-sticky"><div class="sidebar-brand">
|
||
<a href="https://qiskit.github.io/ecosystem/">
|
||
<div class="sidebar-logo-container">
|
||
<img class="sidebar-logo" src="../_static/images/ecosystem-logo.svg" alt="Qiskit Ecosystem logo"/>
|
||
</div>
|
||
</a>
|
||
|
||
<span class="sidebar-brand-text">Example Docs 9.99</span>
|
||
</div><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||
<input type="hidden" name="check_keywords" value="yes">
|
||
<input type="hidden" name="area" value="default">
|
||
</form>
|
||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Documentation Home</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/lists.html">Lists</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/tables.html">Tables</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/panels.html">Panels</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/images.html">Images</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/paragraph.html">Paragraph Level Markup</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/structural.html">Generic formatting</a></li>
|
||
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">API Reference</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of API Reference</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
|
||
<li class="toctree-l2 has-children"><a class="reference internal" href="module.html">API example (<code class="xref py py-mod docutils literal notranslate"><span class="pre">api_example</span></code>)</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of API example (api_example)</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.my_function1.html">api_example.my_function1</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Inline classes</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Special elements</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/jupyter.html">Jupyter</a></li>
|
||
<li class="toctree-l1 has-children"><a class="reference internal" href="../sphinx_guide/notebook_gallery.html">Tutorials</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of Tutorials</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook.html">My tutorial with a long title</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook2.html">Tutorial #2</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/custom_directives.html">Custom Directives</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/long_title.html">Super duper duper duper duper duper long title to test line wrapping</a></li>
|
||
<li class="toctree-l1"><a class="reference external" href="https://github.com/Qiskit/qiskit-terra">GitHub</a></li>
|
||
</ul>
|
||
|
||
</div><div class="qiskit-previous-releases-container">
|
||
<input id="previous-releases-checkbox" name="previous-releases-checkbox" role="switch" type="checkbox">
|
||
<div class="qiskit-previous-releases-header-container"><label for="previous-releases-checkbox">
|
||
<p role="note">Previous Releases</p>
|
||
<div class="qiskit-previous-releases-toggle-container">
|
||
<div class="visually-hidden">Toggle navigation of Previous Releases</div>
|
||
<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>
|
||
</div>
|
||
</label>
|
||
</div>
|
||
<div class="qiskit-previous-releases-list-container">
|
||
<ul>
|
||
|
||
<li><a href="/ecosystem/example_docs/stable/0.3/index.html" rel="nofollow noindex">0.3</a></li>
|
||
|
||
<li><a href="/ecosystem/example_docs/stable/0.2/index.html" rel="nofollow noindex">0.2</a></li>
|
||
|
||
<li><a href="/ecosystem/example_docs/stable/0.1/index.html" rel="nofollow noindex">0.1</a></li>
|
||
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div><div class="qiskit-translations-container" aria-label="languages">
|
||
<input id="translations-checkbox" name="translations-checkbox" role="switch" type="checkbox">
|
||
<div class="qiskit-translations-header-container"><label for="translations-checkbox">
|
||
<p role="note">English</p>
|
||
<div class="qiskit-translations-toggle-container">
|
||
<div class="visually-hidden">Toggle translations list</div>
|
||
<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>
|
||
</div>
|
||
</label>
|
||
</div>
|
||
<div class="qiskit-translations-list-container">
|
||
<ul>
|
||
|
||
<li><a href="/ecosystem/example_docs/apidoc/inline_classes.html">English</a></li>
|
||
|
||
<li><a href="/ecosystem/example_docs/locale/bn_BN/apidoc/inline_classes.html">Bengali</a></li>
|
||
|
||
<li><a href="/ecosystem/example_docs/locale/fr_FR/apidoc/inline_classes.html">French</a></li>
|
||
|
||
</ul>
|
||
</div>
|
||
<script>
|
||
document.querySelectorAll('.version').forEach((element) => {
|
||
element.addEventListener('click', (evt) => {
|
||
const hash = window.location.hash;
|
||
const complete_url = evt.target.href + hash;
|
||
window.location = complete_url;
|
||
evt.preventDefault();
|
||
});
|
||
});
|
||
</script>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</aside>
|
||
<div class="main">
|
||
<div class="content">
|
||
<div class="article-container">
|
||
<a href="#" class="back-to-top muted-link">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||
</svg>
|
||
<span>Back to top</span>
|
||
</a>
|
||
<div class="content-icon-container">
|
||
|
||
<div class="theme-toggle-container theme-toggle-content">
|
||
<button class="theme-toggle">
|
||
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||
</button>
|
||
</div>
|
||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||
</label>
|
||
</div>
|
||
<article role="main">
|
||
<section id="inline-classes">
|
||
<span id="module-api_example.inline_classes"></span><span id="api-example-inline-classes"></span><h1>Inline classes<a class="headerlink" href="#inline-classes" title="Link to this heading">#</a></h1>
|
||
<p>This is a page to test out how we render classes and functions
|
||
included inline in the page. This is common with module pages.</p>
|
||
<section id="important-apis">
|
||
<h2>Important APIs<a class="headerlink" href="#important-apis" title="Link to this heading">#</a></h2>
|
||
<p>Every time you use this program, you’ll want to create an instance of
|
||
<a class="reference internal" href="#api_example.inline_classes.SimpleInlineClass" title="api_example.inline_classes.SimpleInlineClass"><code class="xref py py-class docutils literal notranslate"><span class="pre">api_example.inline_classes.SimpleInlineClass</span></code></a>. It has a simple interface:</p>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.SimpleInlineClass">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api_example.inline_classes.</span></span><span class="sig-name descname"><span class="pre">SimpleInlineClass</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/api_example/inline_classes.html#SimpleInlineClass"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api_example.inline_classes.SimpleInlineClass" title="Link to this definition">#</a></dt>
|
||
<dd><p>This is a simple class that does not have
|
||
any methods or attributes.</p>
|
||
<p>It only has the class description and constructor.
|
||
Many classes in Qiskit docs are simple like this.</p>
|
||
<dl class="field-list simple">
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<p>It can be useful to use free functions rather than the class:</p>
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.inline_function">
|
||
<span class="sig-prename descclassname"><span class="pre">api_example.inline_classes.</span></span><span class="sig-name descname"><span class="pre">inline_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">input1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">input2</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/api_example/inline_classes.html#inline_function"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api_example.inline_classes.inline_function" title="Link to this definition">#</a></dt>
|
||
<dd><p>A function that does awesome stuff.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>Did the function work.</p>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>int</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<p>Sometimes, you even need to use a really complex class!</p>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.InlineClassWithMethods">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api_example.inline_classes.</span></span><span class="sig-name descname"><span class="pre">InlineClassWithMethods</span></span><a class="reference internal" href="../_modules/api_example/inline_classes.html#InlineClassWithMethods"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api_example.inline_classes.InlineClassWithMethods" title="Link to this definition">#</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>This class is more involved.</p>
|
||
<p>Note how the methods and attributes are rendered and
|
||
indented when this class is inlined on the docs page.</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.InlineClassWithMethods.CLASS_ATTRIBUTE">
|
||
<span class="sig-name descname"><span class="pre">CLASS_ATTRIBUTE</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'An</span> <span class="pre">important</span> <span class="pre">part</span> <span class="pre">of</span> <span class="pre">any</span> <span class="pre">API.'</span></em><a class="headerlink" href="#api_example.inline_classes.InlineClassWithMethods.CLASS_ATTRIBUTE" title="Link to this definition">#</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.InlineClassWithMethods.interest_rate">
|
||
<span class="sig-name descname"><span class="pre">interest_rate</span></span><a class="headerlink" href="#api_example.inline_classes.InlineClassWithMethods.interest_rate" title="Link to this definition">#</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.InlineClassWithMethods.method1">
|
||
<span class="sig-name descname"><span class="pre">method1</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/api_example/inline_classes.html#InlineClassWithMethods.method1"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api_example.inline_classes.InlineClassWithMethods.method1" title="Link to this definition">#</a></dt>
|
||
<dd><p>A simple method.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>int</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.InlineClassWithMethods.method2">
|
||
<span class="sig-name descname"><span class="pre">method2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">description</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/api_example/inline_classes.html#InlineClassWithMethods.method2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api_example.inline_classes.InlineClassWithMethods.method2" title="Link to this definition">#</a></dt>
|
||
<dd><p>A method with a lot of args!</p>
|
||
<p>This method will use a Hamiltonian to reach quantum advantage. Hamilton: great play & the
|
||
secret to quantum computing. What a polymath.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>arg1</strong> (<em>int</em><em> | </em><em>float</em>) – All numbers accepted.</p></li>
|
||
<li><p><strong>arg2</strong> (<em>list</em><em>[</em><a class="reference internal" href="#api_example.inline_classes.InlineClassWithMethods" title="api_example.inline_classes.InlineClassWithMethods"><em>InlineClassWithMethods</em></a><em>]</em>) – A list of other instances, although these will be discarded.</p></li>
|
||
<li><p><strong>description</strong> (<em>str</em>) – If your description is too boring or too cryptic, this program
|
||
will crash your computer.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>tuple[int, <a class="reference internal" href="#api_example.inline_classes.InlineClassWithMethods" title="api_example.inline_classes.InlineClassWithMethods"><em>InlineClassWithMethods</em></a>]</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<section id="warning-exceptions">
|
||
<h3>Warning: exceptions<a class="headerlink" href="#warning-exceptions" title="Link to this heading">#</a></h3>
|
||
<p>The above APIs might raise an exception! Be careful!</p>
|
||
<dl class="py exception">
|
||
<dt class="sig sig-object py" id="api_example.inline_classes.CustomException">
|
||
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api_example.inline_classes.</span></span><span class="sig-name descname"><span class="pre">CustomException</span></span><a class="reference internal" href="../_modules/api_example/inline_classes.html#CustomException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api_example.inline_classes.CustomException" title="Link to this definition">#</a></dt>
|
||
<dd><p>See how exceptions render too.</p>
|
||
</dd></dl>
|
||
|
||
</section>
|
||
</section>
|
||
<section id="other-prose">
|
||
<h2>Other prose<a class="headerlink" href="#other-prose" title="Link to this heading">#</a></h2>
|
||
<p>Blah blah blah.</p>
|
||
</section>
|
||
</section>
|
||
|
||
</article>
|
||
</div>
|
||
<footer>
|
||
|
||
<div class="related-pages">
|
||
<a class="next-page" href="../sphinx_guide/jupyter.html">
|
||
<div class="page-info">
|
||
<div class="context">
|
||
<span>Next</span>
|
||
</div>
|
||
<div class="title">Jupyter</div>
|
||
</div>
|
||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||
</a>
|
||
<a class="prev-page" href="../stubs/api_example.my_function1.html">
|
||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||
<div class="page-info">
|
||
<div class="context">
|
||
<span>Previous</span>
|
||
</div>
|
||
|
||
<div class="title">api_example.my_function1</div>
|
||
|
||
</div>
|
||
</a>
|
||
</div>
|
||
<div class="bottom-of-page">
|
||
<div class="left-details">
|
||
<div class="copyright">
|
||
Copyright © 2020, Qiskit Development Team
|
||
</div>
|
||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||
|
||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||
<div class="last-updated">
|
||
Last updated on 2020/01/01</div>
|
||
</div>
|
||
<div class="right-details">
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</footer>
|
||
</div>
|
||
<aside class="toc-drawer">
|
||
|
||
|
||
<div class="toc-sticky toc-scroll">
|
||
<div class="toc-title-container">
|
||
<span class="toc-title">
|
||
On this page
|
||
</span>
|
||
</div>
|
||
<div class="toc-tree-container">
|
||
<div class="toc-tree">
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Inline classes</a><ul>
|
||
<li><a class="reference internal" href="#important-apis">Important APIs</a><ul>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.SimpleInlineClass"><code class="docutils literal notranslate"><span class="pre">SimpleInlineClass</span></code></a></li>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.inline_function"><code class="docutils literal notranslate"><span class="pre">inline_function()</span></code></a></li>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.InlineClassWithMethods"><code class="docutils literal notranslate"><span class="pre">InlineClassWithMethods</span></code></a><ul>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.InlineClassWithMethods.CLASS_ATTRIBUTE"><code class="docutils literal notranslate"><span class="pre">InlineClassWithMethods.CLASS_ATTRIBUTE</span></code></a></li>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.InlineClassWithMethods.interest_rate"><code class="docutils literal notranslate"><span class="pre">InlineClassWithMethods.interest_rate</span></code></a></li>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.InlineClassWithMethods.method1"><code class="docutils literal notranslate"><span class="pre">InlineClassWithMethods.method1()</span></code></a></li>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.InlineClassWithMethods.method2"><code class="docutils literal notranslate"><span class="pre">InlineClassWithMethods.method2()</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#warning-exceptions">Warning: exceptions</a><ul>
|
||
<li><a class="reference internal" href="#api_example.inline_classes.CustomException"><code class="docutils literal notranslate"><span class="pre">CustomException</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#other-prose">Other prose</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</aside>
|
||
</div>
|
||
</div><script src="../_static/documentation_options.js?v=3f947630"></script>
|
||
<script src="../_static/doctools.js?v=888ff710"></script>
|
||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>
|
||
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
||
<script src="../_static/copybutton.js?v=f281be69"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^1.0.1/dist/embed-amd.js"></script>
|
||
<script src="../_static/design-tabs.js?v=36754332"></script>
|
||
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
|
||
</body>
|
||
</html> |