python-qis 1.1.0__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_qis-1.1.0 → python_qis-1.2.0}/PKG-INFO +1 -1
- {python_qis-1.1.0 → python_qis-1.2.0}/pyproject.toml +1 -1
- {python_qis-1.1.0 → python_qis-1.2.0}/pyproject.toml.orig +1 -1
- {python_qis-1.1.0 → python_qis-1.2.0}/src/python_qis/__init__.py +3 -3
- python_qis-1.1.0/src/python_qis/math_tools.py → python_qis-1.2.0/src/python_qis/math/general.py +0 -8
- python_qis-1.2.0/src/python_qis/math/qis.py +16 -0
- {python_qis-1.1.0 → python_qis-1.2.0}/src/python_qis/physics_tools.py +1 -6
- {python_qis-1.1.0 → python_qis-1.2.0}/README.md +0 -0
- {python_qis-1.1.0 → python_qis-1.2.0}/src/python_qis/cryptography_tools.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import python_qis.
|
|
1
|
+
import python_qis.math.general as general_math
|
|
2
|
+
import python_qis.math.qis as qis_math
|
|
2
3
|
import python_qis.cryptography_tools as cryptography_tools
|
|
3
4
|
import python_qis.physics_tools as physics_tools
|
|
4
5
|
|
|
5
|
-
maths = math_tools
|
|
6
6
|
physics_constants: dict[str, complex | float] = {
|
|
7
7
|
"H_JOULE_SEC": physics_tools.H_JOULE_SEC,
|
|
8
8
|
"HBAR_JOULE_SEC": physics_tools.HBAR_JOULE_SEC,
|
|
@@ -11,4 +11,4 @@ physics_constants: dict[str, complex | float] = {
|
|
|
11
11
|
"ELEMENTARY_CHARGE": physics_tools.ELEMENTARY_CHARGE
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
__all__ = ["
|
|
14
|
+
__all__ = ["qis_math", "general_math", "cryptography_tools", "physics_constants"] # Export Everything Here
|
python_qis-1.1.0/src/python_qis/math_tools.py → python_qis-1.2.0/src/python_qis/math/general.py
RENAMED
|
@@ -24,11 +24,3 @@ def factorial(n: int) -> int:
|
|
|
24
24
|
else: return 1
|
|
25
25
|
def pi(digits: int) -> Decimal: return Decimal(pi_string[0 : len(pi_string) if digits >= len(pi_string) else digits])
|
|
26
26
|
|
|
27
|
-
def is_normalized(vector: list[complex])-> bool:
|
|
28
|
-
absList: list[complex] = []
|
|
29
|
-
for i in vector:
|
|
30
|
-
absList.append(abs(0 - i))
|
|
31
|
-
total = 0
|
|
32
|
-
for i in absList:
|
|
33
|
-
total+= exponentiation(i, 2)
|
|
34
|
-
return True if abs(total - 1.0) < 1e-9 else False
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from .general import exponentiation
|
|
2
|
+
|
|
3
|
+
def is_normalized(vector: list[complex])-> bool:
|
|
4
|
+
absList: list[complex] = []
|
|
5
|
+
for i in vector:
|
|
6
|
+
absList.append(abs(0 - i))
|
|
7
|
+
total = 0
|
|
8
|
+
for i in absList:
|
|
9
|
+
total+= exponentiation(i, 2)
|
|
10
|
+
return True if abs(total - 1.0) < 1e-9 else False
|
|
11
|
+
|
|
12
|
+
def buildVector(*args: complex)-> list[list[complex]]:
|
|
13
|
+
v: list[list[complex]] = []
|
|
14
|
+
for i in args:
|
|
15
|
+
v.append([i])
|
|
16
|
+
return v
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import math
|
|
2
|
-
|
|
3
|
-
def buildVector(*args: complex)-> list[list[complex]]:
|
|
4
|
-
v: list[list[complex]] = []
|
|
5
|
-
for i in args:
|
|
6
|
-
v.append([i])
|
|
7
|
-
return v
|
|
2
|
+
from .math.qis import buildVector
|
|
8
3
|
|
|
9
4
|
# Fundamental Constants (SI Units)
|
|
10
5
|
H_JOULE_SEC = 6.62607015e-34 # Planck constant
|
|
File without changes
|
|
File without changes
|