Skip to content

Commit 93b322f

Browse files
Add Getting Started Documentation (#141)
1 parent 00fd67e commit 93b322f

File tree

6 files changed

+504
-4
lines changed

6 files changed

+504
-4
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ To do this follow the instructions in the
3939

4040
### Optional Installs
4141

42-
* **IBM CPLEX** may be installed using `pip install 'qiskit-optimization[cplex]'` to enable the reading of `LP` files.
42+
* **IBM CPLEX** may be installed using `pip install 'qiskit-optimization[cplex]'` to enable the reading of `LP` files and the usage of
43+
the `CplexOptimizer`, wrapper for ``cplex.Cplex``.
44+
45+
* **CVXPY** may be installed using command `pip install 'qiskit-optimization[cvx]'` to install the
46+
package. CVXPY being installed will enable the usage of the Goemans-Williamson algorithm as an optimizer `GoemansWilliamsonOptimizer`.
47+
48+
* **Matplotlib** may be installed using command `pip install 'qiskit-optimization[matplotlib]'` to install the
49+
package. Matplotlib being installed will enable the usage of the `draw` method in the graph optimization application classes.
4350

4451
### Creating Your First Optimization Programming Experiment in Qiskit
4552

docs/conf.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@
2626
import os
2727
import sys
2828
sys.path.insert(0, os.path.abspath('..'))
29+
sys.path.append(os.path.abspath('.'))
2930

3031
"""
3132
Sphinx documentation builder
3233
"""
3334

3435
import qiskit_sphinx_theme
3536
import qiskit_optimization
37+
from custom_directives import (IncludeDirective, GalleryItemDirective,
38+
CustomGalleryItemDirective, CustomCalloutItemDirective,
39+
CustomCardItemDirective)
40+
3641
# Set env flag so that we can doc functions that may otherwise not be loaded
3742
# see for example interactive visualizations in qiskit.visualization.
3843
os.environ['QISKIT_DOCS'] = 'TRUE'
@@ -86,7 +91,7 @@
8691
'sphinx.ext.mathjax',
8792
'sphinx.ext.viewcode',
8893
'sphinx.ext.extlinks',
89-
'sphinx_tabs.tabs',
94+
'sphinx_panels',
9095
'jupyter_sphinx',
9196
'sphinx_autodoc_typehints',
9297
'reno.sphinxext',
@@ -197,3 +202,14 @@
197202
'includehidden': True,
198203
'titles_only': False,
199204
}
205+
206+
# -- Extension configuration -------------------------------------------------
207+
208+
209+
def setup(app):
210+
app.add_directive('includenodoc', IncludeDirective)
211+
app.add_directive('galleryitem', GalleryItemDirective)
212+
app.add_directive('customgalleryitem', CustomGalleryItemDirective)
213+
app.add_directive('customcarditem', CustomCardItemDirective)
214+
app.add_directive('customcalloutitem', CustomCalloutItemDirective)
215+

0 commit comments

Comments
 (0)