Skip to content

Commit 7986f75

Browse files
authored
Update __init__.py
update __init__ to deal with the metadata
1 parent 0b997d7 commit 7986f75

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

vqls_prototype/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,23 @@
1616
=======================================
1717
"""
1818

19+
"""Template project."""
20+
21+
from importlib_metadata import version as metadata_version, PackageNotFoundError
22+
23+
from .template_module import TemplateClass
24+
1925
from .vqls import VQLS, VQLSLog
2026
from .hadamard_test import HadammardTest, HadammardOverlapTest
2127
from .matrix_decomposition import SymmetricDecomposition, PauliDecomposition
2228

29+
30+
try:
31+
__version__ = metadata_version("vqls_template")
32+
except PackageNotFoundError: # pragma: no cover
33+
# package is not installed
34+
pass
35+
2336
__all__ = [
2437
"VQLS",
2538
"VQLSLog",

0 commit comments

Comments
 (0)