Skip to content

Commit

Permalink
Feature/mps sampling (#28)
Browse files Browse the repository at this point in the history
* New features implemented. Not debugged yet.

* Refactored get_amplitude, added get_statevector and corresponding tests.

* Tested and debugged expected_value feature

* Added tests for the measure and sample features. Fixed a bug in measure.

* Updated the docs.

* Changes suggested by Iakov.

* Updated the Jupyter notebook, showing how to use the sampling feature.
  • Loading branch information
PabloAndresCQ authored Aug 31, 2023
1 parent a3ee4f0 commit 2680f32
Show file tree
Hide file tree
Showing 6 changed files with 655 additions and 99 deletions.
9 changes: 7 additions & 2 deletions docs/modules/mps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Simulation

.. autofunction:: pytket.extensions.cutensornet.mps.simulate

.. autofunction:: pytket.extensions.cutensornet.mps.get_amplitude


Classes
~~~~~~~
Expand All @@ -24,6 +22,13 @@ Classes
.. automethod:: apply_gate
.. automethod:: vdot
.. automethod:: canonicalise
.. automethod:: sample
.. automethod:: measure
.. automethod:: postselect
.. automethod:: expectation_value
.. automethod:: get_statevector
.. automethod:: get_amplitude
.. automethod:: get_qubits
.. automethod:: get_virtual_dimensions
.. automethod:: get_physical_dimension
.. automethod:: get_device_id
Expand Down
145 changes: 108 additions & 37 deletions examples/mps_tutorial.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pytket/extensions/cutensornet/mps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
MPSxMPO,
)

from .simulation import ContractionAlg, simulate, get_amplitude, prepare_circuit
from .simulation import ContractionAlg, simulate, prepare_circuit
Loading

0 comments on commit 2680f32

Please sign in to comment.