Skip to content

Commit

Permalink
Merge pull request #66 from QuSTaR/remove_overloads
Browse files Browse the repository at this point in the history
Fix docs builds and remove the Qiskit overloads
  • Loading branch information
nonhermitian authored Aug 8, 2022
2 parents 4c0c10d + 6b34ad6 commit 5d9dcd2
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 435 deletions.
11 changes: 1 addition & 10 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
API reference
=============

The Kaleidoscope API is currently broken into three parts:
The Kaleidoscope API is currently broken into two parts:

1.) General interactive figures.

2.) IBM Quantum system plots via Qiskit.

3.) Additional Qiskit functionality

The general interactive figures take generic Python objects as inputs and therefore
will work with any quantum computing framework. In addition, these functions will also
accept Qiskit classes, where applicable. Qiskit does not need to be installed to use
Expand All @@ -23,17 +21,10 @@ installation dependencies. Others are generalized versions of figures
that have been used in various IBM Quantum press releases, presentations,
and other materials.

Finally, the API contains several Qiskit addons that provide functionality
that does not exist in Qiskit proper, but is nevertheless extremely useful
to have. These methods are used throughout the example codes for
Kaleidoscope.

.. toctree::
:maxdepth: 1
:caption: API reference
:hidden:

Interactive figures<apidocs/interactive>
IBM Quantum system visualizations<apidocs/backends>
Qiskit services <apidocs/services>
Qiskit addons <apidocs/overload>
6 changes: 0 additions & 6 deletions docs/apidocs/overload.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/services.rst

This file was deleted.

3 changes: 1 addition & 2 deletions docs/guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ for a good introduction.
.. toctree::
:maxdepth: 2

Saving figures <saving.rst>
Qiskit systems <systems.rst>
Saving figures <saving.rst>
162 changes: 0 additions & 162 deletions docs/guide/systems.rst

This file was deleted.

6 changes: 2 additions & 4 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ Installation is simple:
Or if your adventurous you can install from `source code on Github <https://github.com/nonhermitian/kaleidoscope>`_.


Running in Jupyter Lab
~~~~~~~~~~~~~~~~~~~~~~

Running Kaleidoscope, and Plotly in general, in the Jupyter Lab environment requires
some `additional extensions to be installed <https://plotly.com/python/getting-started/>`_.




Qiskit functionality
--------------------

Expand All @@ -39,5 +38,4 @@ of Qiskit and the IBM Quantum devices requires the following installations:
.. code-block:: bash
pip install qiskit-terra>=0.14
pip install qiskit-ibmq-provider>=0.7
pip install qiskit-aer>=0.5
pip install qiskit-ibmq-provider>=0.7
11 changes: 5 additions & 6 deletions docs/tutorials/backends/cnot_density.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ Simple multi-system comparison
provider = IBMQ.get_provider(group='open')

backends = []
backends.append(provider.backends.ibmq_lima)
backends.append(provider.backends.ibmq_santiago)
backends.append(provider.backends.ibmq_belem)
backends.append(provider.backends.ibmq_quito)
backends.append(provider.get_backend('ibm_nairobi'))
backends.append(provider.get_backend('ibmq_quito'))
backends.append(provider.get_backend('ibmq_manila'))

cnot_error_density(backends)

Expand All @@ -39,8 +38,8 @@ Historical data with custom colors

.. jupyter-execute::

backend = provider.backends.ibmq_lima
props = [backend.properties(datetime=datetime.datetime(2020, kk, 1)) for kk in range(2, 7)]
backend = provider.get_backend('ibm_nairobi')
props = [backend.properties(datetime=datetime.datetime(2022, kk, 1)) for kk in range(2, 7)]
cnot_error_density(props, offset=200,
colors=['#d6d6d6', '#bebebe', '#a6a6a6', '#8e8e8e', '#ff007f'])

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/backends/error_map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Error map from backend instance
.. jupyter-execute::

pro = IBMQ.get_provider(group='open')
backend = pro.backends.ibmq_lima
backend = pro.get_backend('ibm_nairobi')
system_error_map(backend)


Expand All @@ -26,7 +26,7 @@ Error map from backend properties

import datetime
# Grab ibmq_lima properties on Jan. 1, 2020.
old_props = backend.properties(datetime=datetime.datetime(2020, 1, 1))
old_props = backend.properties(datetime=datetime.datetime(2022, 1, 1))
system_error_map(old_props)


Expand All @@ -38,5 +38,5 @@ Change colormap
from kaleidoscope.qiskit import system_error_map
from matplotlib.cm import cividis

backend = pro.backends.ibmq_santiago
backend = pro.get_backend('ibmq_manila')
system_error_map(backend, colormap=cividis)
15 changes: 8 additions & 7 deletions docs/tutorials/backends/gate_map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gate map from backend instance
.. jupyter-execute::

pro = IBMQ.get_provider(group='open')
backend = pro.backends.ibmq_lima
backend = pro.get_backend('ibm_nairobi')
system_gate_map(backend)


Expand All @@ -24,7 +24,7 @@ Gate map qubit labels

.. jupyter-execute::

system_gate_map(backend, qubit_labels=['A', 'B', 'C', 'D', 'E'])
system_gate_map(backend, qubit_labels=['A', 'B', 'C', 'D', 'E', 'F', 'G'])


Gate map qubit color
Expand All @@ -33,7 +33,7 @@ Gate map qubit color
.. jupyter-execute::

system_gate_map(backend,
qubit_labels=['A', 'B', 'C', 'D', 'E'],
qubit_labels=['A', 'B', 'C', 'D', 'E', 'F', 'G'],
qubit_colors='#8b7b8b')


Expand All @@ -43,8 +43,9 @@ Gate map qubit colors as list
.. jupyter-execute::

system_gate_map(backend,
qubit_labels=['A', 'B', 'C', 'D', 'E'],
qubit_colors=['#8b7b8b', '#845e49', '#496b3a', '#e97fa5', '#ff9999'])
qubit_labels=['A', 'B', 'C', 'D', 'E', 'F', 'G'],
qubit_colors=['#8b7b8b', '#845e49', '#496b3a', '#e97fa5',
'#ff9999', '#8b7b8b', '#845e49'])


Gate map qubit and line colors
Expand All @@ -64,7 +65,7 @@ Gate line colors as list
.. jupyter-execute::

system_gate_map(backend,
line_colors=['#845e49', '#496b3a', '#e97fa5', '#ff9999']*2)
line_colors=['#845e49', '#496b3a', '#e97fa5', '#ff9999', '#845e49', '#496b3a']*2)


Disable qubit labels
Expand All @@ -84,4 +85,4 @@ Make gate map for black background
qubit_colors='white',
font_color="black",
line_colors='white',
background_color='black')
background_color='black')
39 changes: 0 additions & 39 deletions docs/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,42 +133,3 @@ IBM Quantum Backend figures
</p>
</div>
</div>


Qiskit Addons
-------------

.. raw:: html

<div class="sphx-glr-thumbcontainer">
<div class="figure align-center">
<img alt="thumbnail" src="../_static/thumbs/qiskit.png" />
<p class="caption">
<span class="caption-text">
<a class="reference internal" href="qiskit/quantum_circuit.html">
<span class="std std-ref">QuantumCircuit</span>
</a>
</span>
</p>
</div>
</div>

<div class="sphx-glr-thumbcontainer">
<div class="figure align-center">
<img alt="thumbnail" src="../_static/thumbs/qiskit.png" />
<p class="caption">
<span class="caption-text">
<a class="reference internal" href="qiskit/statevector.html">
<span class="std std-ref">Statevector</span>
</a>
</span>
</p>
</div>
</div>

.. toctree::
:maxdepth: 2
:hidden:

QuantumCircuit <qiskit/quantum_circuit>
Statevector <qiskit/statevector>
Loading

0 comments on commit 5d9dcd2

Please sign in to comment.