-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from CQCL/release/1-11-0
Release/1 11 0
- Loading branch information
Showing
41 changed files
with
155 additions
and
93 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
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
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
File renamed without changes
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
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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
sphinx ~= 4.3.2 | ||
sphinx_book_theme | ||
sphinx-copybutton |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
build | ||
dist | ||
*.pyc | ||
.venv | ||
.vscode | ||
.mypy_cache | ||
.hypothesis | ||
|
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__extension_version__ = "0.12.0" | ||
__extension_version__ = "0.13.0" | ||
__extension_name__ = "pytket-quantinuum" |
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 |
---|---|---|
|
@@ -32,7 +32,7 @@ a:visited, | |
.sig-param, | ||
.std.std-ref, | ||
a { | ||
color: #2563EB; | ||
color: #544d4d; | ||
} | ||
|
||
:root { | ||
|
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["![Quantinuum_logo](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAABLCAMAAACLOq%2BzAAACx1BMVEUAAAAAAP%2BAgIBVqqqAgIBmmZmAgKptkpKAgJ9xjo6AgJl0i6JqgJV2iZ1tgJJ3iJlwgJ94h5ZxgJx5hpRzgJl5hp50gJdvhZt1gJVwhZl2gJ12gJtyhJV3gJlzhJx4gJd0g5txgJZ1g5lxgJx1g5hygJp2g5ZzgJl2g5tzgJh3gpp0gJdxgpl0gJtygph1gJpygpd1gJlzgpt2gJhzgpp2gJd0gplygJt0gphygJp1gpdzgJl1gptzgJh1gpp2gZl0gJtygZh0gJpzgZh1gJlzgZp1gJhzgZp1gJh0gZl0gZhygJp0gZhzgJl0gZ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LS1tWBhEaQrGoTb9tTfGVyXAJF2NI0%2BJQF0Bjr5aACz31X%2FaC8cSfXOWDK0LwfjFt7tC4E49gmOEpmFMVW5KSyl%2Be%2F68QJX9gFPluHafwBWj32FUbynUjljg3GrgIf0UR74SgbrncAzQ08CKs7M0DyO56d2t9Ww%2FFYPfUxoOqZqN435lAeGf7fVQ0jIQx97NzNG%2BBKjbiKvyGK4%2BysE4vJYC7Y6H5lJgggbheF6JwJmXcFyvfOCVk6H7ziUAFa23ljdzeg2uFM2CG7QQxxSNA6ZrEiS3lOPYvwHm6EgyjZtx7TqCq69%2Bj3FkNTyp6iSP1gLpugvHMiUCp9bjSFEesPILRqkM7tFrlLbS8Bqu6%2FVHCP36n6EYmxv7QK9jenxKVu6J1sEYB8qAuTpxq68C18fVuOI0FePzYqBANalaDyRrHUbvmuO9gA%2FPxGE8rVFA0VHY4rsr7EBDAkUtHNiJK10ZwHy9lUD0cnmBmWq3FeNQGUaBarUV1%2FYqXP01DeNoMcYi1aoMY5MKI0neoRyMe31%2Fv5FeeS0fhQAlR2Fg8755WgirmnlWo%2FCLHRgKeFZIdY16Ixyu%2BrJy%2BDBHqW8IUF2G4xnpLVzvfYIrXtMxaopxPC%2BVY8T8ReePy1eI38xmX81%2FtedqjNVHgZfV9mUUrGok%2FvjpsXQ0svj90jSMG7zD8Yt%2BZiwwLwu%2FXG82rqzHcMV4R2AU%2FAa%2FGd7JOEImvv7e8mG0u3nJuxuzw3Fk5AP9vd7RwMQCGPQfHayoKClZ6R3FlRJV8MnJ2trG2trZXBH%2FA2RBOeTINIkQAAAAAElFTkSuQmCC)<br>\n", "# Compiling for Quantinuum Hardware without Querying Quantinuum API"]}, {"cell_type": "markdown", "metadata": {}, "source": ["This notebook contains an example of how to investigate circuits compiled for Quantinuum hardware without logging in or submitting to Quantinuum hardware. This may be useful if it is desired to explore circuit compilation in depth before submitting."]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Circuit Preparation <a class=\"anchor\" id=\"circuit-preparation\"></a>"]}, {"cell_type": "markdown", "metadata": {}, "source": ["Create your circuit."]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["from pytket.circuit import Circuit, OpType\n", "from pytket.circuit.display import render_circuit_jupyter"]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["circuit = Circuit(2, name=\"Bell Test\")\n", "circuit.H(0)\n", "circuit.CX(0, 1)\n", "circuit.measure_all()"]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["render_circuit_jupyter(circuit)"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Set up Backend"]}, {"cell_type": "markdown", "metadata": {}, "source": ["Set up a `QuantinuumBackend` object. The difference is the `machine_debug` option uses the default `pytket-quantinuum` options such as pytket's version of the Quantinuum native gate set rather than querying the Quantinuum API for this information."]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["from pytket.extensions.quantinuum import QuantinuumBackend"]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["machine = \"H1-1E\"\n", "backend = QuantinuumBackend(device_name=machine, machine_debug=True)"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Investigate Native Gate Set"]}, {"cell_type": "markdown", "metadata": {}, "source": ["Users can view the hard-coded native gate set for the Quantinuum backend using the following command."]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["import pytket.extensions.quantinuum.backends.quantinuum as qtm"]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["print(qtm._GATE_SET)"]}, {"cell_type": "markdown", "metadata": {}, "source": ["It's possible that the hardcoded verion is not up to date with the latest native gate set as described in the [System Model H1 Product Data Sheet](https://www.quantinuum.com/hardware/h1). In this case, the Rzz gate, which is the `ZZPhase` gate in pytket, is missing. This can be added by running the following command."]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["qtm._GATE_SET.add(OpType.ZZPhase)"]}, {"cell_type": "markdown", "metadata": {}, "source": ["### Circuit Compilation <a class=\"anchor\" id=\"circuit-compilation\"></a>"]}, {"cell_type": "markdown", "metadata": {}, "source": ["Circuits can now be compiled with the `get_compiled_circuit` function without querying the Quantinuum API."]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["compiled_circuit = backend.get_compiled_circuit(circuit, optimisation_level=2)"]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["render_circuit_jupyter(compiled_circuit)"]}, {"cell_type": "markdown", "metadata": {}, "source": ["<div align=\"center\"> © 2022 by Quantinuum. All Rights Reserved. </div>"]}], "metadata": {"kernelspec": {"display_name": "Python 3", "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.6.4"}}, "nbformat": 4, "nbformat_minor": 2} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.