From e991cfc79c76fd4cbfc5218011934f619a57c1b1 Mon Sep 17 00:00:00 2001 From: Steve Gore Date: Mon, 8 Jul 2019 12:10:09 +1000 Subject: [PATCH 1/2] Markdown linting and prettier formatting --- README.md | 92 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 6d021e54..d1fe6a10 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Q-CTRL Open Controls -Q-CTRL Open Controls is an open-source Python package that makes it easy to create and deploy established error-robust quantum control protocols from the open literature. The aim of the package is to be the most comprehensive library of published and tested quantum control techniques developed by the community, with easy to use export functions allowing users to deploy these controls on: +Q-CTRL Open Controls is an open-source Python package that makes it easy to +create and deploy established error-robust quantum control protocols from the +open literature. The aim of the package is to be the most comprehensive library +of published and tested quantum control techniques developed by the community, +with easy to use export functions allowing users to deploy these controls on: - Custom quantum hardware - Publicly available cloud quantum computers @@ -18,13 +22,23 @@ Anyone interested in quantum control is welcome to contribute to this project. ## Installation -Q-CTRL Open Controls can be install through `pip` or from source. We recommend the `pip` distribution to get the most recent stable release. If you want the latest features then install from source. +Q-CTRL Open Controls can be install through `pip` or from source. We recommend +the `pip` distribution to get the most recent stable release. If you want the +latest features then install from source. ### Requirements -To use Q-CTRL Open Controls you will need an installation of Python. We recommend using the [Anaconda](https://www.anaconda.com/) distribution of Python. Anaconda includes standard numerical and scientific Python packages which are optimally compiled for your machine. Follow the [Anaconda Installation](https://docs.anaconda.com/anaconda/install/) instructions and consult the [Anaconda User guide](https://docs.anaconda.com/anaconda/user-guide/) to get started. +To use Q-CTRL Open Controls you will need an installation of Python. We +recommend using the [Anaconda](https://www.anaconda.com/) distribution of +Python. Anaconda includes standard numerical and scientific Python packages +which are optimally compiled for your machine. Follow the [Anaconda +Installation](https://docs.anaconda.com/anaconda/install/) instructions and +consult the [Anaconda User +guide](https://docs.anaconda.com/anaconda/user-guide/) to get started. -We use interactive jupyter notebooks for our usage examples. The Anaconda python distribution comes with editors for these files, or you can [install the jupyter notebook editor](https://jupyter.org/install) on its own. +We use interactive jupyter notebooks for our usage examples. The Anaconda +python distribution comes with editors for these files, or you can [install the +jupyter notebook editor](https://jupyter.org/install) on its own. ### Using PyPi @@ -36,7 +50,9 @@ pip install qctrl-open-controls ### From Source -The source code is hosted on [Github](https://github.com/qctrl/python-open-controls). The repository can be cloned using +The source code is hosted on +[Github](https://github.com/qctrl/python-open-controls). The repository can be +cloned using ```shell git clone git@github.com:qctrl/python-open-controls.git @@ -46,28 +62,31 @@ Once the clone is complete, you have two options: 1. Using setup.py -```shell -cd python-open-controls -python setup.py develop -``` + ```shell + cd python-open-controls + python setup.py develop + ``` -**Note:** We recommend installing using `develop` to point your installation at the source code in the directory where you cloned the repository. + **Note:** We recommend installing using `develop` to point your installation at + the source code in the directory where you cloned the repository. -2. Using Poetry +1. Using Poetry -```shell -cd python-open-controls -./setup-poetry.sh -``` + ```shell + cd python-open-controls + ./setup-poetry.sh + ``` -**Note:** if you are on Windows, you'll need to install [Poetry](https://poetry.eustace.io) manually, and use: + **Note:** if you are on Windows, you'll need to install + [Poetry](https://poetry.eustace.io) manually, and use: -```cmd -cd python-open-controls -poetry install -``` + ```cmd + cd python-open-controls + poetry install + ``` -Once installed via one of the above methods, test your installation by running `pytest` in the `python-open-controls` directory. +Once installed via one of the above methods, test your installation by running +`pytest` in the `python-open-controls` directory. ```shell pytest @@ -75,31 +94,48 @@ pytest ## Usage -Usage depends on the application. We've provided a set of [example Jupyter notebooks](examples) addressing a variety of quantum control problems. Below is a short description of each notebook grouped by application. For further details on usage, use the inline documentation in the source code. +Usage depends on the application. We've provided a set of [example Jupyter +notebooks](examples) addressing a variety of quantum control problems. Below is +a short description of each notebook grouped by application. For further +details on usage, use the inline documentation in the source code. ### Dynamical Decoupling Sequences (DDS) -Q-CTRL Open Controls can create a large library of standard DDS which can be exported in a variety of formats. +Q-CTRL Open Controls can create a large library of standard DDS which can be +exported in a variety of formats. #### Create a DDS -[`examples/creating_a_dds.ipynb`](examples/creating_a_dds.ipynb) demonstrates how to use Q-CTRL Open Controls to create a DDS from a large library of published dynamical decoupling protocols. It also shows how to make Custom DDS with timings, offsets and unitaries defined by the user. The notebook shows how to export a DDS for deployment in the [Q-CTRL products](https://q-ctrl.com/products/) or your quantum hardware. +[`examples/creating_a_dds.ipynb`](examples/creating_a_dds.ipynb) demonstrates +how to use Q-CTRL Open Controls to create a DDS from a large library of +published dynamical decoupling protocols. It also shows how to make Custom DDS +with timings, offsets and unitaries defined by the user. The notebook shows how +to export a DDS for deployment in the [Q-CTRL +products](https://q-ctrl.com/products/) or your quantum hardware. #### Export a DDS to Qiskit -[`examples/export_a_dds_to_qiskit.ipynb`](examples/export_a_dds_to_qiskit.ipynb) demonstrates how to take a DDS and convert it to a Qiskit circuit so it can be run on IBM's quantum computers. It also demonstrates using a DDS to improve the performance of a quantum circuit execution by extending the coherence time of a qubit. +[`examples/export_a_dds_to_qiskit.ipynb`](examples/export_a_dds_to_qiskit.ipynb) +demonstrates how to take a DDS and convert it to a Qiskit circuit so it can be +run on IBM's quantum computers. It also demonstrates using a DDS to improve the +performance of a quantum circuit execution by extending the coherence time of a +qubit. #### Export a DDS to Cirq -[`examples/export_a_dds_to_cirq.ipynb`](examples/export_a_dds_to_cirq.ipynb) demonstrates how to take a DDS and convert it to a Cirq circuit or schdule. It also shows how to run a circuit or schedule in a Cirq simulator. +[`examples/export_a_dds_to_cirq.ipynb`](examples/export_a_dds_to_cirq.ipynb) +demonstrates how to take a DDS and convert it to a Cirq circuit or schdule. It +also shows how to run a circuit or schedule in a Cirq simulator. ## Contributing -See [Contributing](https://github.com/qctrl/.github/blob/master/CONTRIBUTING.md). +See +[Contributing](https://github.com/qctrl/.github/blob/master/CONTRIBUTING.md). ## Credits -See [Contributors](https://github.com/qctrl/python-open-controls/graphs/contributors). +See +[Contributors](https://github.com/qctrl/python-open-controls/graphs/contributors). ## License From d44e9a77d837d015c491ae2d0eb93310e8ea3985 Mon Sep 17 00:00:00 2001 From: CircleCI workflow Date: Mon, 8 Jul 2019 02:14:08 +0000 Subject: [PATCH 2/2] Update setup.py/README.rst to match pyproject.toml/README.md [ci skip] --- README.rst | 83 +++++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/README.rst b/README.rst index aa60e1a0..9178844c 100644 --- a/README.rst +++ b/README.rst @@ -2,11 +2,11 @@ Q-CTRL Open Controls ==================== -Q-CTRL Open Controls is an open-source Python package that makes it easy to create -and deploy established error-robust quantum control protocols from the open literature. -The aim of the package is to be the most comprehensive library of published and -tested quantum control techniques developed by the community, with easy to use -export functions allowing users to deploy these controls on: +Q-CTRL Open Controls is an open-source Python package that makes it easy to +create and deploy established error-robust quantum control protocols from the +open literature. The aim of the package is to be the most comprehensive library +of published and tested quantum control techniques developed by the community, +with easy to use export functions allowing users to deploy these controls on: * Custom quantum hardware @@ -35,16 +35,17 @@ latest features then install from source. Requirements ^^^^^^^^^^^^ -To use Q-CTRL Open Controls you will need an installation of Python. We recommend -using the `Anaconda `_ distribution of Python. Anaconda -includes standard numerical and scientific Python packages which are optimally -compiled for your machine. Follow the `Anaconda Installation `_ -instructions and consult the `Anaconda User guide `_ -to get started. +To use Q-CTRL Open Controls you will need an installation of Python. We +recommend using the `Anaconda `_ distribution of +Python. Anaconda includes standard numerical and scientific Python packages +which are optimally compiled for your machine. Follow the `Anaconda +Installation `_ instructions and +consult the `Anaconda User +guide `_ to get started. -We use interactive jupyter notebooks for our usage examples. The Anaconda python -distribution comes with editors for these files, or you can `install the jupyter -notebook editor `_ on its own. +We use interactive jupyter notebooks for our usage examples. The Anaconda +python distribution comes with editors for these files, or you can `install the +jupyter notebook editor `_ on its own. Using PyPi ^^^^^^^^^^ @@ -58,8 +59,9 @@ Use ``pip`` to install the latest version of Q-CTRL Open Controls. From Source ^^^^^^^^^^^ -The source code is hosted on `Github `_. -The repository can be cloned using +The source code is hosted on +`Github `_. The repository can be +cloned using .. code-block:: shell @@ -76,8 +78,8 @@ Once the clone is complete, you have two options: cd python-open-controls python setup.py develop - **Note:** We recommend installing using ``develop`` to point your installation at - the source code in the directory where you cloned the repository. + **Note:** We recommend installing using ``develop`` to point your installation + at the source code in the directory where you cloned the repository. #. Using Poetry @@ -87,15 +89,16 @@ Once the clone is complete, you have two options: cd python-open-controls ./setup-poetry.sh - **Note:** if you are on Windows, you'll need to install `Poetry `_ - manually, and use: + **Note:** if you are on Windows, you'll need to install + `Poetry `_ manually, and use: .. code-block:: cmd cd python-open-controls poetry install -Once installed via one of the above methods, test your installation by running ``pytest`` +Once installed via one of the above methods, test your installation by running +``pytest`` in the ``python-open-controls`` directory. .. code-block:: shell @@ -105,26 +108,26 @@ in the ``python-open-controls`` directory. Usage ----- -Usage depends on the application. We've provided a set of `example Jupyter notebooks `_ -addressing a variety of quantum control problems. Below is a short description -of each notebook grouped by application. For further details on usage, use the -inline documentation in the source code. +Usage depends on the application. We've provided a set of `example Jupyter +notebooks `_ addressing a variety of quantum control problems. Below is +a short description of each notebook grouped by application. For further +details on usage, use the inline documentation in the source code. Dynamical Decoupling Sequences (DDS) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Q-CTRL Open Controls can create a large library of standard DDS which can be exported -in a variety of formats. +Q-CTRL Open Controls can create a large library of standard DDS which can be +exported in a variety of formats. Create a DDS ~~~~~~~~~~~~ `\ ``examples/creating_a_dds.ipynb`` `_ demonstrates -how to use Q-CTRL Open Controls to create a DDS from a large library of published -dynamical decoupling protocols. It also shows how to make Custom DDS with timings, -offsets and unitaries defined by the user. The notebook shows how to export a -DDS for deployment in the `Q-CTRL products `_ or your -quantum hardware. +how to use Q-CTRL Open Controls to create a DDS from a large library of +published dynamical decoupling protocols. It also shows how to make Custom DDS +with timings, offsets and unitaries defined by the user. The notebook shows how +to export a DDS for deployment in the `Q-CTRL +products `_ or your quantum hardware. Export a DDS to Qiskit ~~~~~~~~~~~~~~~~~~~~~~ @@ -132,25 +135,27 @@ Export a DDS to Qiskit `\ ``examples/export_a_dds_to_qiskit.ipynb`` `_ demonstrates how to take a DDS and convert it to a Qiskit circuit so it can be run on IBM's quantum computers. It also demonstrates using a DDS to improve the -performance of a quantum circuit execution by extending the coherence time of -a qubit. +performance of a quantum circuit execution by extending the coherence time of a +qubit. Export a DDS to Cirq ~~~~~~~~~~~~~~~~~~~~ -`\ ``examples/export_a_dds_to_cirq.ipynb`` `_ demonstrates -how to take a DDS and convert it to a Cirq circuit or schdule. It also shows how -to run a circuit or schedule in a Cirq simulator. +`\ ``examples/export_a_dds_to_cirq.ipynb`` `_ +demonstrates how to take a DDS and convert it to a Cirq circuit or schdule. It +also shows how to run a circuit or schedule in a Cirq simulator. Contributing ------------ -See `Contributing `_. +See +`Contributing `_. Credits ------- -See `Contributors `_. +See +`Contributors `_. License -------