python-qis 1.2.0__py3-none-any.whl → 1.2.2__py3-none-any.whl

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/__init__.py CHANGED
@@ -2,8 +2,16 @@ import python_qis.math.general as general_math
2
2
  import python_qis.math.qis as qis_math
3
3
  import python_qis.cryptography_tools as cryptography_tools
4
4
  import python_qis.physics_tools as physics_tools
5
+ from typing import Literal
5
6
 
6
- physics_constants: dict[str, complex | float] = {
7
+ physics_constants: dict[
8
+ Literal[
9
+ "H_JOULE_SEC",
10
+ "HBAR_JOULE_SEC",
11
+ "BOLTZMANN_CONSTANT",
12
+ "SPEED_OF_LIGHT",
13
+ "ELEMENTARY_CHARGE"
14
+ ], complex | float] = {
7
15
  "H_JOULE_SEC": physics_tools.H_JOULE_SEC,
8
16
  "HBAR_JOULE_SEC": physics_tools.HBAR_JOULE_SEC,
9
17
  "BOLTZMANN_CONSTANT": physics_tools.BOLTZMANN_CONSTANT,
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.3
2
+ Name: python-qis
3
+ Version: 1.2.2
4
+ Summary: QIS Library for Python. (QIS is Quantum Information Science)
5
+ Author: Vedansh Shetti
6
+ Author-email: Vedansh Shetti <vedansh.shetti@gmail.com>
7
+ Requires-Python: >=3.13
8
+ Description-Content-Type: text/markdown
9
+
10
+ # python-qis
11
+
12
+ Small Python utilities for mathematics, quantum information science, cryptography,
13
+ and introductory physics.
14
+
15
+ ## Requirements
16
+
17
+ - Python 3.13 or newer
18
+
19
+ ## Installation
20
+
21
+ Install the latest release from PyPI with pip:
22
+
23
+ ```bash
24
+ python -m pip install python-qis
25
+ ```
26
+
27
+ Or add it to a project managed with uv:
28
+
29
+ ```bash
30
+ uv add python-qis
31
+ ```
32
+
33
+ ## Quick start
34
+
35
+ ### Cryptography
36
+
37
+ Hash functions accept bytes and return hexadecimal strings:
38
+
39
+ ```python
40
+ from python_qis.cryptography_tools import blake2, sha3
41
+
42
+ message = b"hello, QIS world"
43
+
44
+ print(blake2("b", message))
45
+ print(sha3("256", message))
46
+ ```
47
+
48
+ ### Math and quantum states
49
+
50
+ ```python
51
+ from python_qis import general_math, qis_math
52
+
53
+ print(general_math.add(2, 3, 5))
54
+ print(general_math.pi(12))
55
+
56
+ state = qis_math.buildVector(1 / 2**0.5, 1 / 2**0.5)
57
+ print(qis_math.is_normalized([value[0] for value in state]))
58
+ ```
59
+
60
+ ### Physics constants and standard states
61
+
62
+ ```python
63
+ from python_qis import physics_constants
64
+ from python_qis.physics_tools import BELL_PHI_PLUS, KET_0, KET_1, KET_PLUS
65
+
66
+ print(physics_constants["SPEED_OF_LIGHT"])
67
+ print(KET_0, KET_1, KET_PLUS, BELL_PHI_PLUS)
68
+ ```
69
+
70
+ ## What's included?
71
+
72
+ - **Math utilities:** arithmetic helpers, factorials, and decimal digits of pi.
73
+ - **Quantum information utilities:** vector construction and normalization checks.
74
+ - **Cryptography utilities:** BLAKE2 and SHA-3 hashing through Python's standard library.
75
+ - **Physics utilities:** selected SI constants and common qubit states.
76
+
77
+ ## Development
78
+
79
+ Clone the repository and install it in an editable environment:
80
+
81
+ ```bash
82
+ git clone https://github.com/VedanshShetti/python-qis.git
83
+ cd python-qis
84
+ uv sync
85
+ ```
86
+
87
+ Build the package with:
88
+
89
+ ```bash
90
+ uv build
91
+ ```
92
+
93
+ ## License
94
+
95
+ This project is licensed under the terms in [LICENSE](LICENSE).
@@ -1,9 +1,9 @@
1
- python_qis/__init__.py,sha256=-2bg7g6vj-SqiD4Qy_TqFhKtuf9lngc-FoQMkWwTQ4s,621
1
+ python_qis/__init__.py,sha256=BPxugAwyM1KJ010icBDDWbYuEgl8HGRzNEofqL_TXmw,798
2
2
  python_qis/cryptography_tools.py,sha256=U9vbSUlMn2k3akBoAjKScSbxONKgHs2B-n7mstkXNyY,906
3
3
  python_qis/math/general.py,sha256=NZ2i61-hhdxlCiMNRya4uiquOu8_B2gI34wK_YE0lQA,935
4
4
  python_qis/math/qis.py,sha256=c6oe6rZu7QLUbtqIwOyvtD9iCQzPfx5c-uB5RmIAvDA,458
5
5
  python_qis/physics_tools.py,sha256=Ppn-4jeKnVK6jeUsBN8LqfgMxslyWejU34xahKR2YlA,573
6
- python_qis-1.2.0.dist-info/WHEEL,sha256=e4_1dyBeezi8ZjfxrZ3bnVOxFDa3ksqVqH0jTHkUZ3k,81
7
- python_qis-1.2.0.dist-info/entry_points.txt,sha256=tO8KsHFOz33Oz2P-SZBgnOmVierN2POmZ4E-It1dBXY,48
8
- python_qis-1.2.0.dist-info/METADATA,sha256=tq1Wq-yHqcLopY99dlqPCPWeU7GkydAIEl8uLGrLYYY,678
9
- python_qis-1.2.0.dist-info/RECORD,,
6
+ python_qis-1.2.2.dist-info/WHEEL,sha256=e4_1dyBeezi8ZjfxrZ3bnVOxFDa3ksqVqH0jTHkUZ3k,81
7
+ python_qis-1.2.2.dist-info/entry_points.txt,sha256=tO8KsHFOz33Oz2P-SZBgnOmVierN2POmZ4E-It1dBXY,48
8
+ python_qis-1.2.2.dist-info/METADATA,sha256=UJhrllwiVwBoR28lRsPbVBR1VgQdtX2pIoDzv7uGDJs,2128
9
+ python_qis-1.2.2.dist-info/RECORD,,
@@ -1,21 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: python-qis
3
- Version: 1.2.0
4
- Summary: QIS Library for Python. (QIS is Quantum Information Science)
5
- Author: Vedansh Shetti
6
- Author-email: Vedansh Shetti <vedansh.shetti@gmail.com>
7
- Requires-Python: >=3.13
8
- Description-Content-Type: text/markdown
9
-
10
- # python-qis
11
- QIS Library for Python. (QIS is Quantum Information Science)
12
-
13
- ## What do I get?
14
- - Math Utilities
15
- - Cryptography Utilities (SHA, SHA_3, BLAKE, MD5 and such)
16
- - Basic Physics Utilities (I'm working on this, please don't get mad if I mess up something here, we just started 7th grade, Physics is new to me)
17
-
18
- ## Installation
19
- `pip install python-qis`
20
- OR if using `uv`:
21
- `uv install python-qis`