{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Adding plugins to your computation stack\n", "\n", "A plugin is a tool which can be link to a QPU to make the computation stack more powerful. A plugin is used to pre-process batches sended to a QPU and/or post-process results of a QPU.\n", "When a Plugin is linked to a QPU, a new QPU is created. For instance, the following code defines a new QPU where each batch sended to this object is pre-processed and each result is post-processed by the plugin \"*Plugin()*\":\n", "\n", "> `my_qpu = Plugin() | QPU()`\n", "\n", "The QLM provides classes to define your own plugin, an example of custom plugin is presented in [**this tutorial**](plugins.ipynb).\n", "\n", "Moreover, some plugins are already implemented in the QLM:\n", " - [**Quameleon plugin**](./emulating_custom_hardware_specs.ipynb): this plugin is used to simulate hardware specs for any QPU\n", " - the [**observable splitter plugin**](./observable_splitter.ipynb) can be used to tranform observable sampling into computational basis sampling\n", " - the [**circuit inliner**](./circuit_inliner.ipynb) can be used to inline the content of a circuit in its main (in case some other Plugin needs to access the inlined circuit)\n", "\n", "Finally, [**this**](./plugins.ipynb) notebook shows how to write your own QLM compatible plugin." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "authors": [ "Arnaud Gazda", "Simon Martiel" ], "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" } }, "nbformat": 4, "nbformat_minor": 2 }