main > main: nb - added seed for repeatability, corrected spectral bound
This commit is contained in:
parent
1d5f8b6b5f
commit
84c966d1ab
@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 12,
|
"execution_count": 16,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@ -37,12 +37,13 @@
|
|||||||
"os.chdir(os.path.dirname(_dh[0]));\n",
|
"os.chdir(os.path.dirname(_dh[0]));\n",
|
||||||
"sys.path.insert(0, os.getcwd());\n",
|
"sys.path.insert(0, os.getcwd());\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from src.examples_dilations import *;"
|
"from src.examples_dilations import *;\n",
|
||||||
|
"np.random.seed(7098123); # for repeatability"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 13,
|
"execution_count": 17,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@ -63,7 +64,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 14,
|
"execution_count": 18,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -75,10 +76,10 @@
|
|||||||
"\n",
|
"\n",
|
||||||
" i spec bound of A_i A_i dissipative (<==> T_i contractive)?\n",
|
" i spec bound of A_i A_i dissipative (<==> T_i contractive)?\n",
|
||||||
"--- ------------------- -----------------------------------------\n",
|
"--- ------------------- -----------------------------------------\n",
|
||||||
" 1 -0.465478 True\n",
|
" 1 -1.000000 True\n",
|
||||||
" 2 -0.465478 True\n",
|
" 2 -1.000000 True\n",
|
||||||
" 3 -0.465478 True\n",
|
" 3 -1.000000 True\n",
|
||||||
" 4 -0.465478 True\n"
|
" 4 -1.000000 True\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -98,7 +99,7 @@
|
|||||||
"for i, A_i in enumerate(A):\n",
|
"for i, A_i in enumerate(A):\n",
|
||||||
" omega_Re = spec_bounds((1/2)*(A_i + A_i.T.conj()));\n",
|
" omega_Re = spec_bounds((1/2)*(A_i + A_i.T.conj()));\n",
|
||||||
" omega = spec_bounds(A_i);\n",
|
" omega = spec_bounds(A_i);\n",
|
||||||
" data.append((i+1, omega_Re, True if (omega_Re <= 0) else False));\n",
|
" data.append((i+1, omega, True if (omega_Re <= 0) else False));\n",
|
||||||
"\n",
|
"\n",
|
||||||
"repr = tabulate(\n",
|
"repr = tabulate(\n",
|
||||||
" tabular_data = data,\n",
|
" tabular_data = data,\n",
|
||||||
@ -113,7 +114,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 15,
|
"execution_count": 19,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -130,17 +131,17 @@
|
|||||||
" [2] 0.465478 True\n",
|
" [2] 0.465478 True\n",
|
||||||
" [1] 0.465478 True\n",
|
" [1] 0.465478 True\n",
|
||||||
" [0] 0.465478 True\n",
|
" [0] 0.465478 True\n",
|
||||||
" [2, 3] 0.212675 True\n",
|
" [2, 3] 0.207789 True\n",
|
||||||
" [1, 3] 0.183738 True\n",
|
" [1, 3] 0.179513 True\n",
|
||||||
" [1, 2] 0.217453 True\n",
|
" [1, 2] 0.179239 True\n",
|
||||||
" [0, 3] 0.200206 True\n",
|
" [0, 3] 0.315586 True\n",
|
||||||
" [0, 2] 0.301332 True\n",
|
" [0, 2] 0.205222 True\n",
|
||||||
" [0, 1] 0.215681 True\n",
|
" [0, 1] 0.327619 True\n",
|
||||||
" [1, 2, 3] 0.058427 True\n",
|
" [1, 2, 3] 0.049226 True\n",
|
||||||
" [0, 2, 3] 0.075037 True\n",
|
" [0, 2, 3] 0.088339 True\n",
|
||||||
" [0, 1, 3] 0.056030 True\n",
|
" [0, 1, 3] 0.098730 True\n",
|
||||||
" [0, 1, 2] 0.077350 True\n",
|
" [0, 1, 2] 0.081731 True\n",
|
||||||
"[0, 1, 2, 3] -0.082403 False\n"
|
"[0, 1, 2, 3] -0.133914 False\n"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -148,12 +149,11 @@
|
|||||||
"# compute the dissipation operators `S_TK` for each `K ⊆ {1,2,...,d}``:\n",
|
"# compute the dissipation operators `S_TK` for each `K ⊆ {1,2,...,d}``:\n",
|
||||||
"S, beta_T = dissipation_operators(shape=[N, N], A=A);\n",
|
"S, beta_T = dissipation_operators(shape=[N, N], A=A);\n",
|
||||||
"\n",
|
"\n",
|
||||||
"data = [];\n",
|
|
||||||
"for K, S_TK, b in sorted(S, key=lambda x: len(x[0])):\n",
|
|
||||||
" data.append((K, b, True if b >= -MACHINE_EPS else False))\n",
|
|
||||||
"\n",
|
|
||||||
"repr = tabulate(\n",
|
"repr = tabulate(\n",
|
||||||
" tabular_data = data,\n",
|
" tabular_data = [\n",
|
||||||
|
" (K, b, True if b >= -MACHINE_EPS else False)\n",
|
||||||
|
" for K, S_TK, b in sorted(S, key=lambda x: len(x[0]))\n",
|
||||||
|
" ],\n",
|
||||||
" headers = ['K', 'min σ(S_{T,K})', 'S_{T,K} >= 0?'],\n",
|
" headers = ['K', 'min σ(S_{T,K})', 'S_{T,K} >= 0?'],\n",
|
||||||
" showindex = False,\n",
|
" showindex = False,\n",
|
||||||
" floatfmt = '.6f',\n",
|
" floatfmt = '.6f',\n",
|
||||||
@ -165,7 +165,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 16,
|
"execution_count": 20,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
@ -173,7 +173,7 @@
|
|||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"\n",
|
"\n",
|
||||||
"β_T = min_K min σ(S_{T,K}) = -0.082403\n",
|
"β_T = min_K min σ(S_{T,K}) = -0.133914\n",
|
||||||
"⟹ T is not compeletely dissipative.\n",
|
"⟹ T is not compeletely dissipative.\n",
|
||||||
"⟹ (by Thm 1.1) T does not have a regular unitary dilation.\n"
|
"⟹ (by Thm 1.1) T does not have a regular unitary dilation.\n"
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user