Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
PeilinZHENG committed Aug 8, 2023
2 parents b9514bf + 1e0b851 commit 12d67fb
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@
"avatar_url": "https://avatars.githubusercontent.com/u/45784888?v=4",
"profile": "https://github.com/PeilinZHENG",
"contributions": [
"tutorial"
"tutorial",
"code",
"test",
"doc"
]
}
],
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

- Add circuit copy method that avoid shallow copy issue `Circuit.copy()`

- Add end to end infrastructures and methods for classical shadow in `shadows.py`

### Fixed

- improve the `adaptive_vmap` to support internal jit and pytree output
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ TensorCircuit is open source, released under the Apache License, Version 2.0.
<td align="center" valign="top" width="16.66%"><a href="https://github.com/WiuYuan"><img src="https://avatars.githubusercontent.com/u/108848998?v=4?s=100" width="100px;" alt="WiuYuan"/><br /><sub><b>WiuYuan</b></sub></a><br /><a href="#example-WiuYuan" title="Examples">💡</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://www.linkedin.com/in/felix-xu-16a153196/"><img src="https://avatars.githubusercontent.com/u/61252303?v=4?s=100" width="100px;" alt="Felix Xu"/><br /><sub><b>Felix Xu</b></sub></a><br /><a href="#tutorial-FelixXu35" title="Tutorials">✅</a> <a href="https://github.com/tencent-quantum-lab/tensorcircuit/commits?author=FelixXu35" title="Code">💻</a> <a href="https://github.com/tencent-quantum-lab/tensorcircuit/commits?author=FelixXu35" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://scholar.harvard.edu/hongyehu/home"><img src="https://avatars.githubusercontent.com/u/50563225?v=4?s=100" width="100px;" alt="Hong-Ye Hu"/><br /><sub><b>Hong-Ye Hu</b></sub></a><br /><a href="https://github.com/tencent-quantum-lab/tensorcircuit/commits?author=hongyehu" title="Documentation">📖</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://github.com/PeilinZHENG"><img src="https://avatars.githubusercontent.com/u/45784888?v=4?s=100" width="100px;" alt="peilin"/><br /><sub><b>peilin</b></sub></a><br /><a href="#tutorial-PeilinZHENG" title="Tutorials">✅</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://github.com/PeilinZHENG"><img src="https://avatars.githubusercontent.com/u/45784888?v=4?s=100" width="100px;" alt="peilin"/><br /><sub><b>peilin</b></sub></a><br /><a href="#tutorial-PeilinZHENG" title="Tutorials">✅</a> <a href="https://github.com/tencent-quantum-lab/tensorcircuit/commits?author=PeilinZHENG" title="Code">💻</a> <a href="https://github.com/tencent-quantum-lab/tensorcircuit/commits?author=PeilinZHENG" title="Tests">⚠️</a> <a href="https://github.com/tencent-quantum-lab/tensorcircuit/commits?author=PeilinZHENG" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 4 additions & 0 deletions docs/source/api/applications.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
tensorcircuit.applications
================================================================================
.. toctree::
applications/ai.rst
applications/dqas.rst
applications/finance.rst
applications/graphdata.rst
applications/layers.rst
applications/optimization.rst
applications/physics.rst
applications/utils.rst
applications/vags.rst
applications/van.rst
Expand Down
4 changes: 4 additions & 0 deletions docs/source/api/applications/ai.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tensorcircuit.applications.ai
================================================================================
.. toctree::

4 changes: 4 additions & 0 deletions docs/source/api/applications/finance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tensorcircuit.applications.finance
================================================================================
.. toctree::
finance/portfolio.rst
7 changes: 7 additions & 0 deletions docs/source/api/applications/finance/portfolio.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorcircuit.applications.finance.portfolio
================================================================================
.. automodule:: tensorcircuit.applications.finance.portfolio
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
7 changes: 7 additions & 0 deletions docs/source/api/applications/optimization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorcircuit.applications.optimization
================================================================================
.. automodule:: tensorcircuit.applications.optimization
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/source/api/applications/physics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tensorcircuit.applications.physics
================================================================================
.. toctree::
physics/baseline.rst
physics/fss.rst
7 changes: 7 additions & 0 deletions docs/source/api/applications/physics/baseline.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorcircuit.applications.physics.baseline
================================================================================
.. automodule:: tensorcircuit.applications.physics.baseline
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
7 changes: 7 additions & 0 deletions docs/source/api/applications/physics/fss.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorcircuit.applications.physics.fss
================================================================================
.. automodule:: tensorcircuit.applications.physics.fss
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
7 changes: 7 additions & 0 deletions docs/source/api/shadows.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorcircuit.shadows
================================================================================
.. automodule:: tensorcircuit.shadows
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
2 changes: 2 additions & 0 deletions docs/source/api/templates.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
tensorcircuit.templates
================================================================================
.. toctree::
templates/ansatz.rst
templates/blocks.rst
templates/chems.rst
templates/conversions.rst
templates/dataset.rst
templates/ensemble.rst
templates/graphs.rst
Expand Down
7 changes: 7 additions & 0 deletions docs/source/api/templates/ansatz.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorcircuit.templates.ansatz
================================================================================
.. automodule:: tensorcircuit.templates.ansatz
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
7 changes: 7 additions & 0 deletions docs/source/api/templates/conversions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorcircuit.templates.conversions
================================================================================
.. automodule:: tensorcircuit.templates.conversions
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
1 change: 1 addition & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tensorcircuit
./api/noisemodel.rst
./api/quantum.rst
./api/results.rst
./api/shadows.rst
./api/simplify.rst
./api/templates.rst
./api/torchnn.rst
Expand Down
4 changes: 3 additions & 1 deletion tensorcircuit/shadows.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""
Classical Shadows functions
Classical shadows functions
"""

from typing import Any, Union, Optional, Sequence, Tuple, List
from string import ascii_letters as ABC

import numpy as np

from .cons import backend, dtypestr, rdtypestr
Expand Down

0 comments on commit 12d67fb

Please sign in to comment.