qpyd 0.1.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.
qpyd-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Stefanos Vasileiadis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
qpyd-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.4
2
+ Name: qpyd
3
+ Version: 0.1.0
4
+ Summary: A high-performance Python simulation framework for calculating charge transport in single quantum dot systems.
5
+ Author-email: Stefanos Vasileiadis <stefanosvas2@gmail.com>
6
+ License: MIT
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: numpy>=1.24.0
11
+ Requires-Dist: sympy>=1.12
12
+ Requires-Dist: jax>=0.4.13
13
+ Requires-Dist: jaxlib>=0.4.13
14
+ Requires-Dist: matplotlib>=3.7.0
15
+ Provides-Extra: dev
16
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
17
+ Requires-Dist: mkdocs-material>=9.0.0; extra == "dev"
18
+ Dynamic: license-file
19
+
20
+ # QPyD โ€” Sequential Electron Transport Simulator for Quantum Dots
21
+
22
+ ![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)
23
+ ![JAX](https://img.shields.io/badge/JAX-Accelerated-FF6F00.svg)
24
+ ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
25
+
26
+ **QPyD** (imported as `qpyd`) is an open-source Python framework for simulating sequential electron transport in quantum dot devices.
27
+
28
+ `qpyd` uses a steady-state rate equation (Pauli Master equation) approach to model sequential electron tunneling. Built on **JAX**, it utilizes XLA compilation and hardware-accelerated vectorization to process high-resolution Coulomb diamond stability diagrams instantly.
29
+
30
+ ## ๐Ÿš€ Features
31
+
32
+ * **Microscopic ED Engine (`DerivedParameters`):** Automatically constructs many-body Hamiltonians using Exact Diagonalization. Fully supports single-particle orbitals, intra/inter-orbital Coulomb interactions, exchange/pair-hopping, and Zeeman splitting.
33
+ * **Macroscopic Phenomenological Engine (`DirectParameters`):** Bypass microscopic Hamiltonian setup to manually enforce arbitrary many-body state energies, spin labels, and transition spin degeneracies.
34
+ * **JAX Backend:** The core Master equation solver uses `@jax.jit` and `jax.vmap` to solve steady-state probabilities across 2D voltage meshes.
35
+ * **Memory-Safe Execution:** A hybrid chunking algorithm streams data directly to the CPU host, bypassing GPU VRAM bottlenecks on high-resolution grids.
36
+
37
+ ## โš™๏ธ Installation
38
+
39
+ It is recommended to install this package in "editable" mode so that the `qpyd` module can be imported from anywhere on your system.
40
+
41
+ ```bash
42
+ git clone https://github.com/stefv01/qpyd.git
43
+ cd qpyd
44
+ pip install -e .
45
+ ```
46
+
47
+ ## โšก Quick Start
48
+
49
+ The package uses a factory pattern. Define your system parameters, pass them to Simulator(), and let the JAX backend handle the rest.
50
+
51
+ ```Python
52
+ import numpy as np
53
+ from qpyd import DerivedParameters, Simulator, Plotter
54
+
55
+ # 1. Configure a 2-orbital quantum dot system
56
+ params = DerivedParameters(
57
+ charge_numbers=[2, 3],
58
+ orbital_energies=[1.0, 2.0],
59
+ T=0.4,
60
+ slopes=[1.0, 1.0],
61
+ U=0.5 * np.ones(2), # Intra-orbital Coulomb
62
+ V=np.array([[0.0, 0.2], # Inter-orbital Coulomb
63
+ [0.2, 0.0]]),
64
+ J=0.0, Jp=0.0, B=[0.0, 0.0, 0.0], # Exchange, Pair-hopping, Mag. field
65
+ gammas=[[1.0, 1.0], [1.0, 1.0]],
66
+ setup="ground_R"
67
+ )
68
+
69
+ # 2. Solve the Master Equation
70
+ sim = Simulator(params)
71
+ sim.solve()
72
+ results = sim.get_results()
73
+
74
+ # 3. Visualize the Coulomb Diamonds
75
+ plotter = Plotter()
76
+ extent = [params.Vgmin, params.Vgmax, params.Vbmin, params.Vbmax]
77
+ plotter.plot_heatmap(results['N_avg'], extent, title="Average Occupation")
78
+ ```
79
+
80
+ ## ๐Ÿ“š Documentation & Tutorials
81
+
82
+ Interested in learning more about how QPyD works? Please check the documentation:
83
+
84
+ * [Getting Started](docs/getting_started.md)
85
+ * [Theoretical Description](docs/theoretical_description.md)
86
+ * [API Reference & Parameter Mapping](docs/api_reference.md)
87
+ * [Interactive Tutorials (Jupyter Notebooks)](tutorials/)
88
+
89
+ ## ๐ŸŽ“ Acknowledgements
90
+
91
+ This project is an extension of my MSc thesis project *"Electronic Transport Analysis of Atomically Precise Armchair Graphene Nanoribbons"* at TU Delft, under the supervision of Herre S.J. van der Zant and Yongqing Yang. Special thanks to Jaime Ferrer (Universidad de Oviedo). His analytical calculations for Armchair Graphene Nanoribbons guided and inspired the development of the generalized Quantum Dot Hamiltonian implemented in this simulator.
92
+
93
+ *Note: Users interested in alternate perturbative transport methods are highly encouraged to refer to the open-source QmeQ package (Kirลกanskas et al., 2017).*
94
+
95
+ ## ๐Ÿ“„ License
96
+
97
+ This project is licensed under the MIT License.
qpyd-0.1.0/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # QPyD โ€” Sequential Electron Transport Simulator for Quantum Dots
2
+
3
+ ![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)
4
+ ![JAX](https://img.shields.io/badge/JAX-Accelerated-FF6F00.svg)
5
+ ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
6
+
7
+ **QPyD** (imported as `qpyd`) is an open-source Python framework for simulating sequential electron transport in quantum dot devices.
8
+
9
+ `qpyd` uses a steady-state rate equation (Pauli Master equation) approach to model sequential electron tunneling. Built on **JAX**, it utilizes XLA compilation and hardware-accelerated vectorization to process high-resolution Coulomb diamond stability diagrams instantly.
10
+
11
+ ## ๐Ÿš€ Features
12
+
13
+ * **Microscopic ED Engine (`DerivedParameters`):** Automatically constructs many-body Hamiltonians using Exact Diagonalization. Fully supports single-particle orbitals, intra/inter-orbital Coulomb interactions, exchange/pair-hopping, and Zeeman splitting.
14
+ * **Macroscopic Phenomenological Engine (`DirectParameters`):** Bypass microscopic Hamiltonian setup to manually enforce arbitrary many-body state energies, spin labels, and transition spin degeneracies.
15
+ * **JAX Backend:** The core Master equation solver uses `@jax.jit` and `jax.vmap` to solve steady-state probabilities across 2D voltage meshes.
16
+ * **Memory-Safe Execution:** A hybrid chunking algorithm streams data directly to the CPU host, bypassing GPU VRAM bottlenecks on high-resolution grids.
17
+
18
+ ## โš™๏ธ Installation
19
+
20
+ It is recommended to install this package in "editable" mode so that the `qpyd` module can be imported from anywhere on your system.
21
+
22
+ ```bash
23
+ git clone https://github.com/stefv01/qpyd.git
24
+ cd qpyd
25
+ pip install -e .
26
+ ```
27
+
28
+ ## โšก Quick Start
29
+
30
+ The package uses a factory pattern. Define your system parameters, pass them to Simulator(), and let the JAX backend handle the rest.
31
+
32
+ ```Python
33
+ import numpy as np
34
+ from qpyd import DerivedParameters, Simulator, Plotter
35
+
36
+ # 1. Configure a 2-orbital quantum dot system
37
+ params = DerivedParameters(
38
+ charge_numbers=[2, 3],
39
+ orbital_energies=[1.0, 2.0],
40
+ T=0.4,
41
+ slopes=[1.0, 1.0],
42
+ U=0.5 * np.ones(2), # Intra-orbital Coulomb
43
+ V=np.array([[0.0, 0.2], # Inter-orbital Coulomb
44
+ [0.2, 0.0]]),
45
+ J=0.0, Jp=0.0, B=[0.0, 0.0, 0.0], # Exchange, Pair-hopping, Mag. field
46
+ gammas=[[1.0, 1.0], [1.0, 1.0]],
47
+ setup="ground_R"
48
+ )
49
+
50
+ # 2. Solve the Master Equation
51
+ sim = Simulator(params)
52
+ sim.solve()
53
+ results = sim.get_results()
54
+
55
+ # 3. Visualize the Coulomb Diamonds
56
+ plotter = Plotter()
57
+ extent = [params.Vgmin, params.Vgmax, params.Vbmin, params.Vbmax]
58
+ plotter.plot_heatmap(results['N_avg'], extent, title="Average Occupation")
59
+ ```
60
+
61
+ ## ๐Ÿ“š Documentation & Tutorials
62
+
63
+ Interested in learning more about how QPyD works? Please check the documentation:
64
+
65
+ * [Getting Started](docs/getting_started.md)
66
+ * [Theoretical Description](docs/theoretical_description.md)
67
+ * [API Reference & Parameter Mapping](docs/api_reference.md)
68
+ * [Interactive Tutorials (Jupyter Notebooks)](tutorials/)
69
+
70
+ ## ๐ŸŽ“ Acknowledgements
71
+
72
+ This project is an extension of my MSc thesis project *"Electronic Transport Analysis of Atomically Precise Armchair Graphene Nanoribbons"* at TU Delft, under the supervision of Herre S.J. van der Zant and Yongqing Yang. Special thanks to Jaime Ferrer (Universidad de Oviedo). His analytical calculations for Armchair Graphene Nanoribbons guided and inspired the development of the generalized Quantum Dot Hamiltonian implemented in this simulator.
73
+
74
+ *Note: Users interested in alternate perturbative transport methods are highly encouraged to refer to the open-source QmeQ package (Kirลกanskas et al., 2017).*
75
+
76
+ ## ๐Ÿ“„ License
77
+
78
+ This project is licensed under the MIT License.
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "qpyd"
7
+ version = "0.1.0"
8
+ description = "A high-performance Python simulation framework for calculating charge transport in single quantum dot systems."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Stefanos Vasileiadis", email = "stefanosvas2@gmail.com"}
14
+ ]
15
+ dependencies = [
16
+ "numpy>=1.24.0",
17
+ "sympy>=1.12",
18
+ "jax>=0.4.13",
19
+ "jaxlib>=0.4.13",
20
+ "matplotlib>=3.7.0"
21
+ ]
22
+
23
+ [project.optional-dependencies]
24
+ dev = [
25
+ "pytest>=7.0.0",
26
+ "mkdocs-material>=9.0.0"
27
+ ]
28
+
29
+ [tool.setuptools]
30
+ package-dir = {"" = "src"}
31
+ packages = ["qpyd"]
qpyd-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,28 @@
1
+ # Parameter Classes
2
+ from .parameters import (
3
+ BaseParameters,
4
+ DirectParameters,
5
+ DerivedParameters
6
+ )
7
+
8
+ # Simulator Engines & Factory
9
+ from .simulator import (
10
+ SimulatorBase,
11
+ DirectSimulator,
12
+ DerivedSimulator,
13
+ Simulator
14
+ )
15
+
16
+ # Plotting Utilities
17
+ from .plotter import Plotter
18
+
19
+ __all__ = [
20
+ "BaseParameters",
21
+ "DirectParameters",
22
+ "DerivedParameters",
23
+ "SimulatorBase",
24
+ "DirectSimulator",
25
+ "DerivedSimulator",
26
+ "Simulator",
27
+ "Plotter"
28
+ ]
@@ -0,0 +1,28 @@
1
+ import numpy as np
2
+ from typing import TypedDict
3
+
4
+
5
+ class StateProperties(TypedDict):
6
+ """
7
+ Dictionary structure containing the physical properties of a computed eigenstate.
8
+
9
+ Attributes
10
+ ----------
11
+ eigenstate : str
12
+ A rigidly ordered string representation of the many-body state.
13
+ single_particle_kets : list of tuple of (float or complex, str, np.ndarray)
14
+ A list of tuples representing the constituent many-body states expressed
15
+ in the single-particle basis. Each tuple is formatted as
16
+ `(amplitude, ket_string, ket_array)`.
17
+ energy : float
18
+ The calculated eigenenergy of the state.
19
+ S : float
20
+ The total spin quantum number.
21
+ Sz : float
22
+ The total spin projection quantum number.
23
+ """
24
+ eigenstate: str
25
+ single_particle_kets: list[tuple[float | complex, str, np.ndarray]]
26
+ energy: float
27
+ S: float
28
+ Sz: float