-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Introduced
GeneralState
as a wrapper for NVIDIA's "high-l…
…evel" API * Moved modules dealing with exact TN circuit representation to separate folder. * Implemented `GeneralState`. * Added statevector test. * Added overlap test. * Added a toffoli box with implicit swaps test and corresponding fix to `GeneralState`. * Updated public API docs. * Applying changes from comments * Moving CuTensorNetHandle to the general.py at the root of the module * Updated changelog * Adding error message if circuit contains non-unitary gates --------- Co-authored-by: PabloAndresCQ <[email protected]> Co-authored-by: Pablo Andres-Martinez <[email protected]>
- Loading branch information
1 parent
ef0d2fe
commit 35e0fd8
Showing
23 changed files
with
817 additions
and
88 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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
API documentation | ||
----------------- | ||
|
||
.. autoclass:: pytket.extensions.cutensornet.CuTensorNetHandle | ||
|
||
.. automethod:: destroy | ||
|
||
|
||
.. toctree:: | ||
modules/fullTN.rst | ||
modules/general_state.rst | ||
modules/structured_state.rst |
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 was deleted.
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,31 @@ | ||
General state (exact) simulation | ||
================================ | ||
|
||
.. automodule:: pytket.extensions.cutensornet.general_state | ||
|
||
.. autoclass:: pytket.extensions.cutensornet.general_state.GeneralState() | ||
|
||
.. automethod:: __init__ | ||
.. automethod:: get_statevector | ||
.. automethod:: expectation_value | ||
.. automethod:: destroy | ||
|
||
cuQuantum `contract` API interface | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. autoclass:: pytket.extensions.cutensornet.general_state.TensorNetwork | ||
|
||
.. autoclass:: pytket.extensions.cutensornet.general_state.PauliOperatorTensorNetwork | ||
|
||
.. autoclass:: pytket.extensions.cutensornet.general_state.ExpectationValueTensorNetwork | ||
|
||
.. autofunction:: pytket.extensions.cutensornet.general_state.measure_qubits_state | ||
|
||
.. autofunction:: pytket.extensions.cutensornet.general_state.tk_to_tensor_network | ||
|
||
|
||
Pytket backend | ||
~~~~~~~~~~~~~~ | ||
|
||
.. automodule:: pytket.extensions.cutensornet | ||
:members: CuTensorNetBackend |
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2019-2024 Quantinuum | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""Module for simulating circuits with no predetermined tensor network structure.""" | ||
|
||
from .utils import circuit_statevector_postselect | ||
|
||
from .tensor_network_convert import ( | ||
TensorNetwork, | ||
PauliOperatorTensorNetwork, | ||
ExpectationValueTensorNetwork, | ||
tk_to_tensor_network, | ||
measure_qubits_state, | ||
) | ||
|
||
from .tensor_network_state import GeneralState |
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
Oops, something went wrong.