notebooks/docs/examples_dilations.ipynb

230 lines
7.1 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Examples - non-dilatable $d$-parameter $C_{0}$-semigroups #\n",
"\n",
"This notebook provides supplementary material to the research paper <https://doi.org/10.48550/arXiv.2210.02353>.\n",
"\n",
"In §5.3 a construction is given which yields for any $d \\geq 2$\n",
"a $d$-parameter $C_{0}$-semigroup, $T$ satisfying:\n",
"\n",
"- $T$ is contractive (equivalently its marginals $T_{i}$ are for each $i$);\n",
"- the generator $A_{i}$ of $T_{i}$ has strictly negative spectral bound for each $i$;\n",
"\n",
"and such that $T$ is __not__ **completely dissipative**.\n",
"Thus by the classification Theorem (Thm 1.1), $T$ does not have a regular unitary dilation.\n",
"\n",
"This Notebook demonstrates this general result empirically."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"import os;\n",
"import sys;\n",
"\n",
"# NOTE: need this to force jupyter to reload imports:\n",
"for key in list(sys.modules.keys()):\n",
" if key.startswith('src.'):\n",
" del sys.modules[key];\n",
"\n",
"os.chdir(os.path.dirname(_dh[0]));\n",
"sys.path.insert(0, os.getcwd());\n",
"\n",
"from src.examples_dilations import *;\n",
"np.random.seed(7098123); # for repeatability"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"# User input:\n",
"N = 4; # dimension of the Hilbert space.\n",
"d = 4;\n",
"\n",
"# If you ensure that the failure of S_{T,K} >= 0 only occurs for K = {1,2,...,d}\n",
"# + you want S_TK > 0 (strictly) for all K ≠ {1,2,...,d}:\n",
"alpha = 1/math.sqrt(d - 0.5);\n",
"\n",
"# If you ensure that the failure of S_{T,K} >= 0 only occurs for K = {1,2,...,d}\n",
"# alpha = 1/math.sqrt(d - 1);\n",
"\n",
"# Otherwise:\n",
"# alpha = 1;"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"The marginal semigroups T_i and their generators A_i:\n",
"\n",
" i spec bound of A_i A_i dissipative (<==> T_i contractive)?\n",
"--- ------------------- -----------------------------------------\n",
" 1 -1.000000 True\n",
" 2 -1.000000 True\n",
" 3 -1.000000 True\n",
" 4 -1.000000 True\n"
]
}
],
"source": [
"# create the generators `A_i` of the marginal semigroups `T_i`:`\n",
"A = [\n",
" generate_semigroup_generator(\n",
" shape = [N, N],\n",
" rational = True,\n",
" base = 100,\n",
" alpha = alpha,\n",
" )\n",
" for _ in range(d)\n",
"];\n",
"\n",
"data = [];\n",
"for i, A_i in enumerate(A):\n",
" omega_Re = spec_bounds((1/2)*(A_i + A_i.T.conj()));\n",
" omega = spec_bounds(A_i);\n",
" data.append((i+1, omega, True if (omega_Re <= 0) else False));\n",
"\n",
"repr = tabulate(\n",
" tabular_data = data,\n",
" headers = ['i', 'spec bound of A_i', 'A_i dissipative (<==> T_i contractive)?'],\n",
" showindex = False,\n",
" floatfmt = '.6f',\n",
" colalign = ['center', 'center', 'center'],\n",
" tablefmt = 'simple',\n",
");\n",
"print(f'\\nThe marginal semigroups T_i and their generators A_i:\\n\\n{repr}');"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Dissipation operators:\n",
"\n",
" K min σ(S_{T,K}) S_{T,K} >= 0?\n",
"------------ ---------------- ---------------\n",
" [] 1.000000 True\n",
" [3] 0.465478 True\n",
" [2] 0.465478 True\n",
" [1] 0.465478 True\n",
" [0] 0.465478 True\n",
" [2, 3] 0.207789 True\n",
" [1, 3] 0.179513 True\n",
" [1, 2] 0.179239 True\n",
" [0, 3] 0.315586 True\n",
" [0, 2] 0.205222 True\n",
" [0, 1] 0.327619 True\n",
" [1, 2, 3] 0.049226 True\n",
" [0, 2, 3] 0.088339 True\n",
" [0, 1, 3] 0.098730 True\n",
" [0, 1, 2] 0.081731 True\n",
"[0, 1, 2, 3] -0.133914 False\n"
]
}
],
"source": [
"# compute the dissipation operators `S_TK` for each `K ⊆ {1,2,...,d}``:\n",
"S, beta_T = dissipation_operators(shape=[N, N], A=A);\n",
"\n",
"repr = tabulate(\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",
" showindex = False,\n",
" floatfmt = '.6f',\n",
" colalign = ['center', 'center', 'center'],\n",
" tablefmt = 'simple',\n",
");\n",
"print(f'\\nDissipation operators:\\n\\n{repr}');"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"β_T = min_K min σ(S_{T,K}) = -0.133914\n",
"⟹ T is not compeletely dissipative.\n",
"⟹ (by Thm 1.1) T does not have a regular unitary dilation.\n"
]
}
],
"source": [
"# Display summary:\n",
"print('')\n",
"print(f'β_T = min_K min σ(S_{{T,K}}) = {beta_T:.6f}');\n",
"if beta_T == 0:\n",
" print('⟹ T is compeletely dissipative.');\n",
" print('⟹ (by Thm 1.1) T has a regular unitary dilation.');\n",
"elif beta_T > 0:\n",
" print('⟹ T is compeletely super dissipative.');\n",
" print('⟹ (by Thm 1.1) T has a regular unitary dilation.');\n",
"else:\n",
" print('⟹ T is not compeletely dissipative.');\n",
" print('⟹ (by Thm 1.1) T does not have a regular unitary dilation.');"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "-all"
},
"kernelspec": {
"display_name": "Python 3.10.6 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}