|
4 | 4 | "cell_type": "markdown", |
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | | - "# Quark Orbital ZBW DP Mixing Fractions (Up Quark + N_k Sensitivity)\n\n", |
8 | | - "This notebook reproduces the quark orbital ZBW composition (~74% qDP) for up quark (N_k=1) and shows N_k dependence." |
| 7 | + "# Lepton Orbital ZBW DP Mixing Fractions (Muon Example)\n\n", |
| 8 | + "This notebook reproduces the lepton orbital ZBW composition (~68.5% eDP, 13% qDP, 18.5% hDP) for muon-like cages (N_k=4)." |
9 | 9 | ] |
10 | 10 | }, |
11 | 11 | { |
|
17 | 17 | }, |
18 | 18 | { |
19 | 19 | "cell_type": "code", |
| 20 | + "execution_count": null, |
20 | 21 | "metadata": {}, |
| 22 | + "outputs": [], |
21 | 23 | "source": [ |
22 | 24 | "import numpy as np\n", |
23 | 25 | "import matplotlib.pyplot as plt\n", |
24 | 26 | "from scipy.optimize import minimize\n\n", |
25 | | - "phi = (1 + np.sqrt(5)) / 2\n", |
| 27 | + "phi = (1 + np.sqrt(5)) / 2 # ≈1.618\n", |
26 | 28 | "base_gradient = 1.0\n", |
27 | 29 | "gradients = {\n", |
28 | | - " 'qDP': (phi - 1) * base_gradient, # favorable for quarks\n", |
| 30 | + " 'eDP': (phi - 1) * base_gradient, # Favorable for leptons\n", |
29 | 31 | " 'hDP': base_gradient,\n", |
30 | | - " 'eDP': phi * base_gradient # least favorable\n", |
31 | | - "}" |
32 | | - ], |
33 | | - "execution_count": null, |
34 | | - "outputs": [] |
| 32 | + " 'qDP': phi * base_gradient\n", |
| 33 | + "}\n\n", |
| 34 | + "N_k = 4 # muon tetra cage\n", |
| 35 | + "T = N_k # thermal scale T ∝ N_k (normalized)" |
| 36 | + ] |
35 | 37 | }, |
36 | 38 | { |
37 | 39 | "cell_type": "markdown", |
38 | 40 | "metadata": {}, |
39 | 41 | "source": [ |
40 | | - "## 2. Function Definitions (same as lepton notebook)" |
| 42 | + "## 2. Energy Function" |
41 | 43 | ] |
42 | 44 | }, |
43 | 45 | { |
44 | 46 | "cell_type": "code", |
| 47 | + "execution_count": null, |
45 | 48 | "metadata": {}, |
| 49 | + "outputs": [], |
46 | 50 | "source": [ |
47 | 51 | "def energy(f):\n", |
48 | | - " f_q, f_h, f_e = f\n", |
49 | | - " E = f_q * gradients['qDP'] + f_h * gradients['hDP'] + f_e * gradients['eDP']\n", |
50 | | - " return E\n\n", |
| 52 | + " f_e, f_h, f_q = f\n", |
| 53 | + " E = f_e * gradients['eDP'] + f_h * gradients['hDP'] + f_q * gradients['qDP']\n", |
| 54 | + " return E # minimize total energy" |
| 55 | + ] |
| 56 | + }, |
| 57 | + { |
| 58 | + "cell_type": "markdown", |
| 59 | + "metadata": {}, |
| 60 | + "source": [ |
| 61 | + "## 3. Constraints and Bounds" |
| 62 | + ] |
| 63 | + }, |
| 64 | + { |
| 65 | + "cell_type": "code", |
| 66 | + "execution_count": null, |
| 67 | + "metadata": {}, |
| 68 | + "outputs": [], |
| 69 | + "source": [ |
51 | 70 | "cons = ({'type': 'eq', 'fun': lambda f: np.sum(f) - 1})\n", |
52 | 71 | "bounds = [(0, 1)] * 3" |
53 | | - ], |
54 | | - "execution_count": null, |
55 | | - "outputs": [] |
| 72 | + ] |
56 | 73 | }, |
57 | 74 | { |
58 | 75 | "cell_type": "markdown", |
59 | 76 | "metadata": {}, |
60 | 77 | "source": [ |
61 | | - "## 3. Single Calculation (Up Quark, N_k=1)" |
| 78 | + "## 4. Minimize Energy" |
62 | 79 | ] |
63 | 80 | }, |
64 | 81 | { |
65 | 82 | "cell_type": "code", |
| 83 | + "execution_count": null, |
66 | 84 | "metadata": {}, |
| 85 | + "outputs": [], |
67 | 86 | "source": [ |
68 | | - "N_k = 1\n", |
69 | | - "T = N_k\n", |
70 | 87 | "res = minimize(energy, [1/3, 1/3, 1/3], method='SLSQP', bounds=bounds, constraints=cons)\n", |
71 | | - "min_fractions = res.x\n", |
72 | | - "probs = np.exp(-np.array([gradients['qDP'], gradients['hDP'], gradients['eDP']]) / T)\n", |
73 | | - "probs /= np.sum(probs)\n", |
| 88 | + "min_fractions = res.x" |
| 89 | + ] |
| 90 | + }, |
| 91 | + { |
| 92 | + "cell_type": "markdown", |
| 93 | + "metadata": {}, |
| 94 | + "source": [ |
| 95 | + "## 5. Thermal Probabilities" |
| 96 | + ] |
| 97 | + }, |
| 98 | + { |
| 99 | + "cell_type": "code", |
| 100 | + "execution_count": null, |
| 101 | + "metadata": {}, |
| 102 | + "outputs": [], |
| 103 | + "source": [ |
| 104 | + "probs = np.exp(-np.array([gradients['eDP'], gradients['hDP'], gradients['qDP']]) / T)\n", |
| 105 | + "probs /= np.sum(probs)" |
| 106 | + ] |
| 107 | + }, |
| 108 | + { |
| 109 | + "cell_type": "markdown", |
| 110 | + "metadata": {}, |
| 111 | + "source": [ |
| 112 | + "## 6. Equilibrium Fractions (average min + thermal)" |
| 113 | + ] |
| 114 | + }, |
| 115 | + { |
| 116 | + "cell_type": "code", |
| 117 | + "execution_count": null, |
| 118 | + "metadata": {}, |
| 119 | + "outputs": [], |
| 120 | + "source": [ |
74 | 121 | "equil = 0.5 * min_fractions + 0.5 * probs\n", |
75 | 122 | "equil /= np.sum(equil)\n\n", |
76 | | - "print(\"Up quark (N_k=1) equilibrium fractions:\", equil)" |
77 | | - ], |
78 | | - "execution_count": null, |
79 | | - "outputs": [] |
| 123 | + "print(\"Optimized minimum fractions:\", min_fractions)\n", |
| 124 | + "print(\"Thermal probabilities:\", probs)\n", |
| 125 | + "print(\"Equilibrium fractions:\", equil)" |
| 126 | + ] |
80 | 127 | }, |
81 | 128 | { |
82 | 129 | "cell_type": "markdown", |
83 | 130 | "metadata": {}, |
84 | 131 | "source": [ |
85 | | - "## 4. N_k Sensitivity Sweep" |
| 132 | + "## 7. Visualization" |
86 | 133 | ] |
87 | 134 | }, |
88 | 135 | { |
89 | 136 | "cell_type": "code", |
| 137 | + "execution_count": null, |
90 | 138 | "metadata": {}, |
| 139 | + "outputs": [], |
91 | 140 | "source": [ |
92 | | - "N_k_values = [1, 4, 12, 20, 60, 30000] # up → top\n", |
93 | | - "qDP_fracs = []\n", |
94 | | - "for nk in N_k_values:\n", |
95 | | - " T = nk\n", |
96 | | - " probs = np.exp(-np.array([gradients['qDP'], gradients['hDP'], gradients['eDP']]) / T)\n", |
97 | | - " probs /= np.sum(probs)\n", |
98 | | - " # Simplified: use thermal only for sweep (min is always qDP-heavy)\n", |
99 | | - " qDP_fracs.append(probs[0])\n\n", |
100 | | - "plt.plot(N_k_values, qDP_fracs, marker='o')\n", |
101 | | - "plt.xscale('log')\n", |
102 | | - "plt.xlabel('N_k (cage occupancy)')\n", |
103 | | - "plt.ylabel('qDP fraction in orbital ZBW')\n", |
104 | | - "plt.title('Quark Orbital ZBW: qDP Dominance vs. Cage Size')\n", |
105 | | - "plt.grid(True, which=\"both\", ls=\"--\")\n", |
106 | | - "plt.savefig('../figures/sensitivity_plot.png')\n", |
| 141 | + "labels = ['eDP', 'hDP', 'qDP']\n", |
| 142 | + "plt.pie(equil, labels=labels, autopct='%1.1f%%', colors=['#1f77b4', '#ff7f0e', '#2ca02c'])\n", |
| 143 | + "plt.title('Lepton Orbital ZBW DP Composition (Muon, N_k=4)')\n", |
| 144 | + "plt.savefig('../figures/lepton_pie_chart.png')\n", |
107 | 145 | "plt.show()" |
108 | | - ], |
109 | | - "execution_count": null, |
110 | | - "outputs": [] |
| 146 | + ] |
111 | 147 | } |
112 | 148 | ], |
113 | 149 | "metadata": { |
|
0 commit comments