-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
17,242 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 4fc1d0579f0ff17a6bac8ea7c7801d4c | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file added
BIN
+21.6 KB
...92/_images/44dcd3c862c0b82e7fd3ad531de26100f34fc95f130a71e6074703ba599dea50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.3 KB
...92/_images/b06be5d1f54fca31917e33082dc3377582be8afd99b784493ce56692c7d7e255.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
368 changes: 368 additions & 0 deletions
368
pr-preview/pr-92/_modules/qiskit_quantuminspire/api/authentication.html
Large diffs are not rendered by default.
Oops, something went wrong.
351 changes: 351 additions & 0 deletions
351
pr-preview/pr-92/_modules/qiskit_quantuminspire/api/client.html
Large diffs are not rendered by default.
Oops, something went wrong.
343 changes: 343 additions & 0 deletions
343
pr-preview/pr-92/_modules/qiskit_quantuminspire/api/pagination.html
Large diffs are not rendered by default.
Oops, something went wrong.
370 changes: 370 additions & 0 deletions
370
pr-preview/pr-92/_modules/qiskit_quantuminspire/api/settings.html
Large diffs are not rendered by default.
Oops, something went wrong.
314 changes: 314 additions & 0 deletions
314
pr-preview/pr-92/_modules/qiskit_quantuminspire/base_provider.html
Large diffs are not rendered by default.
Oops, something went wrong.
345 changes: 345 additions & 0 deletions
345
pr-preview/pr-92/_modules/qiskit_quantuminspire/cqasm.html
Large diffs are not rendered by default.
Oops, something went wrong.
453 changes: 453 additions & 0 deletions
453
pr-preview/pr-92/_modules/qiskit_quantuminspire/qi_backend.html
Large diffs are not rendered by default.
Oops, something went wrong.
693 changes: 693 additions & 0 deletions
693
pr-preview/pr-92/_modules/qiskit_quantuminspire/qi_jobs.html
Large diffs are not rendered by default.
Oops, something went wrong.
349 changes: 349 additions & 0 deletions
349
pr-preview/pr-92/_modules/qiskit_quantuminspire/qi_provider.html
Large diffs are not rendered by default.
Oops, something went wrong.
318 changes: 318 additions & 0 deletions
318
pr-preview/pr-92/_modules/qiskit_quantuminspire/utils.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
qiskit_quantuminspire | ||
===================== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
qiskit_quantuminspire |
45 changes: 45 additions & 0 deletions
45
pr-preview/pr-92/_sources/api/qiskit_quantuminspire.api.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
qiskit\_quantuminspire.api package | ||
================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
qiskit\_quantuminspire.api.authentication module | ||
------------------------------------------------ | ||
|
||
.. automodule:: qiskit_quantuminspire.api.authentication | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.api.client module | ||
---------------------------------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.api.client | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.api.pagination module | ||
-------------------------------------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.api.pagination | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.api.settings module | ||
------------------------------------------ | ||
|
||
.. automodule:: qiskit_quantuminspire.api.settings | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.api | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
69 changes: 69 additions & 0 deletions
69
pr-preview/pr-92/_sources/api/qiskit_quantuminspire.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
qiskit\_quantuminspire package | ||
============================== | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
qiskit_quantuminspire.api | ||
|
||
Submodules | ||
---------- | ||
|
||
qiskit\_quantuminspire.base\_provider module | ||
-------------------------------------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.base_provider | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.cqasm module | ||
----------------------------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.cqasm | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.qi\_backend module | ||
----------------------------------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.qi_backend | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.qi\_jobs module | ||
-------------------------------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.qi_jobs | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.qi\_provider module | ||
------------------------------------------ | ||
|
||
.. automodule:: qiskit_quantuminspire.qi_provider | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
qiskit\_quantuminspire.utils module | ||
----------------------------------- | ||
|
||
.. automodule:: qiskit_quantuminspire.utils | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: qiskit_quantuminspire | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Contributing | ||
|
||
This project uses Poetry for package management and tox for managing testing/linting/documentation tools. | ||
|
||
## Setting up a development environment | ||
|
||
Ensure both Poetry and tox installed (using [pipx](https://github.com/pypa/pipx) is recommended): | ||
|
||
```bash | ||
pipx install poetry | ||
pipx install tox | ||
``` | ||
|
||
Install dependencies in a virtual environment (run in root of repository): | ||
|
||
```bash | ||
poetry install | ||
``` | ||
|
||
## Useful tox commands | ||
|
||
```bash | ||
tox -e test # Run pytest | ||
tox -e lint # Run linters | ||
tox -e type # Run mypy | ||
tox # Run all of above | ||
tox -e docs # Generate documentation | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
====================== | ||
Getting Started | ||
====================== | ||
|
||
How to get started | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
Installation and login <installation> | ||
Submitting a circuit <submitting> | ||
|
13 changes: 13 additions & 0 deletions
13
pr-preview/pr-92/_sources/getting_started/installation.md.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Installation and login | ||
|
||
You can install the Qiskit-QI plugin using pip: | ||
|
||
```bash | ||
pip install qiskit-quantuminspire | ||
``` | ||
|
||
For access to the Quantum Inspire 2 API you can use the QI2 CLI. Once installed (see [repository](https://github.com/QuTech-Delft/quantuminspire2) for installation instructions), simply run the shell command below to log in to the production environment. | ||
|
||
```bash | ||
qi login "https://api.qi2.quantum-inspire.com" | ||
``` |
74 changes: 74 additions & 0 deletions
74
pr-preview/pr-92/_sources/getting_started/submitting.md.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# How to: Submit a circuit | ||
|
||
## Getting a backend | ||
|
||
To instantiate the provider, make sure you are logged into QI2, then create a provider: | ||
|
||
```python | ||
from qiskit_quantuminspire.qi_provider import QIProvider | ||
|
||
provider = QIProvider() | ||
``` | ||
|
||
Once the provider has been instantiated, it may be used to access supported backends: | ||
|
||
```python | ||
# Show all current supported backends: | ||
print(provider.backends()) | ||
|
||
# Get Quantum Inspire's simulator backend: | ||
simulator_backend = provider.get_backend("QX emulator") | ||
``` | ||
|
||
## Submitting a Circuit | ||
|
||
Once a backend has been specified, it may be used to submit circuits. | ||
For example, running a Bell State: | ||
|
||
```python | ||
from qiskit import QuantumCircuit | ||
|
||
# Create a basic Bell State circuit: | ||
qc = QuantumCircuit(2, 2) | ||
qc.h(0) | ||
qc.cx(0, 1) | ||
qc.measure([0, 1], [0, 1]) | ||
|
||
# Show a representation of the quantum circuit: | ||
print(qc) | ||
|
||
# Run the circuit on Quantum Inspire's platform: | ||
job = simulator_backend.run(qc) | ||
|
||
# Print the results. | ||
print(job.result().get_counts()) | ||
``` | ||
|
||
On backends that support the `raw data` feature, you can set the `memory` option to get the measurement result of each individual shot: | ||
|
||
```python | ||
job = simulator_backend.run(qc, memory=True) | ||
``` | ||
|
||
## Transpilation | ||
|
||
Depending on the chosen backends, certain gates may not be supported. Qiskit is aware of the capabilities of each backend, and can transpile | ||
circuits to use only supported gates: | ||
|
||
```python | ||
from qiskit import transpile | ||
|
||
# Show supported gates | ||
print(simulator_backend.target) | ||
|
||
# Create circuit with a gate the backend doesn't support: | ||
qc = QuantumCircuit(2, 2) | ||
qc.sx(0) | ||
qc.cx(0, 1) | ||
qc.measure([0, 1], [0, 1]) | ||
|
||
|
||
# Transpile the circuit for the target backend: | ||
qc_compiled = transpile(qc, simulator_backend) | ||
print(qc_compiled) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
====================== | ||
Qiskit-QuantumInspire | ||
====================== | ||
|
||
Welcome to the documentation of **Qiskit-QuantumInspire**, a Qiskit plugin for the Quantum Inspire platform. | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
Documentation Home <index> | ||
Getting Started <getting_started/index> | ||
Example Notebooks <notebooks/index> | ||
Contributing and Development <contributing> | ||
License <license> | ||
API Reference <api/modules> | ||
GitHub <https://github.com/QuTech-Delft/qiskit-quantuminspire> | ||
|
||
|
||
.. _toctree: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html | ||
.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html | ||
.. _references: https://www.sphinx-doc.org/en/stable/markup/inline.html | ||
.. _Python domain syntax: https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-python-domain | ||
.. _Sphinx: https://www.sphinx-doc.org/ | ||
.. _Python: https://docs.python.org/ | ||
.. _Numpy: https://numpy.org/doc/stable | ||
.. _SciPy: https://docs.scipy.org/doc/scipy/reference/ | ||
.. _matplotlib: https://matplotlib.org/contents.html# | ||
.. _Pandas: https://pandas.pydata.org/pandas-docs/stable | ||
.. _Scikit-Learn: https://scikit-learn.org/stable | ||
.. _autodoc: https://www.sphinx-doc.org/en/master/ext/autodoc.html | ||
.. _Google style: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings | ||
.. _NumPy style: https://numpydoc.readthedocs.io/en/latest/format.html | ||
.. _classical style: https://www.sphinx-doc.org/en/master/domains.html#info-field-lists |
Oops, something went wrong.