You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/changelog.rst
+7
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
Changelog
2
2
~~~~~~~~~
3
3
4
+
0.30.0 (November 2022)
5
+
----------------------
6
+
7
+
* Update qiskit version to 0.39.
8
+
* ``tk_to_qiskit`` now performs a rebase pass prior to conversion. Previously an error was returned if a ``Circuit`` contained gates such as ``OpType.ZZMax`` which have no exact replacement in qiskit. Now the unsupported gate will be implemented in terms of gates supported in qiskit rather than returning an error.
Copy file name to clipboardexpand all lines: docs/intro.txt
+132-2
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,138 @@ representations.
26
26
Windows. To install, run:
27
27
28
28
::
29
-
30
-
pip install pytket-qiskit
29
+
30
+
pip install pytket-qiskit
31
+
32
+
This will install `pytket` if it isn't already installed, and add new classes
33
+
and methods into the `pytket.extensions` namespace.
34
+
35
+
Access and Credentials
36
+
======================
37
+
38
+
Accessing devices and simulators through the pytket-qiskit extension requires an IBMQ account. An account can be set up here -> https://quantum-computing.ibm.com/login.
39
+
40
+
Once you have created an account you can obtain an API token which you can use to configure your credentials locally.
41
+
42
+
::
43
+
44
+
from pytket.extensions.qiskit import set_ibmq_config
45
+
46
+
set_ibmq_config(ibmq_api_token=ibm_token)
47
+
48
+
This will save your IBMQ credentials locally. After saving your credentials you can access pytket-qiskit backend repeatedly without having to re-initialise your credentials.
49
+
50
+
If you are a member of an IBM hub then you can add this information to ``set_ibmq_config`` as well.
51
+
52
+
::
53
+
54
+
from pytket.extensions.qiskit import set_ibmq_config
To see which devices you can access you can use the ``available_devices`` method on the ``IBMQBackend`` or ``IBMQEmulatorBackend``. Note that it is possible to pass ``hub``, ``group`` and ``project`` parameters to this method. This allows you to see which devices are accessible through your IBM hub.
59
+
60
+
::
61
+
62
+
from pytket.extensions.qiskit import IBMQBackend
63
+
64
+
backend = IBMQBackend # Initialise backend for an IBM device
* [1] ``AerBackend`` is noiseless by default and has no architecture. However it can accept a user defined ``NoiseModel`` and ``Architecture``.
92
+
* In addition to the backends above the pytket-qiskit extension also has the ``TketBackend``. This allows a tket ``Backend``s and compilation passes to be used directly through qiskit. see the `Notebook example <https://github.com/CQCL/pytket/blob/main/examples/qiskit_integration.ipynb>`_ on qiskit integration.
93
+
94
+
Default Compilation
95
+
===================
96
+
97
+
Every ``Backend`` in pytket has its own ``default_compilation_pass`` method. This method applies a sequence of optimisations to a circuit depending on the value of an ``optimisation_level`` parameter. This default compilation will ensure that the circuit meets all the constraints required to run on the Backend. The passes applied by different levels of optimisation are specified in the table below.
98
+
99
+
.. list-table:: **Default compilation pass for the IBMQBackend and IBMQEmulatorBackend**
* [1] If no value is specified then ``optimisation_level`` defaults to a value of 1.
138
+
* [2] self.rebase_pass is a rebase to the gateset supported by the backend, For IBM quantum devices that is {X, SX, Rz, CX}.
139
+
* [3] Here ``CXMappingPass`` maps program qubits to the architecture using a `NoiseAwarePlacement <https://cqcl.github.io/tket/pytket/api/placement.html#pytket.placement.NoiseAwarePlacement>`_
140
+
* [4] ``SimplifyInitial`` has arguments ``allow_classical=False`` and ``create_all_qubits=True``.
141
+
142
+
143
+
**Note:** The ``default_compilation_pass`` for ``AerBackend`` is the same as above except it doesn't use ``SimplifyInitial``.
144
+
145
+
146
+
Backend Predicates
147
+
==================
148
+
149
+
Circuits must satisfy certain conditions before they can be processed on a device or simulator. In pytket these conditions are called predicates.
150
+
151
+
All pytket-qiskit backends have the following two predicates.
152
+
153
+
* `GateSetPredicate <https://cqcl.github.io/tket/pytket/api/predicates.html#pytket.predicates.GateSetPredicate>`_ - The circuit must contain only operations supported by the ``Backend``. To view supported Ops run ``BACKENDNAME.backend_info.gate_set``.
154
+
* `NoSymbolsPredicate <https://cqcl.github.io/tket/pytket/api/predicates.html#pytket.predicates.NoSymbolsPredicate>`_ - Parameterised gates must have numerical values when the circuit is executed.
155
+
156
+
The ``IBMQBackend`` and ``IBMQEmulatorBackend`` may also have the following predicates depending on the capabilities of the specified device.
0 commit comments