Compare commits

...

2 Commits

3 changed files with 46 additions and 16 deletions

View File

@@ -18,4 +18,40 @@ See the [docs/*.ipynb](docs) files.
**Note:** The Git provider _Gitea_ does not have a display format for ipynb-files. **Note:** The Git provider _Gitea_ does not have a display format for ipynb-files.
To properly view and run the notebooks, users require python v3.10.x and the jupyter module. To properly view and run the notebooks, users require python v3.10.x and the jupyter module.
To install the package requirements, call `just build` To install the package requirements, call `just build`
or `python3 -m pip install -r requirements.txt`. or `python3 -m pip install -r requirements.txt`.#
## Usage ##
To run the presentations:
- Ensure you have a working copy of [**python 3.10.x**](https://www.python.org/downloads) on your system with rights to install packages.
- Clone the repository.
- Install the requirements. Navigate to the root of the repository and carry out:
```bash
python3 -m pip install --disable-pip-version-check -r requirements.txt
# for Windows users:
py -3 -m pip install --disable-pip-version-check -r requirements.txt
```
- Start the desired notebooks using the [jupyter](https://jupyter.org) UI or run
```bash
python3 -m jupyter notebook notebooks/xyz.ipynb
# for Windows users:
py -3 -m jupyter notebook notebooks/xyz.ipynb
```
to run the notebook `docs/xyz.ipynb`.
Alternatively we recommend the following:
- Ensure you have a working copy of [**python 3.10.x**](https://www.python.org/downloads) on your system with rights to install packages.
- Ensure you have **bash** (for Windows users see the [Git SCM](https://gitforwindows.org))
and the [**justfile**](https://github.com/casey/just#installation) tool
(Windows users may wish to install [Chocolatey](https://chocolatey.org/install) beforehand).
- Clone the repository.
- Navigate in a bash terminal to the root of the repository and make use of the following commands:
```bash
# for setup:
just build
# to run the notebook docs/xyz.ipynb:
just run xyz
```
(ensure that the extension is no included in the command!).

View File

@@ -30,8 +30,7 @@
"import sys;\n", "import sys;\n",
"\n", "\n",
"# NOTE: need this to force jupyter to reload imports:\n", "# NOTE: need this to force jupyter to reload imports:\n",
"for key in list(sys.modules.keys()):\n", "for key in filter(lambda key: key.startswith('src.'), list(sys.modules.keys())):\n",
" if key.startswith('src.'):\n",
" del sys.modules[key];\n", " del sys.modules[key];\n",
"\n", "\n",
"os.chdir(os.path.dirname(_dh[0]));\n", "os.chdir(os.path.dirname(_dh[0]));\n",
@@ -48,18 +47,12 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# User input:\n", "# User input:\n",
"N = 4; # dimension of the Hilbert space.\n", "N = 6; # dimension of the Hilbert space; must be divisible by 2 for this construction.\n",
"d = 4;\n", "d = 4;\n",
"\n", "# force k-th order dissipation operators to be strictly postive for k < k0\n",
"# If you ensure that the failure of S_{T,K} >= 0 only occurs for K = {1,2,...,d}\n", "# force k-th order dissipation operators to be non-positive for k >= k0\n",
"# + you want S_TK > 0 (strictly) for all K ≠ {1,2,...,d}:\n", "# one can choose 2 <= k0 <= d\n",
"alpha = 1/math.sqrt(d - 0.5);\n", "k0 = d;"
"\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;"
] ]
}, },
{ {
@@ -69,6 +62,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# create the generators `A_i` of the marginal semigroups `T_i`:`\n", "# create the generators `A_i` of the marginal semigroups `T_i`:`\n",
"alpha = 1/math.sqrt(k0 - 0.5);\n",
"A = [\n", "A = [\n",
" generate_semigroup_generator(\n", " generate_semigroup_generator(\n",
" shape = [N, N],\n", " shape = [N, N],\n",

View File

@@ -46,7 +46,7 @@ def generate_semigroup_generator(
- `base` - <int> If `rational = True`, fixes the denominator of the rational numbers. - `base` - <int> If `rational = True`, fixes the denominator of the rational numbers.
- `alpha` - <float> Additional parameter to scale the D_i operators. - `alpha` - <float> Additional parameter to scale the D_i operators.
NOTE: in the paper `α = 1` was chosen. However one can choose any value in `(1/√d, \infty)`. NOTE: One can choose any value of `α(1/√d, \infty)`.
By choosing any value `α ≥ 1/√(d-1)`, by the computations in Proposition 5.3 By choosing any value `α ≥ 1/√(d-1)`, by the computations in Proposition 5.3
one can force that the S_TK operators only fail to be positive when |K| > d-1. one can force that the S_TK operators only fail to be positive when |K| > d-1.