From 1d86102feb417e79555f0b192064296964adba9b Mon Sep 17 00:00:00 2001 From: leburgel Date: Sat, 24 Feb 2024 18:48:42 +0000 Subject: [PATCH] =?UTF-8?q?Remove=20preview=20for=20PR=2027=20=F0=9F=9B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pr-preview/pr-27/.buildinfo | 4 - .../pr-27/0-Preliminaries/Resources.html | 582 - .../pr-27/0-Preliminaries/Software.html | 641 - .../pr-27/1-Introduction/FockSpace.html | 752 -- pr-preview/pr-27/1-Introduction/ManyBody.html | 871 -- .../pr-27/1-Introduction/Observables.html | 1082 -- .../1-Introduction/QuantumMechanics.html | 773 -- .../1-Introduction/QuantumToClassical.html | 744 -- .../pr-27/2-TensorNetworks/LinearAlgebra.html | 878 -- .../pr-27/2-TensorNetworks/Symmetries.html | 1118 -- .../2-TensorNetworks/TensorNetworkStates.html | 699 - .../2-TensorNetworks/TensorNetworks.html | 1112 -- .../3-MatrixProductStates/Algorithms.html | 735 -- .../3-MatrixProductStates/InfiniteMPS.html | 930 -- .../MatrixProductOperators.html | 3120 ----- .../MatrixProductStates.html | 744 -- .../4-Algorithms/FixedpointAlgorithms.html | 966 -- .../4-Algorithms/TimeEvolutionAlgorithms.html | 801 -- .../FiniteEntanglementScaling.html | 579 - .../pr-27/5-Tutorials/SymmetricTensors.html | 3427 ----- pr-preview/pr-27/References.html | 637 - pr-preview/pr-27/_images/AncillaMPS.svg | 279 - pr-preview/pr-27/_images/DensityMatrix.svg | 309 - pr-preview/pr-27/_images/Fib_fusiontrees.svg | 91 - pr-preview/pr-27/_images/FirstOrderTrick.svg | 9 - pr-preview/pr-27/_images/H_AC.svg | 116 - pr-preview/pr-27/_images/H_C.svg | 102 - pr-preview/pr-27/_images/Heffs.svg | 241 - .../pr-27/_images/ImagTimeEvolution.svg | 102 - pr-preview/pr-27/_images/MPOHam.svg | 152 - pr-preview/pr-27/_images/Mconstraint.svg | 146 - pr-preview/pr-27/_images/R-tensor.svg | 107 - pr-preview/pr-27/_images/SU2_fusiontrees.svg | 258 - pr-preview/pr-27/_images/SUN_fusiontrees.svg | 246 - pr-preview/pr-27/_images/TDVPProjector.svg | 377 - pr-preview/pr-27/_images/TimeEvolution.svg | 88 - pr-preview/pr-27/_images/TimeMPO_1stOrder.svg | 171 - pr-preview/pr-27/_images/U1_fusiontrees.svg | 390 - pr-preview/pr-27/_images/Z2_fusiontrees.svg | 175 - pr-preview/pr-27/_images/ZZX_symm.svg | 121 - .../pr-27/_images/anotherfusiontree.svg | 176 - pr-preview/pr-27/_images/boltzmann.svg | 145 - pr-preview/pr-27/_images/boltzmann_mpo.svg | 96 - pr-preview/pr-27/_images/bosonham.svg | 243 - pr-preview/pr-27/_images/bosonops.svg | 372 - pr-preview/pr-27/_images/boundary_mps.svg | 126 - pr-preview/pr-27/_images/contraction.svg | 79 - pr-preview/pr-27/_images/corrFunc.svg | 195 - pr-preview/pr-27/_images/corrFunc1.svg | 202 - pr-preview/pr-27/_images/corrFunc2.svg | 307 - pr-preview/pr-27/_images/diagC.svg | 140 - pr-preview/pr-27/_images/effHam.svg | 63 - pr-preview/pr-27/_images/eig.svg | 100 - pr-preview/pr-27/_images/energyOpt.svg | 117 - pr-preview/pr-27/_images/env.svg | 158 - pr-preview/pr-27/_images/envNorm.svg | 78 - pr-preview/pr-27/_images/expVal.svg | 206 - pr-preview/pr-27/_images/expVal2.svg | 59 - pr-preview/pr-27/_images/expVal3.svg | 55 - .../pr-27/_images/expectation_value.svg | 105 - .../pr-27/_images/expectation_value2.svg | 82 - pr-preview/pr-27/_images/fZ2_fusiontrees.svg | 389 - pr-preview/pr-27/_images/fixedPoints.svg | 93 - pr-preview/pr-27/_images/fixedpoint.svg | 132 - pr-preview/pr-27/_images/fmps.svg | 158 - pr-preview/pr-27/_images/full_state.svg | 218 - pr-preview/pr-27/_images/fusiontree.svg | 67 - pr-preview/pr-27/_images/gauge.svg | 350 - pr-preview/pr-27/_images/gaugeTransform.svg | 69 - pr-preview/pr-27/_images/grouping.svg | 37 - pr-preview/pr-27/_images/indexing.svg | 128 - pr-preview/pr-27/_images/kronecker.svg | 172 - pr-preview/pr-27/_images/ladder1.svg | 87 - pr-preview/pr-27/_images/ladder2.svg | 87 - pr-preview/pr-27/_images/leftGauge.svg | 78 - pr-preview/pr-27/_images/leftOrth.svg | 43 - pr-preview/pr-27/_images/leftOrth1.svg | 67 - pr-preview/pr-27/_images/leftOrth2.svg | 67 - pr-preview/pr-27/_images/localUpdate.svg | 232 - pr-preview/pr-27/_images/localUpdate2.svg | 125 - pr-preview/pr-27/_images/matmat.svg | 31 - pr-preview/pr-27/_images/matvec.svg | 29 - pr-preview/pr-27/_images/mixedGauge.svg | 228 - pr-preview/pr-27/_images/mixedGauge2.svg | 91 - pr-preview/pr-27/_images/mpo.svg | 53 - pr-preview/pr-27/_images/mpoHam.svg | 71 - pr-preview/pr-27/_images/mpsNorm.svg | 189 - pr-preview/pr-27/_images/network.svg | 339 - pr-preview/pr-27/_images/none2symm.svg | 242 - pr-preview/pr-27/_images/normAC.svg | 127 - pr-preview/pr-27/_images/outer-product.svg | 66 - .../pr-27/_images/partition_function.svg | 87 - .../pr-27/_images/partition_function_1.svg | 354 - pr-preview/pr-27/_images/peps.svg | 152 - pr-preview/pr-27/_images/peps1.svg | 142 - pr-preview/pr-27/_images/pfmps.svg | 159 - pr-preview/pr-27/_images/polar.svg | 85 - pr-preview/pr-27/_images/qr.svg | 65 - pr-preview/pr-27/_images/qrConv.svg | 91 - pr-preview/pr-27/_images/qrStep.svg | 120 - pr-preview/pr-27/_images/rightGauge.svg | 84 - pr-preview/pr-27/_images/rightOrth.svg | 67 - pr-preview/pr-27/_images/simple_update.svg | 42 - pr-preview/pr-27/_images/svd.svg | 91 - pr-preview/pr-27/_images/svd1.svg | 90 - pr-preview/pr-27/_images/svd2.svg | 227 - pr-preview/pr-27/_images/symmetric_tensor.svg | 105 - pr-preview/pr-27/_images/symmtens.svg | 128 - pr-preview/pr-27/_images/tebd_mps.svg | 593 - pr-preview/pr-27/_images/tebd_trunc.svg | 152 - pr-preview/pr-27/_images/tensor_network.svg | 43 - pr-preview/pr-27/_images/tm.svg | 128 - pr-preview/pr-27/_images/tmLimit.svg | 121 - pr-preview/pr-27/_images/tmPower.svg | 183 - pr-preview/pr-27/_images/tn_state.svg | 260 - pr-preview/pr-27/_images/tr.svg | 24 - pr-preview/pr-27/_images/trace-cyclic.svg | 144 - pr-preview/pr-27/_images/trace.svg | 113 - pr-preview/pr-27/_images/traceNorm.svg | 43 - pr-preview/pr-27/_images/transfer.svg | 89 - pr-preview/pr-27/_images/transfer1.svg | 182 - pr-preview/pr-27/_images/truncMPS.svg | 283 - pr-preview/pr-27/_images/umps.svg | 124 - pr-preview/pr-27/_images/umps3.svg | 149 - pr-preview/pr-27/_images/unitary.svg | 76 - pr-preview/pr-27/_images/unitaryGauge.svg | 81 - pr-preview/pr-27/_images/vecvec.svg | 30 - pr-preview/pr-27/_images/wignereckart.svg | 386 - pr-preview/pr-27/_rediraffe_redirected.json | 1 - .../_sources/0-Preliminaries/Resources.md | 6 - .../_sources/0-Preliminaries/Software.ipynb | 95 - .../_sources/0-Preliminaries/Software.md | 71 - .../_sources/1-Introduction/FockSpace.ipynb | 266 - .../_sources/1-Introduction/FockSpace.md | 248 - .../_sources/1-Introduction/ManyBody.ipynb | 395 - .../pr-27/_sources/1-Introduction/ManyBody.md | 377 - .../_sources/1-Introduction/Observables.ipynb | 618 - .../_sources/1-Introduction/Observables.md | 600 - .../1-Introduction/QuantumMechanics.ipynb | 253 - .../1-Introduction/QuantumMechanics.md | 235 - .../1-Introduction/QuantumToClassical.ipynb | 215 - .../1-Introduction/QuantumToClassical.md | 197 - .../2-TensorNetworks/LinearAlgebra.ipynb | 469 - .../2-TensorNetworks/LinearAlgebra.md | 257 - .../2-TensorNetworks/Symmetries.ipynb | 708 - .../_sources/2-TensorNetworks/Symmetries.md | 523 - .../TensorNetworkStates.ipynb | 176 - .../2-TensorNetworks/TensorNetworkStates.md | 158 - .../2-TensorNetworks/TensorNetworks.ipynb | 812 -- .../2-TensorNetworks/TensorNetworks.md | 513 - .../3-MatrixProductStates/Algorithms.ipynb | 218 - .../3-MatrixProductStates/Algorithms.md | 200 - .../3-MatrixProductStates/InfiniteMPS.ipynb | 604 - .../3-MatrixProductStates/InfiniteMPS.md | 462 - .../MatrixProductOperators.ipynb | 2799 ---- .../MatrixProductOperators.md | 457 - .../MatrixProductStates.ipynb | 261 - .../MatrixProductStates.md | 243 - .../4-Algorithms/FixedpointAlgorithms.ipynb | 548 - .../4-Algorithms/FixedpointAlgorithms.md | 204 - .../TimeEvolutionAlgorithms.ipynb | 386 - .../4-Algorithms/TimeEvolutionAlgorithms.md | 304 - .../FiniteEntanglementScaling.ipynb | 35 - .../5-Tutorials/FiniteEntanglementScaling.md | 17 - .../5-Tutorials/SymmetricTensors.ipynb | 3608 ----- .../_sources/5-Tutorials/SymmetricTensors.md | 1241 -- pr-preview/pr-27/_sources/References.ipynb | 35 - pr-preview/pr-27/_sources/References.md | 17 - pr-preview/pr-27/_sources/intro.md | 12 - ...e.4045f2051d55cab465a707391d5b2007.min.css | 1 - .../_sphinx_design_static/design-tabs.js | 27 - .../pr-27/_static/FiniteMPS/corrFunc.svg | 202 - pr-preview/pr-27/_static/FiniteMPS/fmps.svg | 158 - pr-preview/pr-27/_static/FiniteMPS/gauge.svg | 350 - .../pr-27/_static/FiniteMPS/leftOrth.svg | 67 - pr-preview/pr-27/_static/FiniteMPS/peps.svg | 142 - pr-preview/pr-27/_static/FiniteMPS/pfmps.svg | 159 - pr-preview/pr-27/_static/FiniteMPS/svd.svg | 227 - .../pr-27/_static/FiniteMPS/transfer.svg | 182 - .../_static/FixedpointAlgorithms/H_AC.svg | 116 - .../_static/FixedpointAlgorithms/H_C.svg | 102 - .../_static/FixedpointAlgorithms/effHam.svg | 63 - .../FixedpointAlgorithms/energyOpt.svg | 117 - .../_static/FixedpointAlgorithms/env.svg | 158 - .../_static/FixedpointAlgorithms/envNorm.svg | 78 - .../FixedpointAlgorithms/fixedpoint.svg | 132 - .../FixedpointAlgorithms/localUpdate.svg | 232 - .../FixedpointAlgorithms/localUpdate2.svg | 125 - .../_static/FixedpointAlgorithms/mpoHam.svg | 71 - .../pr-27/_static/InfiniteMPS/corrFunc.svg | 195 - .../pr-27/_static/InfiniteMPS/corrFunc2.svg | 307 - .../pr-27/_static/InfiniteMPS/diagC.svg | 140 - .../pr-27/_static/InfiniteMPS/expVal.svg | 206 - .../pr-27/_static/InfiniteMPS/expVal2.svg | 59 - .../pr-27/_static/InfiniteMPS/expVal3.svg | 55 - .../pr-27/_static/InfiniteMPS/fixedPoints.svg | 93 - .../_static/InfiniteMPS/gaugeTransform.svg | 69 - .../pr-27/_static/InfiniteMPS/leftGauge.svg | 78 - .../pr-27/_static/InfiniteMPS/leftOrth.svg | 67 - .../pr-27/_static/InfiniteMPS/mixedGauge.svg | 228 - .../pr-27/_static/InfiniteMPS/mixedGauge2.svg | 91 - .../pr-27/_static/InfiniteMPS/mpsNorm.svg | 189 - .../pr-27/_static/InfiniteMPS/normAC.svg | 127 - .../pr-27/_static/InfiniteMPS/qrConv.svg | 91 - .../pr-27/_static/InfiniteMPS/qrStep.svg | 120 - .../pr-27/_static/InfiniteMPS/rightGauge.svg | 84 - .../pr-27/_static/InfiniteMPS/rightOrth.svg | 67 - pr-preview/pr-27/_static/InfiniteMPS/tm.svg | 128 - .../pr-27/_static/InfiniteMPS/tmDecomp.svg | 135 - .../pr-27/_static/InfiniteMPS/tmLimit.svg | 121 - .../pr-27/_static/InfiniteMPS/tmPower.svg | 183 - .../pr-27/_static/InfiniteMPS/traceNorm.svg | 43 - .../pr-27/_static/InfiniteMPS/truncMPS.svg | 283 - pr-preview/pr-27/_static/InfiniteMPS/umps.svg | 124 - .../pr-27/_static/InfiniteMPS/umps3.svg | 149 - .../_static/InfiniteMPS/unitaryGauge.svg | 81 - pr-preview/pr-27/_static/MPO/boltzmann.svg | 145 - .../pr-27/_static/MPO/boltzmann_mpo.svg | 96 - pr-preview/pr-27/_static/MPO/boundary_mps.svg | 126 - .../pr-27/_static/MPO/expectation_value.svg | 105 - .../pr-27/_static/MPO/expectation_value2.svg | 82 - pr-preview/pr-27/_static/MPO/kronecker.svg | 172 - pr-preview/pr-27/_static/MPO/mpo.svg | 53 - .../pr-27/_static/MPO/partition_function.svg | 87 - .../_static/MPO/partition_function_1.svg | 354 - pr-preview/pr-27/_static/MPO/transfer.svg | 89 - .../SymmetricTensors/Fib_fusiontrees.svg | 91 - .../SymmetricTensors/SU2_fusiontrees.svg | 258 - .../SymmetricTensors/SUN_fusiontrees.svg | 246 - .../SymmetricTensors/U1_fusiontrees.svg | 390 - .../pr-27/_static/SymmetricTensors/X.svg | 23 - .../SymmetricTensors/Z2_fusiontrees.svg | 175 - .../pr-27/_static/SymmetricTensors/ZZ.svg | 30 - .../_static/SymmetricTensors/ZZX_symm.svg | 121 - .../SymmetricTensors/anotherfusiontree.svg | 176 - .../_static/SymmetricTensors/bosonham.svg | 243 - .../_static/SymmetricTensors/bosonops.svg | 372 - .../SymmetricTensors/fZ2_fusiontrees.svg | 389 - .../_static/SymmetricTensors/fermioncomm.svg | 121 - .../_static/SymmetricTensors/fermionham.svg | 381 - .../SymmetricTensors/fermionham_bis.svg | 243 - .../_static/SymmetricTensors/fermionops.svg | 256 - .../_static/SymmetricTensors/fusiontree.svg | 67 - .../_static/SymmetricTensors/none2symm.svg | 242 - .../SymmetricTensors/symmetric_tensor.svg | 105 - .../_static/SymmetricTensors/symmtens.svg | 128 - .../_static/SymmetricTensors/wignereckart.svg | 386 - .../TensorNetworkStates/full_state.svg | 218 - .../_static/TensorNetworkStates/peps.svg | 152 - .../_static/TensorNetworkStates/svd1.svg | 90 - .../_static/TensorNetworkStates/tn_state.svg | 260 - .../pr-27/_static/TensorNetworks/R-tensor.svg | 107 - .../_static/TensorNetworks/contraction.svg | 79 - .../pr-27/_static/TensorNetworks/eig.svg | 100 - .../pr-27/_static/TensorNetworks/grouping.svg | 37 - .../pr-27/_static/TensorNetworks/indexing.svg | 128 - .../pr-27/_static/TensorNetworks/ladder1.svg | 87 - .../pr-27/_static/TensorNetworks/ladder2.svg | 87 - .../pr-27/_static/TensorNetworks/leftOrth.svg | 43 - .../pr-27/_static/TensorNetworks/matmat.svg | 31 - .../pr-27/_static/TensorNetworks/matvec.svg | 29 - .../pr-27/_static/TensorNetworks/network.svg | 339 - .../_static/TensorNetworks/outer-product.svg | 66 - .../pr-27/_static/TensorNetworks/polar.svg | 85 - .../pr-27/_static/TensorNetworks/qr.svg | 65 - .../pr-27/_static/TensorNetworks/svd.svg | 91 - .../pr-27/_static/TensorNetworks/tr.svg | 24 - .../_static/TensorNetworks/trace-cyclic.svg | 144 - .../pr-27/_static/TensorNetworks/trace.svg | 113 - .../pr-27/_static/TensorNetworks/unitary.svg | 76 - .../pr-27/_static/TensorNetworks/vecvec.svg | 30 - .../_static/TimeEvolution/AncillaMPS.svg | 279 - .../_static/TimeEvolution/DensityMatrix.svg | 309 - .../_static/TimeEvolution/FirstOrderTrick.svg | 9 - .../pr-27/_static/TimeEvolution/Heffs.svg | 241 - .../TimeEvolution/ImagTimeEvolution.svg | 102 - .../pr-27/_static/TimeEvolution/MPOHam.svg | 152 - .../_static/TimeEvolution/Mconstraint.svg | 146 - .../_static/TimeEvolution/TDVPProjector.svg | 377 - .../_static/TimeEvolution/TimeEvolution.svg | 88 - .../TimeEvolution/TimeMPO_1stOrder.svg | 171 - .../_sphinx_javascript_frameworks_compat.js | 134 - pr-preview/pr-27/_static/basic.css | 928 -- pr-preview/pr-27/_static/check-solid.svg | 4 - pr-preview/pr-27/_static/clipboard.min.js | 7 - pr-preview/pr-27/_static/copy-button.svg | 5 - pr-preview/pr-27/_static/copybutton.css | 94 - pr-preview/pr-27/_static/copybutton.js | 248 - pr-preview/pr-27/_static/copybutton_funcs.js | 73 - ...e.4045f2051d55cab465a707391d5b2007.min.css | 1 - pr-preview/pr-27/_static/design-tabs.js | 27 - pr-preview/pr-27/_static/doctools.js | 264 - .../pr-27/_static/documentation_options.js | 14 - .../_static/figures/alg/boundary_mps.svg | 190 - .../pr-27/_static/figures/alg/ctmrg.svg | 411 - .../pr-27/_static/figures/alg/lambda.svg | 211 - .../pr-27/_static/figures/alg/lattice.svg | 104 - .../_static/figures/alg/simple_update.svg | 42 - pr-preview/pr-27/_static/figures/alg/tebd.svg | 613 - .../pr-27/_static/figures/alg/tebd_mps.svg | 593 - .../pr-27/_static/figures/alg/tebd_trunc.svg | 152 - .../_static/figures/alg/tensor_network.svg | 43 - .../pr-27/_static/figures/alg/transfer.svg | 136 - pr-preview/pr-27/_static/file.png | Bin 286 -> 0 bytes pr-preview/pr-27/_static/jquery-3.6.0.js | 10881 ---------------- pr-preview/pr-27/_static/jquery.js | 2 - pr-preview/pr-27/_static/language_data.js | 199 - pr-preview/pr-27/_static/lectures-favicon.ico | Bin 4022 -> 0 bytes pr-preview/pr-27/_static/logo.png | Bin 9854 -> 0 bytes pr-preview/pr-27/_static/minus.png | Bin 90 -> 0 bytes ...69c37c29e427902b24a333a5f9fcb2f0b3ac41.css | 2342 ---- pr-preview/pr-27/_static/plus.png | Bin 90 -> 0 bytes pr-preview/pr-27/_static/pygments.css | 152 - ...theme.5e19e0a6c2e2247c14aaae6dbdd37c4f.css | 1 - ...-theme.ef2ef6c3e8da75e1e736fb5fce08cde6.js | 28 - pr-preview/pr-27/_static/scripts/bootstrap.js | 3 - .../_static/scripts/bootstrap.js.LICENSE.txt | 5 - .../pr-27/_static/scripts/bootstrap.js.map | 1 - .../_static/scripts/pydata-sphinx-theme.js | 2 - .../scripts/pydata-sphinx-theme.js.map | 1 - pr-preview/pr-27/_static/searchtools.js | 531 - pr-preview/pr-27/_static/sphinx-thebe.css | 129 - pr-preview/pr-27/_static/sphinx-thebe.js | 126 - pr-preview/pr-27/_static/styles/bootstrap.css | 6 - .../pr-27/_static/styles/bootstrap.css.map | 1 - .../_static/styles/pydata-sphinx-theme.css | 2 - .../styles/pydata-sphinx-theme.css.map | 1 - pr-preview/pr-27/_static/styles/theme.css | 2 - pr-preview/pr-27/_static/togglebutton.css | 160 - pr-preview/pr-27/_static/togglebutton.js | 187 - pr-preview/pr-27/_static/underscore-1.13.1.js | 2042 --- pr-preview/pr-27/_static/underscore.js | 6 - .../vendor/fontawesome/6.5.1/LICENSE.txt | 165 - .../vendor/fontawesome/6.5.1/css/all.min.css | 5 - .../vendor/fontawesome/6.5.1/js/all.min.js | 2 - .../6.5.1/js/all.min.js.LICENSE.txt | 5 - .../6.5.1/webfonts/fa-brands-400.ttf | Bin 207972 -> 0 bytes .../6.5.1/webfonts/fa-brands-400.woff2 | Bin 117372 -> 0 bytes .../6.5.1/webfonts/fa-regular-400.ttf | Bin 68004 -> 0 bytes .../6.5.1/webfonts/fa-regular-400.woff2 | Bin 25452 -> 0 bytes .../6.5.1/webfonts/fa-solid-900.ttf | Bin 419720 -> 0 bytes .../6.5.1/webfonts/fa-solid-900.woff2 | Bin 156496 -> 0 bytes .../6.5.1/webfonts/fa-v4compatibility.ttf | Bin 10832 -> 0 bytes .../6.5.1/webfonts/fa-v4compatibility.woff2 | Bin 4792 -> 0 bytes pr-preview/pr-27/_static/webpack-macros.html | 31 - pr-preview/pr-27/genindex.html | 559 - pr-preview/pr-27/index.html | 1 - pr-preview/pr-27/index_toc.html | 15 - pr-preview/pr-27/intro.html | 637 - pr-preview/pr-27/objects.inv | Bin 2356 -> 0 bytes pr-preview/pr-27/search.html | 586 - pr-preview/pr-27/searchindex.js | 1 - 352 files changed, 95421 deletions(-) delete mode 100644 pr-preview/pr-27/.buildinfo delete mode 100644 pr-preview/pr-27/0-Preliminaries/Resources.html delete mode 100644 pr-preview/pr-27/0-Preliminaries/Software.html delete mode 100644 pr-preview/pr-27/1-Introduction/FockSpace.html delete mode 100644 pr-preview/pr-27/1-Introduction/ManyBody.html delete mode 100644 pr-preview/pr-27/1-Introduction/Observables.html delete mode 100644 pr-preview/pr-27/1-Introduction/QuantumMechanics.html delete mode 100644 pr-preview/pr-27/1-Introduction/QuantumToClassical.html delete mode 100644 pr-preview/pr-27/2-TensorNetworks/LinearAlgebra.html delete mode 100644 pr-preview/pr-27/2-TensorNetworks/Symmetries.html delete mode 100644 pr-preview/pr-27/2-TensorNetworks/TensorNetworkStates.html delete mode 100644 pr-preview/pr-27/2-TensorNetworks/TensorNetworks.html delete mode 100644 pr-preview/pr-27/3-MatrixProductStates/Algorithms.html delete mode 100644 pr-preview/pr-27/3-MatrixProductStates/InfiniteMPS.html delete mode 100644 pr-preview/pr-27/3-MatrixProductStates/MatrixProductOperators.html delete mode 100644 pr-preview/pr-27/3-MatrixProductStates/MatrixProductStates.html delete mode 100644 pr-preview/pr-27/4-Algorithms/FixedpointAlgorithms.html delete mode 100644 pr-preview/pr-27/4-Algorithms/TimeEvolutionAlgorithms.html delete mode 100644 pr-preview/pr-27/5-Tutorials/FiniteEntanglementScaling.html delete mode 100644 pr-preview/pr-27/5-Tutorials/SymmetricTensors.html delete mode 100644 pr-preview/pr-27/References.html delete mode 100644 pr-preview/pr-27/_images/AncillaMPS.svg delete mode 100644 pr-preview/pr-27/_images/DensityMatrix.svg delete mode 100644 pr-preview/pr-27/_images/Fib_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_images/FirstOrderTrick.svg delete mode 100644 pr-preview/pr-27/_images/H_AC.svg delete mode 100644 pr-preview/pr-27/_images/H_C.svg delete mode 100644 pr-preview/pr-27/_images/Heffs.svg delete mode 100644 pr-preview/pr-27/_images/ImagTimeEvolution.svg delete mode 100644 pr-preview/pr-27/_images/MPOHam.svg delete mode 100644 pr-preview/pr-27/_images/Mconstraint.svg delete mode 100644 pr-preview/pr-27/_images/R-tensor.svg delete mode 100644 pr-preview/pr-27/_images/SU2_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_images/SUN_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_images/TDVPProjector.svg delete mode 100644 pr-preview/pr-27/_images/TimeEvolution.svg delete mode 100644 pr-preview/pr-27/_images/TimeMPO_1stOrder.svg delete mode 100644 pr-preview/pr-27/_images/U1_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_images/Z2_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_images/ZZX_symm.svg delete mode 100644 pr-preview/pr-27/_images/anotherfusiontree.svg delete mode 100644 pr-preview/pr-27/_images/boltzmann.svg delete mode 100644 pr-preview/pr-27/_images/boltzmann_mpo.svg delete mode 100644 pr-preview/pr-27/_images/bosonham.svg delete mode 100644 pr-preview/pr-27/_images/bosonops.svg delete mode 100644 pr-preview/pr-27/_images/boundary_mps.svg delete mode 100644 pr-preview/pr-27/_images/contraction.svg delete mode 100644 pr-preview/pr-27/_images/corrFunc.svg delete mode 100644 pr-preview/pr-27/_images/corrFunc1.svg delete mode 100644 pr-preview/pr-27/_images/corrFunc2.svg delete mode 100644 pr-preview/pr-27/_images/diagC.svg delete mode 100644 pr-preview/pr-27/_images/effHam.svg delete mode 100644 pr-preview/pr-27/_images/eig.svg delete mode 100644 pr-preview/pr-27/_images/energyOpt.svg delete mode 100644 pr-preview/pr-27/_images/env.svg delete mode 100644 pr-preview/pr-27/_images/envNorm.svg delete mode 100644 pr-preview/pr-27/_images/expVal.svg delete mode 100644 pr-preview/pr-27/_images/expVal2.svg delete mode 100644 pr-preview/pr-27/_images/expVal3.svg delete mode 100644 pr-preview/pr-27/_images/expectation_value.svg delete mode 100644 pr-preview/pr-27/_images/expectation_value2.svg delete mode 100644 pr-preview/pr-27/_images/fZ2_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_images/fixedPoints.svg delete mode 100644 pr-preview/pr-27/_images/fixedpoint.svg delete mode 100644 pr-preview/pr-27/_images/fmps.svg delete mode 100644 pr-preview/pr-27/_images/full_state.svg delete mode 100644 pr-preview/pr-27/_images/fusiontree.svg delete mode 100644 pr-preview/pr-27/_images/gauge.svg delete mode 100644 pr-preview/pr-27/_images/gaugeTransform.svg delete mode 100644 pr-preview/pr-27/_images/grouping.svg delete mode 100644 pr-preview/pr-27/_images/indexing.svg delete mode 100644 pr-preview/pr-27/_images/kronecker.svg delete mode 100644 pr-preview/pr-27/_images/ladder1.svg delete mode 100644 pr-preview/pr-27/_images/ladder2.svg delete mode 100644 pr-preview/pr-27/_images/leftGauge.svg delete mode 100644 pr-preview/pr-27/_images/leftOrth.svg delete mode 100644 pr-preview/pr-27/_images/leftOrth1.svg delete mode 100644 pr-preview/pr-27/_images/leftOrth2.svg delete mode 100644 pr-preview/pr-27/_images/localUpdate.svg delete mode 100644 pr-preview/pr-27/_images/localUpdate2.svg delete mode 100644 pr-preview/pr-27/_images/matmat.svg delete mode 100644 pr-preview/pr-27/_images/matvec.svg delete mode 100644 pr-preview/pr-27/_images/mixedGauge.svg delete mode 100644 pr-preview/pr-27/_images/mixedGauge2.svg delete mode 100644 pr-preview/pr-27/_images/mpo.svg delete mode 100644 pr-preview/pr-27/_images/mpoHam.svg delete mode 100644 pr-preview/pr-27/_images/mpsNorm.svg delete mode 100644 pr-preview/pr-27/_images/network.svg delete mode 100644 pr-preview/pr-27/_images/none2symm.svg delete mode 100644 pr-preview/pr-27/_images/normAC.svg delete mode 100644 pr-preview/pr-27/_images/outer-product.svg delete mode 100644 pr-preview/pr-27/_images/partition_function.svg delete mode 100644 pr-preview/pr-27/_images/partition_function_1.svg delete mode 100644 pr-preview/pr-27/_images/peps.svg delete mode 100644 pr-preview/pr-27/_images/peps1.svg delete mode 100644 pr-preview/pr-27/_images/pfmps.svg delete mode 100644 pr-preview/pr-27/_images/polar.svg delete mode 100644 pr-preview/pr-27/_images/qr.svg delete mode 100644 pr-preview/pr-27/_images/qrConv.svg delete mode 100644 pr-preview/pr-27/_images/qrStep.svg delete mode 100644 pr-preview/pr-27/_images/rightGauge.svg delete mode 100644 pr-preview/pr-27/_images/rightOrth.svg delete mode 100644 pr-preview/pr-27/_images/simple_update.svg delete mode 100644 pr-preview/pr-27/_images/svd.svg delete mode 100644 pr-preview/pr-27/_images/svd1.svg delete mode 100644 pr-preview/pr-27/_images/svd2.svg delete mode 100644 pr-preview/pr-27/_images/symmetric_tensor.svg delete mode 100644 pr-preview/pr-27/_images/symmtens.svg delete mode 100644 pr-preview/pr-27/_images/tebd_mps.svg delete mode 100644 pr-preview/pr-27/_images/tebd_trunc.svg delete mode 100644 pr-preview/pr-27/_images/tensor_network.svg delete mode 100644 pr-preview/pr-27/_images/tm.svg delete mode 100644 pr-preview/pr-27/_images/tmLimit.svg delete mode 100644 pr-preview/pr-27/_images/tmPower.svg delete mode 100644 pr-preview/pr-27/_images/tn_state.svg delete mode 100644 pr-preview/pr-27/_images/tr.svg delete mode 100644 pr-preview/pr-27/_images/trace-cyclic.svg delete mode 100644 pr-preview/pr-27/_images/trace.svg delete mode 100644 pr-preview/pr-27/_images/traceNorm.svg delete mode 100644 pr-preview/pr-27/_images/transfer.svg delete mode 100644 pr-preview/pr-27/_images/transfer1.svg delete mode 100644 pr-preview/pr-27/_images/truncMPS.svg delete mode 100644 pr-preview/pr-27/_images/umps.svg delete mode 100644 pr-preview/pr-27/_images/umps3.svg delete mode 100644 pr-preview/pr-27/_images/unitary.svg delete mode 100644 pr-preview/pr-27/_images/unitaryGauge.svg delete mode 100644 pr-preview/pr-27/_images/vecvec.svg delete mode 100644 pr-preview/pr-27/_images/wignereckart.svg delete mode 100644 pr-preview/pr-27/_rediraffe_redirected.json delete mode 100644 pr-preview/pr-27/_sources/0-Preliminaries/Resources.md delete mode 100644 pr-preview/pr-27/_sources/0-Preliminaries/Software.ipynb delete mode 100644 pr-preview/pr-27/_sources/0-Preliminaries/Software.md delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/FockSpace.ipynb delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/FockSpace.md delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/ManyBody.ipynb delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/ManyBody.md delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/Observables.ipynb delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/Observables.md delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.ipynb delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.md delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.ipynb delete mode 100644 pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.md delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.ipynb delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.md delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.ipynb delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.md delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.ipynb delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.md delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.ipynb delete mode 100644 pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.md delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.ipynb delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.md delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.ipynb delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.md delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.ipynb delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.md delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.ipynb delete mode 100644 pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.md delete mode 100644 pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.ipynb delete mode 100644 pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.md delete mode 100644 pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.ipynb delete mode 100644 pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.md delete mode 100644 pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.ipynb delete mode 100644 pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.md delete mode 100644 pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.ipynb delete mode 100644 pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.md delete mode 100644 pr-preview/pr-27/_sources/References.ipynb delete mode 100644 pr-preview/pr-27/_sources/References.md delete mode 100644 pr-preview/pr-27/_sources/intro.md delete mode 100644 pr-preview/pr-27/_sphinx_design_static/design-style.4045f2051d55cab465a707391d5b2007.min.css delete mode 100644 pr-preview/pr-27/_sphinx_design_static/design-tabs.js delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/corrFunc.svg delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/fmps.svg delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/gauge.svg delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/leftOrth.svg delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/peps.svg delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/pfmps.svg delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/svd.svg delete mode 100644 pr-preview/pr-27/_static/FiniteMPS/transfer.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/H_AC.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/H_C.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/effHam.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/energyOpt.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/env.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/envNorm.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/fixedpoint.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate2.svg delete mode 100644 pr-preview/pr-27/_static/FixedpointAlgorithms/mpoHam.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/corrFunc.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/corrFunc2.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/diagC.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/expVal.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/expVal2.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/expVal3.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/fixedPoints.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/gaugeTransform.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/leftGauge.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/leftOrth.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/mixedGauge.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/mixedGauge2.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/mpsNorm.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/normAC.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/qrConv.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/qrStep.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/rightGauge.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/rightOrth.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/tm.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/tmDecomp.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/tmLimit.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/tmPower.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/traceNorm.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/truncMPS.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/umps.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/umps3.svg delete mode 100644 pr-preview/pr-27/_static/InfiniteMPS/unitaryGauge.svg delete mode 100644 pr-preview/pr-27/_static/MPO/boltzmann.svg delete mode 100644 pr-preview/pr-27/_static/MPO/boltzmann_mpo.svg delete mode 100644 pr-preview/pr-27/_static/MPO/boundary_mps.svg delete mode 100644 pr-preview/pr-27/_static/MPO/expectation_value.svg delete mode 100644 pr-preview/pr-27/_static/MPO/expectation_value2.svg delete mode 100644 pr-preview/pr-27/_static/MPO/kronecker.svg delete mode 100644 pr-preview/pr-27/_static/MPO/mpo.svg delete mode 100644 pr-preview/pr-27/_static/MPO/partition_function.svg delete mode 100644 pr-preview/pr-27/_static/MPO/partition_function_1.svg delete mode 100644 pr-preview/pr-27/_static/MPO/transfer.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/Fib_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/SU2_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/SUN_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/U1_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/X.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/Z2_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/ZZ.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/ZZX_symm.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/anotherfusiontree.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/bosonham.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/bosonops.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/fZ2_fusiontrees.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/fermioncomm.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/fermionham.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/fermionham_bis.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/fermionops.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/fusiontree.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/none2symm.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/symmetric_tensor.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/symmtens.svg delete mode 100644 pr-preview/pr-27/_static/SymmetricTensors/wignereckart.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworkStates/full_state.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworkStates/peps.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworkStates/svd1.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworkStates/tn_state.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/R-tensor.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/contraction.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/eig.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/grouping.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/indexing.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/ladder1.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/ladder2.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/leftOrth.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/matmat.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/matvec.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/network.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/outer-product.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/polar.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/qr.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/svd.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/tr.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/trace-cyclic.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/trace.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/unitary.svg delete mode 100644 pr-preview/pr-27/_static/TensorNetworks/vecvec.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/AncillaMPS.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/DensityMatrix.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/FirstOrderTrick.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/Heffs.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/ImagTimeEvolution.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/MPOHam.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/Mconstraint.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/TDVPProjector.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/TimeEvolution.svg delete mode 100644 pr-preview/pr-27/_static/TimeEvolution/TimeMPO_1stOrder.svg delete mode 100644 pr-preview/pr-27/_static/_sphinx_javascript_frameworks_compat.js delete mode 100644 pr-preview/pr-27/_static/basic.css delete mode 100644 pr-preview/pr-27/_static/check-solid.svg delete mode 100644 pr-preview/pr-27/_static/clipboard.min.js delete mode 100644 pr-preview/pr-27/_static/copy-button.svg delete mode 100644 pr-preview/pr-27/_static/copybutton.css delete mode 100644 pr-preview/pr-27/_static/copybutton.js delete mode 100644 pr-preview/pr-27/_static/copybutton_funcs.js delete mode 100644 pr-preview/pr-27/_static/design-style.4045f2051d55cab465a707391d5b2007.min.css delete mode 100644 pr-preview/pr-27/_static/design-tabs.js delete mode 100644 pr-preview/pr-27/_static/doctools.js delete mode 100644 pr-preview/pr-27/_static/documentation_options.js delete mode 100644 pr-preview/pr-27/_static/figures/alg/boundary_mps.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/ctmrg.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/lambda.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/lattice.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/simple_update.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/tebd.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/tebd_mps.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/tebd_trunc.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/tensor_network.svg delete mode 100644 pr-preview/pr-27/_static/figures/alg/transfer.svg delete mode 100644 pr-preview/pr-27/_static/file.png delete mode 100644 pr-preview/pr-27/_static/jquery-3.6.0.js delete mode 100644 pr-preview/pr-27/_static/jquery.js delete mode 100644 pr-preview/pr-27/_static/language_data.js delete mode 100644 pr-preview/pr-27/_static/lectures-favicon.ico delete mode 100644 pr-preview/pr-27/_static/logo.png delete mode 100644 pr-preview/pr-27/_static/minus.png delete mode 100644 pr-preview/pr-27/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css delete mode 100644 pr-preview/pr-27/_static/plus.png delete mode 100644 pr-preview/pr-27/_static/pygments.css delete mode 100644 pr-preview/pr-27/_static/quantumghent-book-theme.5e19e0a6c2e2247c14aaae6dbdd37c4f.css delete mode 100644 pr-preview/pr-27/_static/quantumghent-book-theme.ef2ef6c3e8da75e1e736fb5fce08cde6.js delete mode 100644 pr-preview/pr-27/_static/scripts/bootstrap.js delete mode 100644 pr-preview/pr-27/_static/scripts/bootstrap.js.LICENSE.txt delete mode 100644 pr-preview/pr-27/_static/scripts/bootstrap.js.map delete mode 100644 pr-preview/pr-27/_static/scripts/pydata-sphinx-theme.js delete mode 100644 pr-preview/pr-27/_static/scripts/pydata-sphinx-theme.js.map delete mode 100644 pr-preview/pr-27/_static/searchtools.js delete mode 100644 pr-preview/pr-27/_static/sphinx-thebe.css delete mode 100644 pr-preview/pr-27/_static/sphinx-thebe.js delete mode 100644 pr-preview/pr-27/_static/styles/bootstrap.css delete mode 100644 pr-preview/pr-27/_static/styles/bootstrap.css.map delete mode 100644 pr-preview/pr-27/_static/styles/pydata-sphinx-theme.css delete mode 100644 pr-preview/pr-27/_static/styles/pydata-sphinx-theme.css.map delete mode 100644 pr-preview/pr-27/_static/styles/theme.css delete mode 100644 pr-preview/pr-27/_static/togglebutton.css delete mode 100644 pr-preview/pr-27/_static/togglebutton.js delete mode 100644 pr-preview/pr-27/_static/underscore-1.13.1.js delete mode 100644 pr-preview/pr-27/_static/underscore.js delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/LICENSE.txt delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/css/all.min.css delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/js/all.min.js delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/js/all.min.js.LICENSE.txt delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-brands-400.ttf delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-brands-400.woff2 delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-regular-400.ttf delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-regular-400.woff2 delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-solid-900.ttf delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-solid-900.woff2 delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-v4compatibility.ttf delete mode 100644 pr-preview/pr-27/_static/vendor/fontawesome/6.5.1/webfonts/fa-v4compatibility.woff2 delete mode 100644 pr-preview/pr-27/_static/webpack-macros.html delete mode 100644 pr-preview/pr-27/genindex.html delete mode 100644 pr-preview/pr-27/index.html delete mode 100644 pr-preview/pr-27/index_toc.html delete mode 100644 pr-preview/pr-27/intro.html delete mode 100644 pr-preview/pr-27/objects.inv delete mode 100644 pr-preview/pr-27/search.html delete mode 100644 pr-preview/pr-27/searchindex.js diff --git a/pr-preview/pr-27/.buildinfo b/pr-preview/pr-27/.buildinfo deleted file mode 100644 index 98d3b246..00000000 --- a/pr-preview/pr-27/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 17bce47ad0b4e17f37025ac947dda5f8 -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/pr-preview/pr-27/0-Preliminaries/Resources.html b/pr-preview/pr-27/0-Preliminaries/Resources.html deleted file mode 100644 index 73ddb995..00000000 --- a/pr-preview/pr-27/0-Preliminaries/Resources.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - - - - - - - - 2. Useful Resources — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Useful Resources

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

2. Useful Resources#

-

Other useful resources for learning about tensor networks include (but are certainly not limited to):

- -
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/0-Preliminaries/Software.html b/pr-preview/pr-27/0-Preliminaries/Software.html deleted file mode 100644 index e9652a48..00000000 --- a/pr-preview/pr-27/0-Preliminaries/Software.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - - - - - - - - - - 1. Getting Started with Numerics — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - -
- On this page -
- - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Getting Started with Numerics

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

1. Getting Started with Numerics#

-

On this page, there are some links with relevant information for getting started with -numerical computing. We point to some references for the Julia programming language, as well -as some resources for learning about version control software.

-
-

1.1. Version Control#

-

Version control software is a tool used in software development (and sometimes in other -fields) to manage and track changes made to a project’s source code, documents, or any other -set of files. It allows multiple contributors to work collaboratively on a project, keeping -a history of changes, and facilitating the organization and synchronization of different -versions of the project. The most popular version control system is -git, which is a free tool developed by Linus Torvalds in 2005, and -has become the de facto standard in the software development industry.

-

Again, multiple resources are available for learning about git. From the official website, -the book Pro Git is a good place to start. For a more -dynamic approach, you can learn git through -this interactive tutorial.

-
-
-

1.2. Julia#

-

In order to get started with Julia, there are many resources already available. The -official documentation is a good place to start, and a -full getting started exposition can be found for example -here. There is also a -learning page that has tutorials on different topics, a -list of books, and much more.

-

Additionally, there is an active forum for asking -questions, as well as a slack channel and a stack overflow -page.

-
-
-

1.3. Julia Packages#

-

Julia has a very active open-source community, and many packages are available for different -purposes. These typically have their own documentation, and are hosted on GitHub. An -(incomplete) list of packages that are relevant for this course are given below:

- -

Also check out the GitHub page for our organization, -which hosts and/or links many of the relevant software repositories.

-
-
-

1.4. Noteworthy Tensor Network Software#

-

There are many additional software libraries available for tensor network computations, or -more generally for quantum physics research. Below you can find an incomplete list of some -of these.

-
    -
  • ITensor Julia/C++ library for tensor network calculations

  • -
  • TenPy Python library for tensor network calculations

  • -
  • QUIMB Python library for quantum information many-body calculations

  • -
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/1-Introduction/FockSpace.html b/pr-preview/pr-27/1-Introduction/FockSpace.html deleted file mode 100644 index f1b0cfc1..00000000 --- a/pr-preview/pr-27/1-Introduction/FockSpace.html +++ /dev/null @@ -1,752 +0,0 @@ - - - - - - - - - - - - - 5. Fock Space and Second Quantisation — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Fock Space and Second Quantisation

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

5. Fock Space and Second Quantisation#

-

When working with basis vectors using the occuppation number representation, we might -consider dropping the overall constraint \(\sum_{j=1}^L n_j = N\). This amounts to working in -a larger Hilbert space, which is known as the Fock space, and consists of the direct sum of -all physical (symmetrised or antisymmetrised) Hilbert spaces \(\mathbb{H}^{(N)}\) for -different particle numbers \(N\), going all the way from \(N=0\):

-
-\[\mathbb{H} = \bigoplus_{N=0}^{+\infty} \mathbb{H}^{(N)}\]
-

In the case of fermions and with a finite-dimensional single-particle Hilbert space -\(\mathbb{H}^{(1)} \cong \mathbb{C}^L\), the upper limit in the direct sum is \(N=L\), i.e. -there are no states with \(N > L\) and so the associated Hilbert spaces are zero-dimensional. -This direct sum furthermore also contains the case \(N=0\), which we have not discussed -before. In the previous subsection we started the construction of \(\mathbb{H}^{(N)}\) from a -given single particle Hilbert space \(\mathbb{H}^{(1)}\). When there are no particles in the -system, there is only a single state in which it can be, corresponding to having all -occupation numbers \(n_j = 0\) for all \(j\). Hence, for \(N=0\) particles, the Hilbert space -\(\mathbb{H}^{(0)}\) is spanned by a single state, which we typically denote as -\(\ket{\Omega}=\ket{0,0,\dots,0}\) and refer to as the vacuum state. Note that this vacuum -state is normalised, and is thus very different from an actual zero vector of the vector -space, which has norm zero.

-

The Fock space becomes a Hilbert space simply by incorporating the inner product from each -of its summands. States within the different summands of this direct sum are defined to be -orthogonal, i.e. \(\braket{\varphi^{(M)} \vert \psi^{(N)}}=0\) for all \(M\)-particle states -\(\ket{\varphi^{(M)}}\) and \(N\)-particle states \(\ket{\psi^{(N)}}\) with \(M \neq N\).

-

The main benefits of using the formalism of second quantisation are not about losing the -overall particle number constraint, but for working with operators, in particular to -describe (interacting) Hamiltonians. In first quantisation, we need to specify a Hamiltonian -given a particular number of particles, i.e.\ the number of particles is an external -parameter of the system. Using the Fock space, we can now define operators in such a way -that their action is immediately defined for states with an arbitrary number of particles, -including even states which are superpositions over different particle numbers.

-

Hereto, we first introduce operators that enable us to connect the different particle number -sectors, by creating (adding) or annihilating (removing) particles in the system. In -particular, we denote with \(\hat{a}_j^+\) the operator that adds a new particle in the mode -\(j\) in the system and with \(\hat{a}_j^-\) the operator that removes a particle that is in -mode \(j\) from the system. As it turns out that both operators are related via the adjoint, -i.e. \(\braket{\Phi| \hat{a}_j^+ \Psi} = \braket{\hat{a}_j^- \Phi | \Psi}\), we use the -simpler notation \(\hat{a}_j\) for the annihilation operator and \(\hat{a}_j^\dagger\) for the -creation operator. To construct these operators in a mathematically precise and -constructive way is actually somewhat tedious (but see -Wikipedia). -We just summarize their main properties. In particular, we want to have the property that -the (anti)symmetrized states satisfy

-
-\[\ket{j_1,j_2, \ldots, j_N} = \hat{a}_{j_1}^\dagger \hat{a}_{j_2}^\dagger \cdots -\hat{a}_{j_N}^\dagger\ket{\Omega}.\]
-

It is immediately clear that, because of the (anti)symmetry, this requires that

-
-\[[\hat{a}_i^\dagger, \hat{a}_j^\dagger] = 0\ (\text{bosons})\quad\text{or}\quad -\{\hat{a}_i^\dagger,\hat{a}_j^\dagger\} = 0\ (\text{fermions}).\]
-

From the normalisation of these states, it also follows that

-
-\[[\hat{a}_i, \hat{a}_j^\dagger] = \delta_{i,j}\ (\text{bosons})\quad\text{or}\quad -\{\hat{a}_i,\hat{a}_j^\dagger\} = \delta_{i,j}\ (\text{fermions}).\]
-

With respect to the normalized basis vectors, using the occupation representation, we have

-
-\[\ket{n_1, n_2, \ldots, n_L} = \frac{1}{\sqrt{n_1! n_2! \cdots n_L!}} -(\hat{a}_1^\dagger)^{n_1} (\hat{a}_2^\dagger)^{n_2} \cdots (\hat{a}_L^\dagger)^{n_L} -\ket{\Omega}\]
-

which can be summarized using

-
-\[\begin{split}\hat{a}_j \ket{n_1, n_2, \ldots, n_j, \ldots, n_L} &= (\pm 1)^{n_1 + n_2 + \ldots + n_{j-1}} \sqrt{n_j} \ket{n_1, n_2, \ldots, n_j - 1, \ldots, n_L},\\ -\hat{a}_j^\dagger \ket{n_1, n_2, \ldots, n_j, \ldots, n_L} &= (\pm 1)^{n_1 + n_2 + \ldots + n_{j-1}} \sqrt{n_j+1} \ket{n_1, n_2, \ldots, n_j + 1, \ldots, n_L}.\end{split}\]
-

It then follows easily that the operator \(\hat{n}_j = \hat{a}_j^\dagger \hat{a}_j\) satisfies

-
-\[\hat{n}_j \ket{n_1, n_2, \ldots, n_j, \ldots, n_L} = n_j \ket{n_1, n_2, \ldots, n_j, \ldots, n_L}\]
-

and thus measures the number of particles in mode \(j\). The operators \(\hat{n}_j\) are -referred to as number operators. The total number of particles can then be measured using

-
-\[\hat{N} = \sum_{j=1}^{L} \hat{n}_j\]
-

but the Fock space does of course contain states which are superpositions over different -particle numbers (and which are thus not eigenstates of \(\hat{N}\)).

-

Furthermore, by studying how single particle states \(\ket{j} \equiv \hat{a}_j^\dagger -\ket{\Omega}\) change under a change of single particle basis, or thus, a transformation to a -new set of modes, we can deduce how the associated creation and annihilation operators -transform. Suppose we have a different single-particle basis, which for clarity we label -with greek letters \(\kappa = 1,\ldots,L\). We then find

-
-\[\ket{\kappa} = \hat{a}_\kappa^\dagger \ket{\Omega} = \sum_{j} \ket{j} \braket{j\vert\kappa} -= \sum_{j} \braket{j\vert \kappa} \hat{a}_j^\dagger \ket{\Omega}\]
-

from which we obtain

-
-\[\hat{a}_\kappa^\dagger = \sum_{j} \braket{j\vert \kappa} \hat{a}_j^\dagger, -\qquad\hat{a}_\kappa = \sum_{j} \braket{\kappa\vert j} \hat{a}_j.\]
-

Note that the transformation matrix \(\braket{j \vert \kappa}\) between two orthonormal bases -correspond to a unitary matrix. These transformation rules will be employed often, for -example, to switch between a position and momentum space representation.

-
-

Note

-

The bosonic creation and annihilation operators are of course reminiscent from the operators -introduced for diagonalising the single particle harmonic oscillator model. Indeed, out of -the bosonic creation and annihilation operator associated to every mode \(j\) we can build two -Hermitian operators

-
-\[\hat{X}_j = \frac{1}{\sqrt{2}}(\hat{a}_j + \hat{a}_j^\dagger),\quad \hat{P}_j = -\frac{-\mathrm{i}}{\sqrt{2}}(\hat{a}_j - \hat{a}_j^\dagger)\]
-

which than satisfy the well known commutation relations \(\left[\hat{X}_j, \hat{P}_k\right] = -\mathrm{i} \delta_{j,k}\). In second quantisation, the Fock space of bosons built from a -single particle system with \(L\) modes can equivalently be thought of as a regular tensor -product space of \(L\) distinguishable quantum particles moving on the real line, or -technically, as \(\left(L^2(\mathbb{R})\right)^{\otimes L}\).

-
-
-

Note

-

For fermions, we can also construct Hermitian operators out of the creation and annihilation -operators, which we denote as

-
-\[\hat{\eta}^{(1)}_j = \frac{1}{\sqrt{2}}(\hat{a}_j + \hat{a}_j^\dagger),\quad -\hat{\eta}^{(2)}_j = \frac{-\mathrm{i}}{\sqrt{2}}(\hat{a}_j - \hat{a}_j^\dagger).\]
-

In this case, we find that they satisfy the anticommutation relation

-
-\[\{ \hat{\eta}^{(\alpha)}_j, \hat{\eta}^{(\beta)}_k \} = \delta_{\alpha,\beta} \delta_{j,k}\]
-

so that the \(\hat{\eta}^{(1)}\) type operators and \(\hat{\eta}^{(2)}\) type operators behave -similarly. In that case, one often uses a different notation by setting

-
-\[\hat{\chi}_{2j-1} = \hat{\eta}^{(1)}_j = \frac{1}{\sqrt{2}}(\hat{a}_j + -\hat{a}_j^\dagger),\quad \hat{\chi}_{2j} = \hat{\eta}^{(2)}_j = -\frac{-\mathrm{i}}{\sqrt{2}}(\hat{a}_j - \hat{a}_j^\dagger)\]
-

and thus \(\{\hat{\chi}_k, \hat{\chi}_l\} = \delta_{k,l}\) for all \(k, l = 1,\ldots, 2L\). -These Hermitian fermionic operators are referred to as Majorana operators.

-

Note furthermore that the Fock space of fermions built from a single particle system with -\(L\) modes looks remarkably like a system of \(L\) qubits, i.e. the tensor product -\((\mathbb{C}^2)^{\otimes L}\). While this is true for how the occupation number basis vectors -are labelled, one important fact is that the operators \(\hat{a}_j\) and \(\hat{a}_j^\dagger\) -should not be thought of as local operators that act nontrivially on the single site \(j\), -and as the identity elsewhere, since they do not mutually commute, but rather anticommute. -It is possible to map these fermionic creation and annihilation operators to ‘nonlocal’ -qubit operators using the -Jordan-Wigner transformation.

-
-

With these creation and annihilation operators, we can now represent general operators in a -way that does not depend on the precise number of particles in the system. The simplest case -are ‘single-particle’ operators, i.e. operators that were defined with respect to the -single-particle Hilbert space \(\mathbb{H}^{(1)}\). The easiest case are operators which are -are diagonal with respect to the chosen single-particle basis. In that case, every particle -one of the eigenmodes of the single-particle operator will give a contribution that equals -the associated eigenvalue. Hence, the many-body representation of such an operator is given -by

-
-\[\hat{O}^{(1)} = \sum_{j} \lambda_j \ket{j}\bra{j} \quad \rightarrow \quad \hat{O} = \sum_{j} -\lambda_j \hat{a}_j^\dagger \hat{a}_j.\]
-

However, we can easily transform away from the basis of eigenmodes to a general set of -modes, and then find

-
-\[\hat{O}^{(1)} = \sum_{j,k} O_{j,k} \ket{j}\bra{k} \quad \rightarrow \quad \hat{O} = -\sum_{j,k} O_{j,k} \hat{a}_j^\dagger \hat{a}_k.\]
-

Vice versa, if you are given an operator that only contains terms where every term contains -exactly one creation and one annilation operator, then it is especially easy to diagonalise -this operator, since one only needs to diagonalise the corresponding single-particle version -of the operator. When the Hamiltonian of the many-body system is of this form, the system is -said to be free or noninteracting.

-
-

Note

-

There is a larger class of operators that can easily be diagonalised, namely operators where -every term is quadratic in the creation and annihilation operators. This means that every -term contains either a creation and an annilation operator, or two creation operators, or -two annihilation operators. Such Hamiltonians are said to be quadratic or Gaussian, and can -be diagonalised using a -Bogoliubov transformation.

-
-

Similarly, there exist two-particle operators, in particular, typical interaction terms in -the Hamiltonian such as the Coulomb interaction between electrons. Such operators take the -form

-
-\[\hat{O}^{(2)} = \sum_{j,k,l,m} O_{j,k; l,m} \ket{j,k} \bra{l,m}\]
-

and can be translated to act on the full Fock space as

-
-\[\hat{O} = \sum_{j\leq k; l\leq m} O_{(j,k); (l,m)} \hat{a}_{j}^\dagger \hat{a}_k^\dagger -\hat{a}_m \hat{a}_l = \frac{1}{4} \sum_{j, k; l, m} O_{(j,k); (l,m)} \hat{a}_{j}^\dagger -\hat{a}_k^\dagger \hat{a}_m \hat{a}_l.\]
-

As soon as such type of operators are present in the Hamiltonian (which thus contain more -than two creation of annihilation operators), it becomes impossible to diagonalise the -Hamiltonian based on a simple calculation in the single-particle Hilbert space, and the -exponentially large many-body Hilbert space need to be considered.

-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/1-Introduction/ManyBody.html b/pr-preview/pr-27/1-Introduction/ManyBody.html deleted file mode 100644 index 1f0dae38..00000000 --- a/pr-preview/pr-27/1-Introduction/ManyBody.html +++ /dev/null @@ -1,871 +0,0 @@ - - - - - - - - - - - - - 4. The Hilbert Space of Many-Body Physics — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - -
- On this page -
- - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

The Hilbert Space of Many-Body Physics

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

4. The Hilbert Space of Many-Body Physics#

-

All of the previous axioms remain valid for a composite system consisting of several quantum -degrees of freedom. However, we need to know how to describe the state of the system, and -thus more specifically, how to define the Hilbert space associated to such a system. It -turns out that quantum mechanics forces us to distinguish two cases.

-
-

4.1. Distinguisable Particles and Tensor Products#

-

Consider a quantum system composed out of two subsystems, which we call \(A\) and \(B\), -sometimes referred to as Alice and Bob in quantum information contexts. These can themselves -already be many-body systems. Suppose we know the Hilbert space \(\mathbb{H}^A\) in which to -describe states of subsystem \(A\) when considered as an isolated system on itself, and -analoguously for \(\mathbb{H}^B\). Now consider both systems together, but where they do not -interact, so that we can still treat them independently. In particular, we can prepare -subsystem \(A\) in a state \(\ket{\psi^A}\) and subsystem \(B\) in a state \(\ket{\psi^B}\). We -should also be able to describe these two independent subsystems jointly, so that there must -exist a map from the two arguments \((\ket{\psi^A}, \ket{\varphi^B}) \in \mathbb{H}^A \times -\mathbb{H}^B\) to a single state which we denote as \(\ket{ \psi^A} \otimes \ket{\varphi^B}\) -and that lives in a joint Hilbert space \(\mathbb{H}^{AB}\) that we have yet to determine.

-

Now, it makes sense that, if we build superpositions in one of the two subsystems, while -keeping the other fixed, this also correspond to a superposition in the joint description of -both systems together. This leads to

-
-\[\left (a_1 \ket{\psi^A_1} + a_2 \ket{\psi^A_2}\right) \otimes \ket{\varphi^B} = a_1 -\ket{\psi^A_1 }\otimes \ket{\varphi^B} + a_2 \ket{\psi^A_1 }\otimes \ket{\varphi^B}\]
-

and similarly

-
-\[\ket{\psi^A} \otimes \left(b_1 \ket{\varphi^B_1} + b_2 \ket{\varphi^A_2}\right) = b_1 -\ket{\psi^A }\otimes \ket{\varphi^B_1} + b_2 \ket{\psi^A }\otimes \ket{\varphi^B_2}.\]
-

Hence, the Hilbert space \(\mathbb{H}^{AB}\) that we are trying to construct must contain all -states \(\ket{\psi^A} \otimes \ket{\varphi^B}\) for all \(\ket{\psi^A} \in \mathbb{H}^A\) and -all \(\ket{\varphi^B} \in \mathbb{H}^B\), all possible linear combinations thereof (in order -to be a vector space), but in such a way that the above equalities hold. This construction, -which can be made mathematically precise, is known as the tensor product of vector spaces -\(\mathbb{H}^{AB} = \mathbb{H}^A \otimes \mathbb{H}^B\).

-

We have also denoted the output of the map from two states \((\ket{\psi^A}, \ket{\varphi^B}) -\in \mathbb{H}^A \times \mathbb{H}^B\) to \(\mathbb{H}^A \otimes \mathbb{H}^B\) using the same -tensor product symbol, and refer to such a state as a (tensor) product state \(\ket{ \psi^A} -\otimes \ket{\varphi^B}\). Importantly, however, the tensor product space \(\mathbb{H}^A -\otimes \mathbb{H}^B\) certainly contains vectors which are not product states, such as

-
-\[a_1 \ket{ \psi_1^A} \otimes \ket{\varphi_1^B} + a_2 \ket{ \psi_2^A} \otimes -\ket{\varphi_2^B}.\]
-

This forms the basis for quantum correlations and the concept of (quantum) entanglement, -which will be a fundamental property of quantum many-body systems. That the Hilbert space of -a composite system is given by the tensor product of the individual Hilbert spaces is often -introduced as a separate axiom. The deductive (but informal) argument just given can however -be turned into a proof that depends only on the axioms given above (in fact only on the -first two).

-

As expected (and required), it can be shown that the tensor product of two Hilbert spaces is -again a Hilbert space, if we define its inner product in the following way. We first define -the inner product for product states as

-
-\[\braket{\psi_1^A \otimes \varphi_1^B | \psi_2^A \otimes \varphi_2^B } = \braket{\psi_1^A | -\psi_2^A} \braket{\varphi_1^B | \varphi_2^B}\]
-

and then extend this definition by linearity (in the second argument and antilinearity in -the first argument).

-

In practice, given two finite-dimensional Hilbert spaces \(\mathbb{H}^A \cong -\mathbb{C}^{d^A}\) and \(\mathbb{H}^B \cong \mathbb{C}^{d^B}\) with a basis \(\{ \ket{j}, -j=1,\dots, d^A\}\) and \(\{\ket{k}, k=1,\dots, d^B\}\), the tensor product space is spanned by -a basis composed of all products

-
-\[\{ \ket{j,k} = \ket{j} \otimes \ket{k}, j=1,\dots, d^A, k=1,\dots, d^B\}\]
-

and thus has dimension \(d^A \cdot d^B\). A general state \(\ket{\Psi} \in -\mathbb{H}^{A}\otimes \mathbb{H}^B\) can then be expanded as

-
-\[\ket{\Psi} = \sum_{j=1}^{d^A }\sum_{k=1}^{d^B} \Psi_{jk} \ket{j,k}\]
-

The expansion coefficients \(\Psi_{jk}\) thus have two indices, and it is often useful to -think of them as a matrix. Note that we will almost always use this product basis, also -referred to as the computational basis, for working with tensor product spaces. However, -one can certainly also use more complicated basis choices, where the basis vectors are not -simple product states. One well known choice that you might remember from your quantum -mechanics course is in the case of two spin-1/2 systems. If we denote the basis for a single -spin-1/2 system as \(\{\ket{\uparrow},\ket{\downarrow}\}\), then the product basis for a -system consisting of two spin-1/2 systems is given by \(\{\ket{\uparrow,\uparrow}, -\ket{\downarrow,\uparrow}, \ket{\uparrow,\downarrow}, \ket{\downarrow,\downarrow}, \}\). -However, in the context of spin coupling (see Section on Symmetries), one also uses the -coupled basis

-
-\[\begin{split}\ket{0,0} &= \frac{1}{\sqrt{2}} \left(\ket{\uparrow,\downarrow} - \ket{\downarrow,\uparrow}\right)\\ -\ket{1,+1} &= \ket{\uparrow,\uparrow}\\ -\ket{1,0} &= \frac{1}{\sqrt{2}} \left(\ket{\uparrow,\downarrow} + \ket{\downarrow,\uparrow}\right)\\ -\ket{1,-1} &= \ket{\downarrow,\downarrow}\end{split}\]
-

Note that we also use the same tensor product notation as an operation to map operators from -the subsystems into operators acting on the full tensor product Hilbert space. In -particular, the process of measuring operator \(\hat{A}\) in subsystem \(A\) and simultaneously -operator \(\hat{B}\) in subsystem \(B\) is associated with an operator \(\hat{A}\otimes \hat{B}\) -acting on \(\mathbb{H}^A \otimes \mathbb{H}^B\), the action of which is first defined on the -product states as

-
-\[\left(\hat{A} \otimes \hat{B}\right) \left(\ket{\psi^A}\otimes \ket{\varphi^B}\right) = \left(\hat{A}\ket{\psi^A}\right) \otimes \left(\hat{B}\ket{\varphi^B}\right)\]
-

and then extended by linearity. It furthermore holds that

-
-\[(\hat{A}_1 \otimes \hat{B}_1) (\hat{A}_2 \otimes \hat{B}_2) = (\hat{A}_1 \hat{A}_2) \otimes (\hat{B}_1 \hat{B}_2).\]
-

With respect to a product basis, the matrix representation of \(\left(\hat{A} \otimes -\hat{B}\right)\) is given by the -Kronecker product.

-

When we are only interested in an operator \(\hat{O}\) acting on subsystem \(A\) without doing -anything on subsystem \(B\), we should create the operator \(\hat{O} \otimes \hat{1}_B\), with -\(\hat{1}_B\) the identity operator of the Hilbert space \(\mathbb{H}^B\). Often, we will omit -this explicit tensor product with the identity operator, and simply use some notation which -indicates that an operator acts on a certain subsystem, such as \(\hat{O}^{(A)} = \hat{O} -\otimes \hat{1}_B\). This also makes it explicit that operators defined on different -subsystems, when lifted to act on the full Hilbert space, commute, i.e.

-
-\[\left[\hat{O}_1^{(A)} , \hat{O}_2^{(B)}\right] = -\left[ \hat{O}_1 \otimes \hat{1}_B, \hat{1}_A \otimes \hat{O}_2\right] = 0.\]
-

The tensor product construction extends readily to systems with multiple subsystems. -Consider for example a system consisting of qubits, where every individual qubit has an -associated Hilbert space \(\mathbb{C}^2\) with basis denoted as \(\{\ket{0},\ket{1}\}\). The -Hilbert space \(\mathbb{H}^N\) of \(N\) qubits is then spanned by a computational basis which we -can denote as

-
-\[\{\ket{s_1, s_2, \ldots, s_N} = \ket{s_1} \otimes \ket{s_2} \otimes \cdots \otimes -\ket{s_N}; s_1 =0,1; s_2 =0,1; \ldots; s_n =0,1\}.\]
-

Hence, the Hilbert space thus has dimension \(2^N\), and a general state \(\ket{\Psi}\) has -expansion coefficients

-
-\[\Psi_{s_1,s_2, \ldots, s_N}\]
-

which can be interpreted as a single vector of length \(2^N\), or as a \(N\)-dimensional tensor, -where every tensor index ranges over the two values 0 and 1. This exponential increase of -the Hilbert space dimension with the number of particles is exactly why the quantum -many-body problem is so difficult, but also essential for providing a quantum computer with -its speed-up. It is exactly these type of quantum states living in a many-body Hilbert -space, which is thus composed of many tensor product factors, that we will represent as a -tensor network.

-

Finally, we also have to specify the Hamiltonian of a many-body system. It typically takes -the form of a sum of terms, where every individual term acts nontrivially on only a few -subsystems. One important example that will reappear throughout these tutorials is the -“Quantum Ising Model with transverse magnetic field”, which acts on a system composed of -qubits or spin-1/2 particles, and is defined as

-
-\[\hat{H} = - J \sum_{\langle i, j \rangle} \sigma^z_i \otimes \sigma^z_j - h \sum_i -\sigma^x_i\]
-

Here, the summation variables \(i\) and \(j\) correspond to the sites of a lattice. The notation -\(\sum_{\langle i,j \rangle}\) denotes a sum over pairs of neighbouring lattice sites \(i\) and -\(j\). The second sum contains terms \(\sigma^x_i\) which act nontrivially only on the site \(i\), -and as the identity operator elsewhere. If, for example, we enumerate the sites from \(1\) to -\(N\), it would act as

-
-\[\sigma^x_i = \underbrace{1 \otimes 1 \otimes \ldots \otimes 1}_{\text{$i-1$ factors}} \otimes \sigma^x \otimes \underbrace{1 \otimes \ldots \otimes 1}_{\text{$N-i-1$ factors}}\]
-

with \(\sigma^x = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\) the Pauli x matrix, and \(1\) -the \(2 x 2\) unit matrix. The first set of terms in \(\hat{H}\) acts nontrivially on two sites, -and is defined analoguously, using the Pauli z matrices \(\sigma^z = \begin{bmatrix} 1 & 0 \\ -0 & -1 \end{bmatrix}\).

-
-
-

4.2. Identical Particles and Pauli’s Exclusion Principle#

-

The tensor product construction needs to be revised when discussing the Hilbert space of a -system composed of identical particles. Consider for example a system made out of \(N\) -identical particles. To every individual particle we can associate a particular Hilbert -space, which we denote as \(\mathbb{H}^{(1)}\), for example \(\mathbb{H}^{(1)} = -L^2(\mathbb{R})\) for a particle moving on the real line, or \(\mathbb{H}^{(1)} = -\mathbb{C}^L\) for a particle living on the sites of a chain of length \(L\).

-

If we temporarily assign each of the \(N\) particles a label \(n=1, \dots, N\), then the Hilbert -space of the composite system would be given by the \(N\)-fold tensor product -\(\widetilde{\mathbb{H}}^{(N)} = \left(\mathbb{H}^{(1)}\right)^{\otimes N}\). However, for -identical particles, our labeling is completely arbitrary. For the case of \(N=2\) particles -on a chain of \(L\) sites, we cannot distinguish between the state \(\ket{j_1, j_2}\) where -particle \(1\) is on site \(j_1\) and particle \(2\) is on site \(j_2\) versus the state \(\ket{j_2, -j_1}\) where site \(j_1\) is occupied by the particle that we gave label \(2\) and site \(j_2\) is -occupied by the particle with label \(1\). A general redefinition of the particle labels -amounts to a permutation, and we have to require that no physical measurement can -distinguish between such permutations. Hence, this permutation invariance does not behave -like a regular symmetry (like e.g. rotation symmetry, one can still construct observables -along preferred directions such that they can detect rotations).

-

We are forced to restrict our tensor product Hilbert space -\(\left(\mathbb{H}^{(1)}\right)^{\otimes N}\) to the subspace \(\mathbb{H}^{(N)}\) of physical -states which are not affected by acting with such permutations. Note that, due to the fact -that quantum states actually correspond to rays of vectors, it is still allowed that the -vectors in \(\mathbb{H}^{(N)}\) pick up a phase factor when applying certain permutations. It -is a result in the representation theory of the permutation group that there are only two -possibilities. Either the phase factor is always absent (or thus 1), or the phase factor is -(-1) for odd permutations and (+1) for even permutations, i.e. the phase factor equals the -sign(ature) of the permutation. Identical particles for which the phase factor is always one -are known as bosons, whereas those with the nontrival phase factor choice correspond to -fermions. Indeed, the nontrivial phase factor automatically gives rise to Pauli’s -exclusion principle: two fermions cannot be in the same quantum state, since \(P_{12} -\ket{j_1,j_2} = \ket{j_2,j_1} = -\ket{j_1,j_2}\) and for \(j_1=j_2\) we would thus find -\(\ket{j,j} = -\ket{j,j}\).

-

Bosons are thus described by states which are symmetric under permutations, whereas fermions -are described by states which are called antisymmetric. We can define an operator on -\(\tilde{\mathbb{H}}^{(N)} = \left(\mathbb{H}^{(1)}\right)^{\otimes N}\) that maps any given -state onto such a (anti)symmeric state, namely by first defining its action on product -states as

-
-\[\hat{S}^{\pm} \ket{\psi_1} \otimes \ket{\psi_2} \otimes \cdots \otimes \ket{\psi_N} = -\frac{1}{\sqrt{N!}} \sum_{\sigma \in S_N} \epsilon_\sigma \ket{\psi_{\sigma(1)}} \otimes -\ket{\psi_{\sigma(2)}} \otimes \cdots \otimes \ket{\psi_{\sigma(N)}}\]
-

and then extending it by linearity. Here, \(S_N\) is the symmetric group containing all -permutations \(\sigma\) of \(N\) elements, where the permutation \(\sigma\) is a bijective map -from integers \(j \in \{1,\dots,N\}\) to a new number \(\sigma(j) \in \{1,\dots,N\}\). The -sign(ature) \(\epsilon_\sigma\) of the permutation takes the value \(+1\) or \(-1\), depending on -whether the permutation \(\sigma\) can be obtained by composing an even or odd number of -elementary transpositions. An elementary transposition \(\tau_{i,j}\) is a permutation which -only interchanges the two numbers \(i\) and \(j \neq i\):

-
-\[\tau_{i,j}(i) =j, \tau_{i,j}(j) = i, \tau_{i,j}(k) =k, \forall k\neq i \land k \neq j\]
-

Note that \(\hat{S}^{\pm}\) does not necessarily yield a normalised state, and can indeed even -map a state to zero, in order to give rise to Pauli’s exclusion principle: -\(\hat{S}^-\ket{j,j} = 0\). The image of \(\hat{S}^{\pm}\) contains all states with the proper -behaviour under relabeling permutations, and thus correspond to the physical Hilbert space -for bosons or fermions:

-
-\[\mathbb{H}^{(N)} = \hat{S}^{\pm} \widetilde{\mathbb{H}}^{(N)} = \hat{S}^{\pm} \left(\mathbb{H}^{(1)}\right)^{\otimes N}\]
-

Note that in this case, the physical Hilbert space is not a tensor product. However, we can -think of it as a subspace of an auxiliary Hilbert space, \( \widetilde{\mathbb{H}}^{(N)}\), -which is a tensor product. The restriction to this subspace can thus be thought of as a -constraint, and the same scenario happens in other constrained quantum systems. The most -notable example is that of quantum gauge theories, where there is an extensive set of -constraints, namely that physical quantum states need to be gauge invariant.

-

Now consider a single particle Hilbert space \(\mathbb{H}^{(1)}\) with an orthonormal basis -\(\{\ket{j}, j=1,\ldots,L\}\), for example where \(\ket{j}\) corresponds to the particle being -positioned on site \(j\) of a lattice with \(L\) sites. We also refer to these single particle -states as modes. To construct a basis for \(\mathbb{H}^{(N)}\), we can start from the tensor -product basis of \(\widetilde{\mathbb{H}}^{(N)}\) and apply \(\hat{S}^{\pm}\) to each of its -\(L^N\) elements. Let us henceforth denote these states as

-
-\[\ket{j_1,j_2,\ldots ,j_N} = \hat{S}^{\pm} \left(\ket{j_1} \otimes \ket{j_2} \otimes \cdots -\otimes \ket{j_N}\right)\]
-

The application of \(\hat{S}^{\pm}\) will create certain linear dependences. In particular, -states \( \ket{j_1,j_2, \ldots, j_N}\) that contain the same set of modes \(j_k\), i.e. for -which the \(j_k\)’s are related by a permutation, are equal (up to a sign in the case of -\(\hat{S}^-\)). We can thus select a single state by ordering the \(j_k\) arguments. -Furthermore, in the case of \(\hat{S}^{-}\), the state is mapped to zero as soon as two \(j_k\) -values coincide, so we can eliminate such states. If we thus restrict the set to states -\(\ket{j_1,j_2,\ldots ,j_N}\) which are such that the modes are ordered as \(j_1 < j_2 < \ldots -< j_N\) (for fermions) or \(j_1 \leq j_2 \leq \ldots \leq j_N\) (for bosons), then we have a -linearly independent set of states. For fermions, this implies in particular that we need to -have \(N \leq L\), there cannot be more fermions in the system then there are linearly -independent modes (single particle states).

-

Finally, one can wonder about the normalisation of these states. For fermions, the -superposition created by \(\hat{S}^-\) contains \(N!\) terms, which are mutually orthogonal, so -that the resulting state is normalised, because of the \(1/\sqrt{N!}\) prefactor in the -definition of \(\hat{S}^{-}\). More generally, one then finds

-
-\[\braket{i_1 < i_2 < \ldots < i_N | j_1 < j_2 < \ldots < j_N} = \delta_{i_1,j_1} -\delta_{i_2,j_2} \cdots \delta_{i_N,j_N}\]
-

For bosons, the situation is more complicated in the case that some \(j_k\) values coincide. -Some of the \(N!\) terms created by \(\hat{S}^+\) are then equal and contribute differently to -the norm. If we denote with \(n_1, n_2, \ldots, n_L\) the number of \(j\) values that equal the -value \(1, 2, \ldots, L\), i.e. the number of particles in mode \(1, 2, \ldots, L\), then we -find

-
-\[\braket{i_1 \leq i_2 \leq \ldots \leq i_N | j_1 \leq j_2 \leq \ldots \leq j_N} = (n_1! n_2! -\cdots n_L!) \delta_{i_1,j_1} \delta_{i_2,j_2} \cdots \delta_{i_N,j_N}\]
-

This more general exprression is also valid for fermions, where every \(n_j\) is restricted to -be zero or one. In fact, the values \(n_j\) for \(j=1,\ldots,L\) completely characterise the -state, and can thus be used to relabel the basis. Instead of specifying the mode \(j_k\) that -each particle \(k=1,\ldots,N\) occupies (where the labeling of the particles is arbitrary -because they are identical), we can move to a mode-based description and thus specify the -number of particles in each mode, also known as the mode occupation number. We can then -refer to the basis vectors as

-
-\[\ket{n_1, n_2, \ldots, n_L}\]
-

where \(n_j = 0, 1\) (fermions) or \(n_j = 0,1,2, \ldots \) (bosons) and furthermore -\(\sum_{j=1}^{L} n_j = N\). Furthermore, we define these states to be normalised to 1, i.e. we -absorb a suitable normalisation factor when defining \(\ket{n_1, n_2, \ldots, n_L}\) in terms -of the construction above.

-

This way of labelling the basis states now is again reminiscent of a tensor product -structure, i.e. we could think of \(\ket{n_1, n_2, \ldots, n_L}\) as the tensor product of -states \(\ket{n_j}\) associated to every mode, and where the Hilbert space associated with -such a mode is two-dimensional in the case of fermions, or infinite-dimensional in the case -of bosons. However, there is still a global constraint \(\sum_{j=1}^{L} n_j = N\) so that we -cannot let the different \(n_j\) values vary completely independently from each other. -Furthermore, some caution is now needed as to what it means to have operators acting on -these different “mode Hilbert spaces”. The correct formalism is that of second quantisation, -which we introduce next.

-
-

Note

-

In many applications, people do still work with the framework of first quantisation, and -consider \(N\)-particle states constructed by symmetrising or antisymmetrising the tensor -product of \(N\) single-particle states, in a so-called independent particle model or -approximation. Such states are quite cumbersome to work with. As can already be seen, the -antisymmetric case is slightly easier and is known as a Slater determinant. Indeed, the -antisymmetrisation formula is reminiscent of the Leibniz formula of a determinant, and for -example the inner product between two Slater determinants constructed from -\(\{\ket{\psi_n},n=1,\ldots,N\}\) and \(\{\ket{\varphi_n},n=1,\ldots,N\}\) is given by the -determinant of the matrix containing all overlaps \(\braket{\varphi_m \vert \psi_n}\). Slater -determinants form the basis of Hartree-Fock theory for approximating the state of electrons -in an atom or molecule.

-

The bosonic version occurs in the context of Bose-Einstein condensation and cold atom -systems more generally. In that case, the inner product between two such states gives rise -to a determinant-like formula, but without the minus signs. This construction is known as -the permenant, but unlike the determinant it is very hard to compute in general and really -requires to explicitly sum up all \(N!\) terms.

-
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/1-Introduction/Observables.html b/pr-preview/pr-27/1-Introduction/Observables.html deleted file mode 100644 index bfd84eab..00000000 --- a/pr-preview/pr-27/1-Introduction/Observables.html +++ /dev/null @@ -1,1082 +0,0 @@ - - - - - - - - - - - - - 6. Interesting States and Observables in Quantum Many-Body Physics — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Interesting States and Observables in Quantum Many-Body Physics

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

6. Interesting States and Observables in Quantum Many-Body Physics#

-

Having introduced the Hilbert space and Hamiltonian of quantum many-body systems, we still -need to define which states we are actually interested in, and which type of observables we -want to compute for such states. So far, we have only mentioned that isolated systems have a -quantum state which corresponds to a vector (or rather a ray of vectors) in its Hilbert -space \(\mathbb{H}\). Before answering this question, we first need to generalize our concept -of a quantum state.

-
-

6.1. Quantum States Revisited#

-

More abstractly and generally, the quantum state of a system can be introduced as a map from -observables (operators) to numbers (expectation values). This is typically denoted as \(\rho: -\mathrm{End}(\mathbb{H}) \mapsto \mathbb{C}:\hat{A} \to \hat{A}\). Here, -\(\mathrm{End}(\mathbb{H})\) is the set of linear operators (a.k.a endomorphisms) on -\(\mathbb{H}\). This set is itself a vector space, as we can consider linear combinations of -linear operators. Furthermore, as we can compose two linear operators and obtain a new -linear operator, we have a product operation, which makes \(\mathrm{End}(\mathbb{H})\) into an -algebra. Finally, we have defined the concept of the adjoint of an operator, which in -mathematics terminology gives \(\mathrm{End}(\mathbb{H})\) the structure of a -\(C^\ast\)-algebra.

-

The map \(\rho\) that represents a quantum state should have a number of properties, that -generalise those of the case we have encountered so far, where \(\rho(\hat{A}) = -\frac{\braket{\Psi\vert \hat{A} \vert \Psi}}{\braket{\Psi | \Psi}}\). In particular, this map -is linear with respect to linear combinations of operators. This implies that it can be -written as \(\rho(\hat{A}) = \mathrm{Tr}\left[\hat{\rho}\hat{A}\right]\), where \(\hat{\rho}\) -is now itself an element of \(\mathrm{End}(\mathbb{H})\) (technically, \(\rho\) is an element -from the dual space of \(\mathrm{End}(\mathbb{H})\)). Furthermore, we must have that our state -gives rise to nonnegative and normalised probabilities, which implies that

-
    -
  • \(\rho(\hat{1}) = \mathrm{Tr}\left[\hat{\rho}\right] = 1\)

  • -
  • \(\rho(\hat{P}) \geq 0\) for any projector, and more generally, for any positive definite -operator \(\hat{P}\). This implies that the associated operator \(\hat{\rho}\), known as the -density operator or density matrix (when expressed with respect to a chosen basis), -is itself a positive (and thus self-adjoint) operator, which is furthermore normalised -to have trace one.

  • -
-

The particular case where the state of the system was given by a vector -\(\ket{\Psi}\in\mathbb{H}\) corresponds to -\(\hat{\rho}=\frac{\ket{\Psi}\bra{\Psi}}{\braket{\Psi\vert \Psi}}\) and thus satisfies -\(\hat{\rho}^2=\hat{\rho}\), i.e. \(\hat{\rho}\) is itself a projector. Such states are called -pure states. All density operators which do not have this property are called mixed -states.

-

Being positive definite operators, any density operator admits a spectral decomposition of -the form

-
-\[\hat{\rho} = \sum_{n} p_n \ket{\Phi_n}\bra{\Phi_n}\]
-

where the states \(\{\ket{\Phi_n}\}\) form an orthonormal set and the eigenvalues \(p_n\) -satisfy \(\sum_{n} p_n =1 \) and \(p_n \geq 0\) (which together also yields \(p_n < 1\)).

-

Mixed states arise in the quantum world in two scenarios:

-
    -
  1. If the system is not isolated, but is rather a subsystem of a larger system and -interacting with its complement therein. This is discussed in the next section.

  2. -
  3. Even for an isolated system, it can happen that the state is not exactly known and one -must deal with classical uncertaintity and probability. Indeed, a mixed state can be -interpreted as a statistical ensemble. If the system can be prepared into different (not -necessarily orthogonal) states \(\{\ket{\Psi_1}, \ket{\Psi_2}, \ldots\}\) with -probabilities \(p_1, p_2, \ldots\) that sum up to one, then the state of the system is -given by

    -
    -\[\hat{\rho} = p_1 \ket{\Psi_1}\bra{\Psi_1} + p_2 \ket{\Psi_2}\bra{\Psi_2} + -\ldots\]
    -
  4. -
-

Note that this does not necessarily correspond to the spectral decomposition of -\(\hat{\rho}\), as the states \(\ket{\Psi_i}\) are not necessarily orthogonal. It is nonetheless -a valid density operator. More generally, given two density operator \(\hat{\rho}_1\) and -\(\hat{\rho}_2\), aany convex combination \(\hat{\rho} = p \hat{\rho}_1 + (1-p) \hat{\rho}_2\) -with thus \(0 \leq p \leq 1\) is a valid density operator.

-

To a mixed state, we can associate the Von Neumann entropy

-
-\[S(\hat{\rho}) = - \mathrm{Tr}\left[\hat{\rho}\log \hat{\rho}\right] = - \sum_{n} p_n \log(p_n)\]
-

with \(p_n\) the eigenvalues of \(\hat{\rho}\). For a pure state, the Von Neumann entropy -evaluates to zero (using \(\lim_{x\to 0} x \log x = 0\)). The maximal value of the Von Neumann -entropy is obtained when all values \(p_n\) are equal so that \(\hat{\rho} \sim \hat{1}\). -Because of normalisation, we then have \(p_n = 1/d\) with \(d\) the Hilbert space dimension and -thus obtain

-
-\[0 \leq S(\hat{\rho}) \leq \log d.\]
-

In a many-body system, the Hilbert space dimension scales exponentially with the number of -sites or number of degrees of freedom in the system. If we call this quantity the “volume” -of the system, than we can conclude that the maximal value of the Von Neumann entropy is -thus proportional to the volume of the system.

-

Depending on the context, the interpretation and meaning of the Von Neumann entropy can -differ, as we discuss below.

-
-
-

6.2. From Tensor Products to Mixed States and Entanglement#

-

Consider a bipartite system composed of two subsystems \(A\) and \(B\), with thus \(\mathbb{H} = -\mathbb{H}^{(A)} \otimes \mathbb{H}^{(B)}\). Now suppose that we are only interested in -measuring observables that act non-trivially on subsystem \(A\). This might be the case if -subsystem \(A\) is the actual quantum system that we want to model, but it is not isolated and -instead interacting with an environment, corresponding to subsystem \(B\). With the axioms so -far, we are forced to include the environment into our discussion. Only the combined system

-
    -
  • environment can be assigned a pure state \(\ket{\Psi}\). However, this seems complete -overkill, as the environment might extend the whole universe and so it will be impossible to -know the complete state \(\ket{\Psi}\). Since we are only interested in observables that act -nontrivially on the system \(A\), i.e. all observables that we want to measure take the form -\(\hat{O}^A = \hat{O} \otimes \hat{1}_B\), and thus we expect that a reduced and simplified -description must exist.

  • -
-

Let us now assume that the Hilbert space of subsystem \(A\) is spanned by a basis -\(\{\ket{\psi_k}, k=1,\dots, d^A\}\) and the Hilbert space of subsystem \(B\) is spanned by a -basis \(\{\ket{\varphi_l}, l=1,\ldots, d^B\}\). A reduced description for the system \(A\) can -be obtained by observing that we can write

-
-\[\begin{split}\braket{\Psi \vert \hat{O}^A \vert \Psi} &= \mathrm{Tr}\left[\hat{O} \otimes \hat{1}_B \ket{\Psi} \bra{\Psi}\right]\\ -&= \sum_{k = 1}^{d^A}\sum_{l = 1}^{d^B} \left(\bra{\psi_k} \otimes \bra{\varphi_l}\right) \left(\hat{O} \otimes \hat{1}_B\right) \ket{\Psi}\bra{\Psi}\left(\ket{\psi_k} \otimes \ket{\varphi_l}\right)\\ -&= \sum_{k = 1}^{d^A}] \bra{\psi_k} \hat{O} \left[ \sum_{l=1}^{d^B} \bra{\varphi_l} \ket{\Psi} \bra{\Psi} \ket{\varphi_l}\right] \ket{\psi_k}\\ -&= \mathrm{Tr}_A \left[\hat{O} \mathrm{Tr}_B\left(\ket{\Psi}\bra{\Psi} \right)\right]\\ -&= \mathrm{Tr}\left[\hat{O} \hat{\rho}^{(A)}\right]\end{split}\]
-

Hence, subsystem \(A\) an be described in terms of a mixed state that is obtained as

-
-\[\hat{\rho}^A = \mathrm{Tr}_B \ket{\Psi}\bra{\Psi} = \sum_{l=1}^{d^B} \bra{\varphi_l} -\ket{\Psi} \bra{\Psi} \ket{\varphi_l}\]
-

This construction is known as a partial trace and the resulting mixed state of subsystem -\(A\) as the reduced density operator. It is based on the fact that by using a tensor -product basis for the joint Hilbert space \(\mathbb{H} = \mathbb{H}^{(A)} \otimes -\mathbb{H}^{(B)}\), a trace operation leads to a double sum, namely one over all basis -vectors for \(\mathbb{H}^A\) and one over all basis vectors for \(\mathbb{H}^B\). Hence, the -complete trace can be interpreted as the composition of two partial traces, one over -subsystem \(A\) and one over subsystem \(B\). If all relevant operators act trivially on \(B\), -the partial trace over \(B\) can be performed directly on the state \(\hat{\rho}^{(AB)} = -\ket{\Psi}\bra{\Psi}\) and gives rise to the reduced density matrix \(\hat{\rho}^{(A)}\). Some -notes are in order.

-
    -
  • While we made reference to a specific tensor product basis to define this construction, -the concepts of reduced density operator and partial trace do not depend on the specific -choice of basis for \(\mathbb{H}^{(A)}\) and \(\mathbb{H}^{(B)}\). The construction only -requires a tensor product basis to expose the tensor product structure of \(\mathbb{H}\).

  • -
  • While we have assumed that the total system is described by a pure state -\(\hat{\rho}^{(AB)} = \ket{\Psi}\bra{\Psi}\). However, for the construction of the reduced -density opeator as \(\hat{\rho}^{(A)} = \mathrm{Tr}_B \hat{\rho}^{(AB)}\) this is not -necessary.

  • -
  • With can expand the whole construction with respect to an explicitly chosen basis. If -\(\ket{\Psi} = \sum_{k=1}^{d^A} \sum_{l=1}^{d^B} \Psi_{k,l} \ket{k}\otimes \ket{l}\), we -find

    -
    -\[\hat{\rho}^{(AB)} = \sum_{k,k'=1}^{d^A} \sum_{l,l'=1}^{d^B} \Psi_{k,l} \Psi_{k',l'}^\ast -\left(\ket{k}\otimes \ket{l}\right) \left(\bra{k'}\otimes \bra{l'}\right)\]
    -

    and

    -
    -\[\hat{\rho}^{(A)} = \sum_{k,k'=1}^{d^A} \sum_{l=1}^{d^B} \Psi_{k,l} \Psi_{k',l}^\ast -\ket{k}\bra{k'}\]
    -
  • -
-

If the reduced density operator \(\hat{\rho}^A\) is pure, this indicates that the state -\(\ket{\Psi}\) was itself a tensor product. In all other cases, the subsystems \(A\) and \(B\) are -said to be entangled. This entanglement can be quantified by computing the Von Neumann -entropy \(S(\hat{\rho}^A)\), which is then called the entanglement entropy of the combined -system \(A\) and \(B\). Indeed, that this entropy is a property of how both subsystems are -entangled follows from the fact that \(S(\hat{\rho}^A) = S(\hat{\rho}^B)\), i.e.\ it doesn’t -matter whether the Von Neumann entropy of the reduced density operator of subsystem \(A\) or -of subsystem \(B\) is computed. This is only true if the total system is in a pure state -\(\ket{\Psi}\). When also the total system is in a mixed state, because of classical -randomness, then it is harder to differentiate between true quantum entanglement and -classical probability.

-

To conclude, we analyze the case where the combined system is in a pure state a bit more. -If we again expand \(\ket{\Psi}\) with respect to the tensor product basis as

-
-\[\ket{\Psi} = \sum_{k=1}^{d^A} \sum_{l=1}^{d^B} \Psi_{k,l} \ket{k}\otimes \ket{l}\]
-

and interpret its expansion coefficients \(\Psi_{k,l}\) as the entries of a \(d^A \times d^B\) -matrix \(C\). The reduced density operators can now be written as

-
-\[\hat{\rho}^A = \sum_{k,k'=1}^{d^A} [C C^\dagger]_{k,k'} \ket{k}\bra{k'}\quad -\text{and}\quad\hat{\rho}^A = \sum_{k,k'=1}^{d^A} [C^\dagger C]_{l,l'} \ket{l}\bra{l'}\]
-

Hence, the reduced density matrices for subsystems \(A\) and \(B\) are related by the fact that -they correspond to the two different ways in which we can multiply the matrix \(C\) with its -Hermitian conjugate \(C^\dagger\). It is a well-known result from linear algebra that for two -matrices \(A \in \mathbb{C}^{d_1 \times d_2}\) and \(B \in \mathbb{C}^{d_2 \times d_1}\), the -square matrices \(A B \in \mathbb{C}^{d_1 \times d_1}\) and \(BA \in \mathbb{C}^{d_2 \times -d_2}\) have the same set of nonzero eigenvalues, counted with degeneracy. If \(d_1 \neq d_2\), -the larger of the two matrices will have additional eigenvalues zero. This result already -proofs the equality \(S(\hat{\rho}^{(A)}) = S(\hat{\rho}^{(B)})\).

-

However, we can even make this more explicit. We can decompose the matrix \(C \in -\mathbb{C}^{d^A \times d^B}\) as \(C = U S V^\dagger\) with \(U\) and \(V\) unitary matrices (of -size \(d^A \times d^A\) and \(d^B \times d^B\) respectively), and \(S\) a \(d^A \times d^B\) matrix -which only has nonzero entries on the diagonal. Furthermore, the nonzero entries of \(S\) can -be chosen positive in descending order. This decomposition is known as the singular value -decomposition. For further reference, we denote the diagonal elements of \(S\) as \(s_i = -S_{i,i}\) for \(i=1,\ldots, \mathrm{min}(d^A,d^B)\).

-

The unitary matrices \(U\) and \(V\) can be interpreted as basis transforms in the subsystems -\(A\) and \(B\) respectively, i.e. they define a new basis (which is thus specific to the chosen -state \(\ket{\Psi}\)), which we denote as \(\{\ket{\psi^{(A)}_k}, k= 1,\ldots, d^A\}\) and -\(\{\ket{\psi^{(B)}_l}, l= 1,\ldots, d^B\}\). We can then write

-
-\[\begin{split}\ket{\Psi} &= \sum_{i=1}^{\min(d^A,d^B)} s_i \ket{\psi^A_i} \otimes \ket{\psi^B_i}\\ -\hat{\rho}^{(A)} &= \sum_{i=1}^{d^A} (s_i)^2 \ket{\psi^A_i} \bra{\psi^A_i}\\ -\hat{\rho}^{(B)} &= \sum_{i=1}^{d^b} (s_i)^2 \ket{\psi^B_i} \bra{\psi^B_i}\end{split}\]
-

This particular way of writing the bipartite state \(\ket{\Psi}\) is known as the Schmidt decomposition. -As a result, the reduced matrices appear immidiately in diagonalised form. The singular values -\(s_i\), or rather their squares \(p_i = (s_i)^2\) are referred to as Schmidt coefficients, and -together make up the entanglement spectrum. The entanglement entropy is then given by

-
-(6.1)#\[S = - \sum_{i} p_i \log(p_i)\]
-

In all of this, it is clear that subsystems \(A\) and \(B\) were treated on equal footing, and -it does in fact not matter which of the two is chosen to probe the entanglement structure of -the state.

-

If the entanglement entropy evaluates to zero, the two subsystems \(A\) and \(B\) are said to be -unentangled, and the state \(\ket{\Psi}\) actually factorises as a tensor product -\(\ket{\psi^A} \otimes \ket{\psi^B}\). As soon as the entanglement entropy is nonzero, the two -subsystems are entangled. As stated above, the entropy is upper bounded, in this case by the -logarithm of the smallest of the two Hilbert space dimensions \(d^A\) or \(d^B\). Thus, if \(d^A -\leq d^B\), we find that the entanglement entropy satisfies

-
-\[0 \leq S \leq \log(d^A).\]
-

It turns out that states that are randomly selected from the Hilbert space typically have -an entanglement entropy that is close to maximal.

-
-
-

6.3. Quantum Many-Body Physics at Finite Temperature#

-

With the concept of mixed states and quantum entanglement at hand, we can now discuss -physically interesting states. Firstly, when considering a system that is in contact with a -large environment that acts as a heat bath at temperature \(T\), it will equilibrate. The -state of the system at equilibrium is then given by the so-called Gibbs state

-
-\[\hat{\rho} = \frac{1}{Z(\beta)} \mathrm{e}^{-\beta \hat{H}}\]
-

where the normalization factor

-
-\[Z(\beta) = \mathrm{Tr}\left[\mathrm{e}^{-\beta \hat{H}}\right]\]
-

is typically referred to as the partition function. Here, \(\beta = \frac{1}{k_B T}\) with -\(T\) de temperature and \(k_B\) Boltzmann’s constant. Henceforth, we simply refer to \(\beta\) as -inverse temperature.

-

The Von Neumann entropy of the Gibbs state corresponds to the thermodynamical notion of -entropy. In a many-body system, the thermal entropy at finite temperature will be extensive -and thus scale with the volume of the system, just like the energy expectation value, so -that together the free energy \(E - T S\) is minimised.

-

At infinite temperature (\(\beta=0\)), we obtain \(\hat{\rho} \sim \hat{1}\) and the Von Neumann -entropy reaches its upper bound. At zero temperature (\(\beta \to +\infty\)), we obtain -\(\hat{\rho} \sim \hat{P}_0\), with \(\hat{P}_0\) the projector onto the eigenspace of lowest -energy. Hence, in that case the Von Neumann entropy is given by \(\log(d_0)\), with \(d_0\) the -lowest energy eigenvalue, i.e. the dimension of the ground state subspace. Most quantum -lattice systems have a single or at least a small number of linearly indepenent ground -states, so that \(d_0\) is a small number independent of the system size. However, there are -also cases where the number of ground states scales exponentially with the system size, and -the thermal entropy remains extensive at zero temperature. This then constitutes a violation -of the infamous third law of thermodynamics.

-

While the heat bath or environment with which the system interacts is in practice typically -much “larger” (in terms of number of degrees of freedom and thus Hilbert space dimension), -we can use a property that any mixed state can be obtained as the reduced density operator -from a pure state in a Hilbert space that is the tensor product of two copies of the -system’s Hilbert space, or thus, where the environment is just exactly as large as the -system. Writing a mixed state \(\hat{\rho}\) as the reduced density operator of a pure state -\(\ket{\Psi}\) in a Hilbert space \(\mathbb{H} = \mathbb{H}^S \otimes \mathbb{H}^E\) is known as -a purification. With respect to the purification, all expectation values can be obtained -as

-
-\[\mathrm{Tr}\left[\hat{O} \hat{\rho}\right] = \braket{\Psi \vert \hat{O} \otimes \hat{1}_E \vert \Psi}\]
-

which can be an advantage if one has an efficient (mathematical, computational, …) formalism -for working with pure states. We can thus always construct such a purification by just -taking the environment to be a copy of the system. Note that the environment in this -construction is merely an auxiliary tool, and has no physical meaning or relation to the -actual environment. If the Hilbert space of the system is described by a basis \(\{\ket{j}, -j=1,\dots, d\}\), then we can first build a purification if the infinite temperature state as

-
-\[\ket{\Psi_0} = \sum_{j} \ket{j}_S \otimes \ket{j}_E\]
-

In particular, if the system is a many-body system and \(\ket{j}\) is itself already a tensor -product basis state \(\ket{j_1} \otimes \ket{j_2} \otimes \ldots\), we can organise the -environment so that matching tensor product factors between system and environment are taken -together. This has the advantage that the infinite temperature state can be written as

-
-\[\ket{\Psi_0} = \left(\sum_{j_1} \ket{j_1}_S \otimes \ket{j_1}_E\right) \otimes \left(\sum_{j_2} \ket{j_2}_S \otimes \ket{j_2}_E\right) \otimes \ldots\]
-

and still has an overall tensor product structure. A purification of the finite temperature -state can then be obtained as

-
-\[\begin{split}\ket{\Psi_\beta} &= \frac{1}{\sqrt{Z(\beta)}} \sum_{j=1}^{d} \left(\mathrm{e}^{-\frac{\beta}{2} \hat{H}} \ket{j}_S \right)\otimes \ket{j}_E \\ -&= \frac{1}{\sqrt{Z(\beta)}} \exp\left(-\frac{\beta}{2} \hat{H} \otimes \hat{1}_E \right) \ket{\Psi_0}\end{split}\]
-

This expression now looks remarkibly similar to how to compute a time-evolved state, by -replacing \(-\mathrm{i} t \mapsto -\beta/2\). Hence, methods that solve Schrödinger’s equation -and are sufficiently general to also work with imaginary values of the time coordinate can -be used to prepare thermal states.

-
-

Note

-

Purifications of thermal states are also referred to as thermofield double states, -especially in the high energy physics literature, i.e. in the context of quantum field -theory, holography and quantum gravity.

-
-
-
-

6.4. Quantum Many-Body Physics at Zero Temperature#

-

As quantum effects are most pronounced at zero temperature, we typically assume to be -operating in this regime. It then follows that we are mostly interested in the lowest energy -states of the Hamiltonian, and in particular in the ground state(s).

-

A trivial but nonetheless important property of ground states is that they can easily be -characterised as states that minimise the expectation value \(\braket{\Psi \vert \hat{H} | -\Psi}\). Indeed, this forms the basis for the variational principle. If we have a set of -trial states, in which there are a number of free parameters, than we can construct an -approximation to the ground state by ‘simply’ minimising the energy expectation value of the -Hamiltonian with respect to these free parameters. How good this approximation is in -practice depends on the properties of both the Hamiltonian and the trial states. However, -one way to quantify the quality of the ground state approximation is by computing the energy -variance

-
-\[\braket{\Psi \vert (\hat{H} - \braket{\Psi \vert \hat{H} \vert \Psi})^2 \vert \Psi} = -\braket{\Psi \vert \hat{H}^2 \vert \Psi} - \braket{\Psi \vert \hat{H} \vert \Psi}^2.\]
-

The Hamiltonians for quantum lattice systems that we are interested in, will typically -contain a sum of terms where every individual term acts nontrivially only in a small patch -of the lattice. For such Hamiltonians, the low-energy states have a special property. -Hereto, we consider arbitrary bipartitions of the system, where one subsystem corresponds to -a (connected) region of sites, whereas the complement, i.e.\ the remaining sites in the -lattice, make up the second subsystem. The ground state will in general not factorize into a -tensor product, as it contains correlations and entanglement between these two (arbitrarily -chosen) subsystems. As pointed out above, the maximal value of entanglement entropy is given -by the logarithm of the smallest of the two Hilbert space dimensions. Assuming that our -chosen region of sites is smaller than its complement, its Hilbert space will itself scale -exponentially with the number of sites in that region, i.e.\ with its volume. Hence, the -entanglement entropy computed for such a bipartition has an upper bound that is proportional -to the volume of the subsystem. As was also stated above, random states typically satisfy -this upper bound. However, the special property of low-energy states of locally interacting -Hamiltonians is exactly that they have much less entanglement. They typically have an -entanglement entropy that only scales with the common area between the subsystem and its -complement. This scaling behavior is referred to as the area law of entanglement entropy -and provides the key motivation for approximating such low energy states using a tensor -network decomposition. It indicates that the most important quantum correlations are short -range (just like the interactions that generate them), and are thus situated across the -boundary connecting the subsystem and its complement. However, this does not exclude that -there is also a small amount of nontrivial long-range correlations in the system.

-

Aside from the ground state, one might also be interested in the first excited states, as -these will be important for understanding how the system at zero temperature reacts to -external perturbations. In a macroscopically large many-body system, one should not expect -that the energy spectrum consists of a number of discrete levels with gaps in between. The -lowest-energy excited states in a quantum lattice system can typically be given a -particle-like interpretation, as is well known from quantum field theory. They correspond to -small bumps of energy, i.e. they can be thought of as perturbations of the ground state in a -small region and thus have an anergy cost that does not scale with the system size. However, -because of kinetic energy-like terms, actual eigenstates will not correspond to having this -energy bump in a localized region, but will rather be in a superposition where the -“particle” is delocalized. In particular, in the case of a translation invariant system, the -eigenstates will also be momentum eigenstates, and thus describe a particle that is in a -momentum superposition across the lattice. The energy (surplus) of such a particle like -excitation will thus be a number \(\epsilon(k)\) that is of order \(1\) independent of the -system size, and that depends on the specific momentum. If \(\epsilon(k)\) is everywhere lower -bounded by some value \(\Delta\) (again indepenent of system size), then the system is said to -be gapped. However, in some systems, \(\epsilon(k)\) can become zero for particular values of -\(k\). Such systems are called gapless, and they often correspond to phase transition points, -where the nature of the ground state radically changes if the parameters in the Hamiltonian -are varied.

-

The energy spectrum of a quantum lattice system will then consist of one or a few ground -states, the energy of which is an extensive number that is most easily expressed as some -energy density per site. To study the excited states, it is then convenient to shift the -energy scale such that the ground state energy is zero. The lowest excited states will then -correspond to particles which can be created at a certain momentum. In an energy-momentum -diagram, their dispersion relation \(\epsilon(k)\) will apear as an isolated band. Note that a -system can have different types of such particle-like excitations, each with their own -dispersion relation. Higher up in the energy spectrum we start to obtain regions -corresponding to states with two- or more particles, that are travelling independent from -each other. For such states, the energy can be obtained simply as the sum of the indivual -particles in the state, and since the relative momentum of the particles can change while -keeping the total momentum fixed, the energy in such states can also vary continuously (at -least in the thermodynamic limit).

-
-
-

6.5. Quantum Dynamics and Quenches#

-

Aside from low-energy eigenstates of the Hamiltonian, we are often also interested in states -that have a non-trivial time depence. One particular use case is where one starts from the -ground state \(\ket{\Psi_0}\) of a certain Hamiltonian \(\hat{H}_0\), and then some parameters -in the Hamiltonian are suddenly changed, so that the Hamiltonian now corresponds to a new -operator \(\hat{H}_1\). This sudden change is reminiscent of quenching a system, and such a -setup is called a global quench. We then want to compute

-
-\[\ket{\Psi(t)} = \exp(-\mathrm{i} t \hat{H}_1) \ket{\Psi_0}.\]
-

With respect to \(\hat{H}_1\), the state \(\ket{\Psi_0}\) will no longer be a ground state and -most likely not even be an eigenstate. However, it will have a certain (extensive) -energy expectation value that is preserved throughout the evolution.

-

In terms of entanglement and correlations, even when \(\ket{\Psi_0}\) is a state with an area -law entanglement scaling (because it is a low-energy state of another local Hamiltonian, -namely \(\hat{H}_0\)), the entanglement in the state will grow rapidly with time. Indeed, the -bipartite entanglement entropy for will tend to grow linearly with time. From the -perspective of a given subsystem, its entropy will grow from an initial value proportional -to the area of the subsystem, until it saturates at a value that is propertional to the -volume of the subsystem. This process is known as thermalisation, as it turns out that at -that point, the subsystem is locally indistinguishable from a Gibbs state with a temperature -set by the energy density of the initial state. The subsystem has thermalized with respect -to its complement behaving as an environment or heat bath. The larger the subsystem, the -longer it will take before thermalisation is complete, and the overall state of the global -system remains a pure state, albeit a highly entangled one.

-
-
-

6.6. Observables and Static and Dynamic Correlation Functions#

-

There are a number of typical observables that we want to measure for a given quantum state -(ground state or thermal state) of a quantum lattice system. The first are operators which -have the same structure as the Hamiltonian, in being given by a sum of terms where every -individual term acts nontrivially only on a single site, or a small patch of neighbouring -sites. Furthermore, these terms all act identically, except that they are translated to the -different patches that make up the lattice. Typical examples include the energy itself or -specific contributions to it (kinetic energy, interaction energy, … ) as well as the total -number of particles, a total magnetisation, and other similar quantities.

-

Let us use the transverse field Ising model as an example. An interesting quantity in the -transverse field Ising model is the longitudinal magnetisation, given by -\(\hat{S}^z=\frac{1}{2} \sum_{n} \sigma^z_n\). The expectation value of such operators is -extensive, and so we are typically interested in the associated density, which is obtained -by dividing out the volume factor. With respect to a translation-invariant state, this is -equivalent to simply measuring the expectation value of a single term, i.e. -\(\frac{1}{2} \sigma^z\) in the case of the longitudinal magnetisation, which is thus a local -operator. The precise position where it acts does then not really matter.

-

Such quantities come up for example to measure potential symmetry breaking, where an operator that should -have zero expectation value given the symmetries of the Hamiltonian, actually acquires a -nonzero expectation value. Indeed, given that the Ising Hamiltonian has -the property that \(\left[\hat{H},\hat{U}\right] = 0\), where \(\hat{U} = \bigotimes_{n} \sigma^x_n\), -we also expect the ground state \(\ket{\Psi_0}\) to satisfy -\(\hat{U} \ket{\Psi_0} \sim \ket{\Psi_0}\), where the proportionality factor can only be plus -or minus one, due to \(\hat{U}^2 = \hat{1}\). The magnetisation in the \(z\)-direction, on the -other hand, satisfies \(\hat{U}^\dagger \hat{S}^z \hat{U} = - \hat{S}^z\), so that we expect

-
-\[\braket{\Psi_0 \vert \hat{S}^z \vert \Psi_0} = 0\]
-

Indeed, if the ground state is unique, this is precisely what happens. However, it can -happen that there are multiple linearly independent ground states. In that case, the -restriction of \(\hat{S}^z\) into the ground subspace can be nontrivial, and there exist -specific ground state choices for which the expectation value is nonzero. For reasons that -go beyond what can be explained here, it are typically these states which are easiest to -create or approximate (they have lower entanglement). Such operators that can characterise -the presence of symmetry breaking are referred to as order parameters.

-

Nonetheless, the use of local operators to probe the ground state properties is somewhat -limited. A different class of observables that are of typical interest are (static) -correlation functions, which take the form

-
-\[ C^{A,B}_{i,j} = \braket{\Psi\vert \hat{A}_i^\dagger \hat{B}_j\vert \Psi} \]
-

where \(\hat{A}_i\) is a local operator acting on or in the neighbourhood of site (or unit -cell) \(i\) and \(\hat{B}_j\) is a local operator acting on or in the neighbourhood of site \(j\). -Typically, the operators \(\hat{A}\) and \(\hat{B}\) are chosen such that their local expectation -value is zero. If this is not the case, we can subtract these local expectation values by -redefining

-
-\[ C^{A,B}_{i,j} = \braket{\Psi\vert (\hat{A}_i - \braket{\Psi\vert\hat{A}_i\vert \Psi})^\dagger (\hat{B}_j - \braket{\Psi\vert\hat{B}_j\vert \Psi})\vert \Psi} = \braket{\Psi\vert \hat{A}_i \hat{B}_j\vert \Psi} - \braket{\Psi\vert\hat{A}_i\vert \Psi} \braket{\Psi\vert\hat{B}_j\vert \Psi}.\]
-

We are then interested in the dependence of this correlation function on the positions \(i\) -and \(j\). In particular, in a translation invariant system, it is only the relative lattice -vector from site \(i\) to site \(j\) on which this quantity depends. It can be proven that if -\(\ket{\Psi}\) is the unique ground state of a gapped local Hamiltonian, then the asymptotic -behaviour of such correlation functions is that they decay exponentially in the distance -between the two sites. This exponential thus defines a length scale \(\xi\) via \(\exp(-d/\xi)\) -with \(d\) the relevant distance. The length scale \(\xi\) is known as the correlation length of -the system.

-

When the system is gapless, static correlation functions still go to zero in the limit of -infinite separation distance, but rather decay as an algebraic function of the distance, -i.e. they give rise to power laws. The exponents that appear in these power laws do -typically have universal values that are set by general properties such as the number of -spatial dimensions, the global symmetries in the system, etc. In particular for the case of -one-dimensional system, there is a rich literature and well developed framework for -analysing such gapless systems using methods from conformal field theory.

-

Finally, in systems with potential symmetry breaking, the static correlation function of the -order parameter with itself is an extremely useful diagnostic. In particular, when the system -has symmetry breaking, the large distance limit of the correlation function does not vanish -and the system is said to contain long range order. Unlike the expectation value of the local -order parameter, which can have a nonzero expectation value for particularly chosen -symmetry breaking ground states but is still zero for other choices of ground states, the -value of the correlation function and its large distance limit is insensitive to the specifically -chosen ground state out of the ground subspace that it is computed with. For the transverse-field -Ising model, symmetry breaking will thus be present whenever

-
-\[ C_{i,j} = \braket{\Psi \vert \sigma^z_i \sigma^z_j \vert \Psi} \]
-

does not decay to zero limit for large distance between sites \(i\) and \(j\). The limiting -value of this correlation function can then be considered as \(m^2\), i.e. the square of the -local magnetisation that would be measured in some states of the ground subspace.

-

Strictly speaking, the ground state static correlation function does not provide information -about excited states or other dynamical information of the Hamiltonian. In most physical -system, it however does provide some qualitative information. Since the static correlation -function, considered as a matrix with rows \(i\) and columns \(j\), has a particular structure -resulting from translation invariance, it can be diagonalised by a (multidimensional) -discrete Fourier transform. The resulting eigenvalues depend on the lattice momentum -\(\kappa\) and are known as the static structure factor \(S(\kappa)\). In particular, in the -case of a gapped system with unique ground state, these values are well defined for all -\(\kappa\). Nonetheless, it can be argued (using different techniques) that maxima for -\(S(\kappa)\) will correspond to momenta where the single particle excitations have minima in -their dispersion relations. For critical systems, \(S(\kappa)\) can also have algebraic -divergences, whereas in the case of long range order, \(S(\kappa)\) will contain a Dirac-delta -type of divergence, typically at zero momentum, unless there is some spatially repeating -pattern in the way symmetry is broken (and thus also translation invariance is broken).

-

More detailed quantitative information about the spectrum of excited states is contained in -the time-dependent correlation function

-
-\[\begin{split}G^{A,B}_{i,j}(t) &= \braket{\Psi_0\vert \hat{A}_i(t)^\dagger \hat{B}_j(0)\vert \Psi_0}\\ -&=\braket{\Psi_0\vert \mathrm{e}^{+\mathrm{i} \hat{H} t} \hat{A}_i^\dagger \mathrm{e}^{-\mathrm{i} \hat{H} t} \hat{B}_j\vert \Psi_0} \\ -&=\braket{\Psi_0\vert \hat{A}_i \mathrm{e}^{-\mathrm{i} (\hat{H}-E_0) t} \hat{B}_j\vert \Psi_0} \end{split}\]
-

On the first line, we have used operator -\(\hat{A}(t) = \mathrm{e}^{+\mathrm{i} t \hat{H}}\hat{A} \mathrm{e}^{-\mathrm{i} t \hat{H}}\) -in the Heisenberg picture. In going from the second to the third line, we have used that -\(\ket{\Psi_0}\) is the ground state of \(\hat{H}\) with ground state energy \(E_0\). Again, this -quantity will depend on the relative lattice vector connecting sites \(i\) and \(j\) in a -translation-invariant system. Once again, we can diagonalise the spatial dependence using a -multidimensional discrete Fourier transform. If we now furthermore also perform a Fourier -transform of the time-dependence into frequency space, we obtain the dynamical structure -factor given by

-
-\[ S^{A,B}(\kappa, \omega) = \sum_{n} \delta(\omega- (E_n - E_0))\braket{\Psi_0 \vert \hat{A}(\kappa)^\dagger | \Psi_n}\braket{\Psi_n \ \hat{B}(k\kappa) \vert \Psi_0} \]
-

Here, \(\hat{A}(k\kappa)\) and \(\hat{B}(\kappa)\) correspond to the discrete Fourier transforms -of \(\hat{A}_i\), which amounts to the momentum superposition. As a consequence, -\(\hat{B}(\kappa) \ket{\Psi_0}\) is a state with definite momentum \(k\) (provided the ground -state is translation invariant), and thus only has overlap with excited states -\(\ket{\Psi_n}\) with momentum \(\kappa\). Because of the factor \(\delta(\omega - (E_n -E_0))\), -the dynamical structure factor \(S^{A,B}(\kappa, \omega)\) can be nonzero only if there exist -eigenstates with momentum \(\kappa\) and excitation energy \(\omega\) in the spectrum of the -Hamiltonian \(\hat{H}\). By studying \(S^{A,B}(\kappa, \omega)\) for different choices of -operators \(\hat{A}\) and \(\hat{B}\), we can detect all eigenstates and map out the full -(low-energy) spectrum of \(\hat{H}\).

-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/1-Introduction/QuantumMechanics.html b/pr-preview/pr-27/1-Introduction/QuantumMechanics.html deleted file mode 100644 index 6f2f0e43..00000000 --- a/pr-preview/pr-27/1-Introduction/QuantumMechanics.html +++ /dev/null @@ -1,773 +0,0 @@ - - - - - - - - - - - - - 3. Quantum Mechanics and its Postulates — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Quantum Mechanics and its Postulates

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

3. Quantum Mechanics and its Postulates#

-

While the energy levels of the hydrogen atom played an important role in the historical -development of quantum mechanics, it became almost immediately clear that the true challenge -is in applying the laws of quantum mechanics to systems with many interacting particles or -fields. Note that the formalism of quantum mechanics, and in particular its postulates, are -generically valid and not restricted to the description of a single particle. Quantum field -theory also follows these postulates and is thus not a generalisation of quantum mechanics, -but rather a specific case of it. These postulates characterise the mathematical model by -which quantum mechanics describes physical systems, and more specifically how it represents -states, observables, measurements and dynamics. We briefly reiterate these postulates and -base our discussion on the wonderfull lecture notes “Quantum Information and Computation” by -John Preskill.

-
-

3.1. Postulate 1: States#

-

The state of an isolated quantum system is associated to a ray of vectors in a complex -Hilbert space \(\mathbb{H}\).

-

A Hilbert space is a metric complete inner product space. Let us unpack this definition:

-
    -
  1. \(\mathbb{H}\) is a vector space in this case over the complex numbers. We will denote -elements of this vector space with Dirac’s ket notation \(\ket{\psi}\). In particular, we -can build linear combinations

    -
    -\[\ket{\psi} = a \ket{\psi_1} + b \ket{\psi_2}\]
    -

    for all \(a, b \in \mathbb{C}\) and all \(\ket{\psi_1}, \ket{\psi_2} \in \mathbb{H}\).

    -
  2. -
  3. \(\mathbb{H}\) has an inner product, which maps two vectors \(\ket{\psi}\) and \(\ket{\varphi}\) -onto a scalar \(\braket{\varphi|\psi} \in \mathbb{C}\) with the properties of

    -
      -
    • Linearity: \(\bra{\varphi} ( a \ket{\psi_1} + b \ket{\psi_2}) = a \braket{ \varphi | \psi_1} + b \braket{ \varphi | \psi_2}\)

    • -
    • Skew-symmetry: \(\braket{ \varphi | \psi} = \braket{ \psi | \varphi}^\ast\)

      -
        -
      • Positivity: \(\braket{ \psi | \psi} \geq 0\) with equality only if \(\ket{\psi} = 0\).

      • -
      -
    • -
    -
  4. -
-

This last property enables us to define a norm \(\lVert \psi \rVert = \lVert \ket{\psi} - \rVert = \sqrt{\braket{\psi|\psi}}\), which satisfies known properties such as \(\lVert \psi - \rVert = 0 \Leftrightarrow \ket{\psi} = 0\) \(\lVert a \ket{\psi} \rVert = \vert a\vert - \lVert \psi \rVert\) and the triangle inequality \(\lVert \ket{\varphi} + \ket{\psi} \rVert - \leq \lVert \varphi \rVert + \lVert \psi \rVert\).

-
    -
  1. The final property of metric completeness is a technical requirement that is only -relevant in infinite-dimensional Hilbert spaces. Firstly, a metric is a notation of -distance between the elements in \(\mathbb{H}\), which is provided by the norm of the -difference, i.e. \(d(\varphi, \psi) = \lVert \varphi - \psi \rVert\).

    -

    Completeness of the metric is a specific property that guarantees that certain sequences -of vectors are guaranteed to have a limit value that also exists in \(\mathbb{H}\). This -is necessary to make sense of e.g. Fourier series.

    -
  2. -
-

The state of a quantum system is associated to a ray of vectors, which is the -one-dimensional space \(\{ a \ket{\psi} , \forall a \in \mathbb{C}\}\) spanned by a single -(nonzero) vector \(\ket{\psi} \in \mathbb{H}\). We will describe the state of the system using -a single representative \(\ket{\psi}\) of this ray, which we typically choose such that -\(\braket{ \psi | \psi} = 1\). However, this does not fix the representative completely, as we -can still add arbitrary phases \(\exp(\mathrm{i}\alpha)\), i.e. \(\ket{\psi}\) and -\(\mathrm{e}^{\mathrm{i}\alpha} \ket{\psi}\) describe the same state.

-

The best known Hilbert space from your courses on single-particle quantum mechanics is -probably \(L^2(\mathbb{R}^n)\), the Hilbert space for a single quantum particle moving in the -\(n\)-dimensional coordinate space \(\mathbb{R}^n\) (typically \(n=1,2,3\)). This Hilbert space -corresponds to the space of all square-integrable functions \(\psi:\mathbb{R}^d \to -\mathbb{C}: x \mapsto \psi(x)\) and the inner product is given by

-
-\[\braket{\varphi | \psi} = \int_{\mathbb{R}^n} \varphi(x)^\ast \psi(x)\,\mathrm{d} x\]
-

However, this is already a complicated Hilbert space from a technical perspective. Hilbert -spaces can also be finite-dimensional, i.e. \(\mathbb{C}^d\), the space of column vectors of -length \(d\), with the standard Euclidean inner product

-
-\[\braket{\varphi | \psi} = \sum_{i=1}^d \varphi_i^\ast \psi_i\]
-

These Hilbert spaces will be very important in our discussion. The simplest nontrivial case -corresponds to \(d=2\) and the associated quantum system is known under various names. It is -often referred to as a qubit in the context of quantum information theory. There are various -ways in which qubits can be physically realised. Another common example of a two-dimensional -Hilbert space is for describing the spin degree of freedom of an electron, or another -particle with spin quantum number 1/2. Such a reduced description (forgetting about the -position) is possible if the electron is localised in space, for example when it is strongly -bound to an atom.

-

If we do want to describe a particle that moves in space, we might also consider it to exist -only at discrete positions in space, i.e. on a lattice. For example, on a one-dimensional -lattice (a.k.a. a chain) with \(L\) sites, the Hilbert space would also correspond to -\(\mathbb{H} = \mathbb{C}^L\) and the standard basis vectors \(\vert j \rangle, j=1,\dots,L\) -correspond to the state of the system if the particle is exactly localised on site \(j\). We -can also consider infinitely large lattices, e.g. the one-dimensional chain where there is a -site associated with every \(j \in \mathbb{Z}\) (or the n-dimensional hypercubic lattice -\(\mathbb{Z}^n\)). The resulting Hilbert space is then spanned by the states \(\vert j \rangle\) -for all \(j \in \mathbb{Z}\), and is thus infinite-dimensional but with a straightforward -countably infinite basis.

-

Of course, our goal is to find the Hilbert space of a many body system. We return to this -question below and devote a complete section to it.

-
-
-

3.2. Postulate 2: Observables#

-

Physical observables of the system correspond to self-adjoint (a.k.a. Hermitian) linear -operators on the Hilbert space \(\mathbb{H}\).

-

An operator \(\hat{A}\) on \(\mathbb{H}\) is a linear map \(\hat{A}:\mathbb{H} \to \mathbb{H}\), -i.e. a map from vectors to vectors that satisfies

-
-\[\hat{A}( a \ket{\varphi} + b \lvert \psi \rangle) = a \hat{A}(\ket{\varphi}) + b -\hat{A}(\ket{\psi})\]
-

The adjoint of an operator \(\hat{A}\) is a new operator \(\hat{A}^\dagger\) that is constructed -such that

-
-\[\bra{\varphi} \hat{A} \psi \rangle = \langle \hat{A}^\dagger \varphi \ket{\psi}\]
-

for all \(\ket{\varphi}, \ket{\psi} \in \mathbb{H}\) and where \(\vert \hat{A}\psi \rangle = -\hat{A} \ket{\psi}\). This definition requires that \((a_1 \hat{A}_1 + a_2 \hat{A}_2)^\dagger -= a_1^\ast \hat{A}_1^\dagger + a_2^\ast \hat{A}_2^\dagger\) and \((\hat{A}_1 -\hat{A}_2)^\dagger = \hat{A}_2^\dagger \hat{A}_1^\dagger\).

-

A self-adjoint operator is an operator such that \(\hat{A}^\dagger = \hat{A}\) or thus

-
-\[\braket{\varphi | \hat{A} \psi } = \braket{ \hat{A}^\dagger \varphi | \psi}\]
-

for all \(\ket{\varphi}, \ket{\psi} \in \mathbb{H}\). Linear combinations of self-adjoint -operators with real coefficients are self-adjoint. The composition of two self-adjoint -linear operators \(\hat{A}_1 \hat{A}_2\) is self-adjoint if and only if

-
-\[\left[ \hat{A}_1 , \hat{A}_2 \right] = \hat{A}_1 \hat{A}_2 - \hat{A}_2 \hat{A}_1 = 0,\]
-

i.e. if the operators also commute. Self-adjoint operators have real eigenvalues, and -eigenvectors associated to distinct eigenvalues are orthogonal. In a finite-dimensional -Hilbert space, self-adjoint operators admit a spectral decomposition

-
-\[\hat{A} = \sum_{n} \lambda_n \hat{P}_n\]
-

where \(\hat{P}_n\) is the spectral projector onto the eigenspace associated with \(\lambda_n\). -The spectral projectors satisfy \(\hat{P}_n \hat{P}_m = \delta_{n,m} \hat{P}_n\), -\(\hat{P}_n^\dagger = \hat{P}_n\) and \(\sum_{n} \hat{P}_n = \mathbb{1}\), the identity -operator. If \(\lambda_n\) has one-dimensional eigenspace spanned by the eigenvector -\(\vert\phi_n\rangle\), then

-
-\[\hat{P}_n = \frac{\vert \phi_n \rangle \langle \phi_n \vert}{\langle \phi_n \vert \phi_n \rangle}\]
-

where the denominator can be omitted if the eigenvector is normalised.

-

In the language of matrices, these properties can be rephrased as follows: With respect to -an orthonormal basis choice, self-adjoint operators are represented as hermitian matrices. -Such matrices can be diagonalised by a unitary transformation, or thus, we can construct a -complete basis consisting of eigenvectors. With respect to this basis, the self-adjoint -operator is represented by a diagonal matrix with real values on the diagonal.

-
-
-

3.3. Postulate 3: Measurements, Expectation Values and Collapse#

-

Given an observable to which we associate the operator \(\hat{A}\), we now need to prescribe -the result of measuring this observable with respect to a system that is in a state -\(\ket{\psi}\). The most compact way of describing the result is by stating that, the -expectation value \(\braket{\hat{A}}\) (= the mean value of the measurement when averaging -over an ensemble of identical copies of the system) is given by

-
-\[\braket{\hat{A}} = \frac{\braket{\psi \vert \hat{A} \vert \psi}}{\braket{\psi \vert \psi}}\]
-

By exploiting the fact that this also prescribes the expectation value of all higher moments -\(\braket{\hat{A}^k}\), this determines the full probability distribution of the measurement -outcome, and yields the more familiar result: The only possible measurement outcomes are -given by the eigenvalues \(\lambda_n\) of \(\hat{A}\), and for a system in state \(\ket{\psi}\) -(now assumed normalized), the probability of obtaining \(\lambda_n\) is given by \(p_n = -\braket{\psi \vert \hat{P}_n \vert \psi}\) with \(\hat{P}_n\) the spectral projector from -above. In the case that \(\lambda_n\) has a single (linearly independent) eigenvector -\(\ket{\phi_n}\) (also assumed normalised), this amounts to \(p_n = \vert -\braket{\phi_n|\psi}\vert^2\).

-

There is a second part to the measurement postulate, which states that, if the measurement -is immediately repeated (without intermediate dynamics, as described by the next postulate), -then the same measurement outcome is obtained. Because the measurement outcome with respect -to the initial state \(\ket{\psi}\) is probabilistic and can yield different results, this -requires that after the first measurement, the state changes is changed. This is the -well-known collapse of the wave function. More specifically, if a measurement of -observable \(\hat{A}\) is performed in a system with state \(\ket{\psi}\) and the measurement -value \(\lambda_n\) is obtained, then the state of the system changes to

-
-\[\ket{\psi} \longrightarrow \frac{\hat{P}_n \ket{\psi}}{\lVert \hat{P}_n \ket{\psi}\rVert}.\]
-

Note that the denominator cannot vanish, as otherwise the probability of having obtained -measurement outcome \(\lambda_n\) would have been zero in the first place.

-
-
-

3.4. Postulate 4: Dynamics#

-

During time intervals without measurements, the state of an isolated quantum system evolves -unitarily according to the (first order linear) differential equation

-
-\[\frac{\mathrm{d}\ }{\mathrm{d} t} \ket{\psi(t)} = - \mathrm{i} \hat{H}(t) \ket{\psi(t)}\]
-

known as the Schr”{o}dinger equation, where \(\hat{H}(t)\) is the Hamiltonian of the system, -which may itself be time-dependent. In the case of a time-independent Hamiltonian, we can -define the evolution operator

-
-\[U(t, t') = \exp\left(-\mathrm{i}(t-t')\hat{H}\right)\]
-

which relates states at different times via \(\ket{\psi(t)} = \hat{U}(t, t') \ket{\psi(t')}\) -and is clearly a unitary operator. Clearly, we need to know the Hamiltonian of a system in -order to even start thinking about modelling its quantum properties. We will always assume -that the Hamiltonian is given. In practice, however, the situation can be much more -complicated. Typically, we want to build only an effective quantum description of the system -(e.g. only the electrons, only certain electrons, \(\ldots\)) and not start all the way down -at the level of fundamental particles and the standard model (which is also only an -effective model valid up to some energy scale).

-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/1-Introduction/QuantumToClassical.html b/pr-preview/pr-27/1-Introduction/QuantumToClassical.html deleted file mode 100644 index 1dc26a4c..00000000 --- a/pr-preview/pr-27/1-Introduction/QuantumToClassical.html +++ /dev/null @@ -1,744 +0,0 @@ - - - - - - - - - - - - - 7. Quantum-to-Classical Mapping — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - -
- On this page -
- - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Quantum-to-Classical Mapping

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

7. Quantum-to-Classical Mapping#

-

In this final section, we introduce a general technique that essentially enables us to map -any quantum lattice system in \(d\) dimensions to a classical partition function in \(d+1\) -dimensions, up to some caveats that we will return to at the end of this section.

-
-

7.1. Suzuki-Trotter decomposition#

-

Remember that thermal expectation values are given by

-
-\[\braket{\hat{O}} = \mathrm{Tr}\left[\hat{O} \mathrm{e}^{-\beta \hat{H}}\right]/Z(\beta)= \mathrm{Tr}\left[\mathrm{e}^{-\beta \hat{H}/2} \hat{O} \mathrm{e}^{-\beta \hat{H}/2}\right]/Z(\beta)\]
-

with the thermal partition function \(Z(\beta)\) given by

-
-\[Z(\beta) = \mathrm{Tr} \mathrm{e}^{-\beta \hat{H}}.\]
-

The ground state physics is encoded in the limit \(\beta \to \infty\). Note that, if the -system has a unique ground state, we can obtain the ground state \(\ket{\Psi_0}\) of a quantum -system by starting from essentially a random state \(\ket{\Phi}\) and evolving it in imaginary -time \(\tau = -\mathrm{i} t\) for sufficiently long

-
-\[\ket{\Psi_0} \sim \lim_{\tau \to \infty} \mathrm{e}^{-\tau \hat{H}} \ket{\Phi}\]
-

Expanding the initial state \(\ket{\phi}\) in the energy eigenbasis of \(\hat{H}\), we see that -the only condition is that it is not orthogonal to the ground state (subspace). In addition, -the ground state will be well approximated if \(\tau \Delta E \gg 1\), with -\(\Delta E=E_1 - E_0\) the energy gap. This imaginary time evolution also forms the basic -ingredient of several numerical algorithms for approximating ground states of quantum many -body systems, often in combination with the Suzuki-Trotter decomposition which is introduced -below.

-

Using this approach, the following expression for the ground state expectation value of on -operator \(\hat{O}\) is obtained

-
-\[\braket{\hat{O}} = \lim_{\tau\to\infty} \braket{\phi\vert \mathrm{e}^{-\tau \hat{H}} \hat{O} \mathrm{e}^{-\tau \hat{H}}\vert \phi}/\braket{\phi\vert\mathrm{e}^{-2\tau \hat{H}} \vert\phi}\]
-

This expression can be compared to the thermal expectation value with \(\beta = 2\tau\); the -only difference is in the boundary conditions.

-

For a quantum many body system, taking the exponential is as hard as determining the full -diagonalisation of the hamiltonian, which is impossible due to the exponentially large -Hilbert space. If the hamiltonian is a sum of local terms, each of these terms can be -exponentiated easily, but for arbitrary \(\tau\) there is no relation ship between -\(\exp(-\tau \sum_{i} \hat{h}_i)\) and the individual \(\exp(-\tau \hat{h}_i)\), unless the -different \(\hat{h}_i\) commute. However, for an infinitesimal time step \(\epsilon\), we can -use to Baker-Campbell-Hausdorff formula (or better yet, the Zassenhaus formula) to obtain

-
-\[\exp(-\epsilon \sum_{i} \hat{h}_i) = \prod_i \exp(-\epsilon \hat{h}_i) + -\mathcal{O}(\epsilon^2).\]
-

This then leads to the Suzuki-Trotter decomposition

-
-\[\exp\left(-\tau \sum_{i} \hat{h}_i\right) = \lim_{M\to\infty} \left( \mathrm{e}^{-\frac{\tau}{M} \sum_i \hat{h}_i} \right)^M =\lim_{M\to\infty} \left(\prod_i \mathrm{e}^{-\frac{\tau}{M} \hat{h}_i} + \mathcal{O}(\tau^2/M^2)\right)^M = \lim_{M\to\infty} \left( \left[\prod_i \mathrm{e}^{-\frac{\tau}{M} \hat{h}_i}\right]^M + \mathcal{O}(\tau^2/M)\right)\]
-

The product in the final expressions requires chosing a specific order, exactly because the terms \(\hat{h}_i\) -and thus also the factors \(\mathrm{e}^{-\frac{\tau}{M} \hat{h}_i}\) do not commute. The approximation -and error term are valid for arbitrary choices of ordering, but different orderings are not -equivalent. Particular choices can be more suitable for particular purposes. Furthermore, -note that splitting the time interval \([0,\tau]\) into small segments \(\epsilon = \tau/M\) is -also the starting point for deriving a path integral representation of the quantum partition -function. The next step is to insert a resolution of the identity in between the \(N\) -different factors, where the labels of the basis will behave as classical degrees of -freedom. For obtaining a path integral, the basis should be labeled by a number of -continuous degrees of freedom, which can then become continuous functions of time in the -limit \(\epsilon\to 0\). Here, instead, we will keep \(\epsilon\) small but finite, and use a -discrete basis.

-
-
-

7.2. From quantum to statistical mechanics#

-

Let’s start with a quantum system in \(d=0\), i.e. a small number of spins, or in particular, a single spin, -described by a hamiltonian

-
-\[\hat{H} = - h_x \sigma^x - h_z \sigma^z\]
-

While we could in principle exponentiate \(\hat{H}\) directly as it is a \(2 \times 2\) matrix, -we will treat it using the Suzuki-Trotter decomposition. Throughout the remainder of this -section, we will use the \(\sigma^z\) basis, which we denote as \(\ket{1} = \ket{\uparrow}\) and -\(\ket{-1} = \ket{\downarrow}\). Inserting resolutions of the identity, we write

-
-\[Z(\beta) = \mathrm{Tr} \mathrm{e}^{-\beta \hat{H}} = \sum_{\{s_k\}=\pm 1} -\braket{s_1|\mathrm{e}^{-\epsilon \hat{H}}|s_2}\cdots \braket{s_M-1| \mathrm{e}^{-\epsilon -\hat{H}}|s_{M}} \cdots \braket{s_M| \mathrm{e}^{-\epsilon \hat{H}}|s_{M+1}}\]
-

with \(s_{M+1} = s_1\), \(M\epsilon =\beta\), and where

-
-\[\begin{split}\braket{s_{i}|\mathrm{e}^{-\epsilon \hat{H}}|s_{i+1}} &= \braket{s_{i} \vert \mathrm{e}^{-\epsilon H} \vert s_{i+1}} \approx \braket{s_{i} \vert \mathrm{e}^{\epsilon h_z \sigma^z}\mathrm{e}^{\epsilon h_x \sigma^x} \vert s_{i+1}}\\ -&= \mathrm{e}^{\epsilon h_z s_i} \braket{s_{i} \vert \cosh(\epsilon h_x) \mathbb{1} + \sinh(\epsilon h_x) \sigma^x \vert s_{i+1}}\\ - &= \mathrm{e}^{K s_{i}s_{i+1} + h s_i + f_0}\end{split}\]
-

where the parameters in the last line are given by -\(K= -\frac{1}{2}\log \tanh(\epsilon h_x)\), \(h = \epsilon h_z\) and -\(f_0 =\frac{1}{2}\log[\cosh(\epsilon h_x)\sinh(\epsilon h_x)]\).

-

We thus obtain

-
-\[Z(\beta) = \sum_{s_k} \mathrm{e}^{\sum_{i=1}^{M}K s_i s_{i+1} + h s_i},\]
-

the partition function of the one-dimensional classical Ising model with periodic boundary -conditions. Indeed, \(\braket{s_{i}|\mathrm{e}^{-\epsilon H}|s_{i+1}}\) does exactly -correspond to the transfer matrix, and diagonalising the transfer matrix is the most -straightforward approach to solving the one-dimensional classical Ising model.

-
-
-

7.3. Higher dimensional generalisation#

-

We now apply the same approach to the Ising model with both transverse and longitudinal -field in \(d\) dimensions, on a hypercubic lattice. We separate the hamiltonian in two parts -according to

-
-\[\hat{H} = \left(-J\sum_{\braket{i,j}} \sigma^z_i \sigma^z_j - h_z \sum_{i} \sigma^z_i\right) + \left(- h_x \sum_{i} \sigma^x_i\right)= \hat{H}_1 + \hat{H}_2\]
-

Note that \(\hat{H}_1\) and \(\hat{H}_2\) in itself contain commuting terms, but of course don’t -mutually commute. We follow the same strategy, and will in every (imaginary) time step -introduce a resolution of the identity using the tensor product \(\sigma^z\) basis. We now denote -the basis at time step \(k\) as \(\ket{\{s_{i,k}\}}\), where \(i\) labels a site in the \(d\) -dimensional lattice hosting the quantum degrees of freedom, and \(k\) labels points along the -imaginary time axis, which emerges as a new dimension in the problem. We find

-
-\[\exp(-\epsilon \hat{H}_1)\ket{\{s_{i,k}\}} = \exp(\epsilon J \sum_{\braket{i,j}} s_{i,k} s_{j,k}+\epsilon h \sum_i s_{i,k}) \ket{\{s_{i,k}\}}\]
-

as \(\hat{H}_1\) is diagonal in this basis, and

-
-\[\braket{\{s_{i,k}\}|\exp(-\epsilon \hat{H}_2)|\{s_{i,k+1}\}} = \prod_i \braket{s_{i,k}|\mathrm{e}^{-\epsilon h_x \sigma^x_i} | s_{i,k+1}} \sim \exp(K_\perp\sum_{i} s_{i,k} s_{i,k+1})\]
-

with \(K_\perp = \log \tanh(\epsilon h_x)\) as before. Here, we have now ignored an overall -proportionality factor, which is irrelevant when using the partition function to compute -expectation values. With this, we find

-
-\[ Z(\beta) = \sum_{\{s_i,k\}} \exp\left(\sum_{k=1}^{M}\sum_{i} K_\perp s_{i,k} s_{i,k+1}+\sum_{k=1}^M\sum_{\braket{i,j}} K_\parallel s_{i,k} s_{j,k} + \sum_{k=1}^{M}\sum_{i} h s_{i,k} \right)\]
-

with \(K_{\parallel} = \epsilon J\) and \(h = \epsilon h_z\). We thus find the partition -function of the classical Ising model in \(d+1\) dimensions with anisotropic interaction -strengths, periodic boundary condition in the imaginary time direction and a number of sites -in the time direction given by \(M = \beta/\epsilon\). Hence, the ground state regime -\(\beta\to \infty\) corresponds to the thermodynamic limit in this additional time direction -of the corresponding classical system, so that there are many similarities (or actually, -equivalences) between between quantum phenomena in \(d\) dimensions and classical phenomena in -\(D=d+1\) dimensions. On the other hand, when the quantum system is at finite temperature -\(\beta\), the additional dimension is finite and never in the thermodynamic limit. In that -case, this extra dimension cannot cause new non-analyticities in the partition function and -finite temperature quantum systems in \(d\) dimensions are very similar to classical systems -in \(d\) dimensions.

-

This quantum to classical mapping can also be inverted. Taking a codimension \(1\) slice out -of a \(D\)-dimensional classical partition function, one obtains a transfer matrix which can -be interpreted as the exponential of a quantum hamiltonian acting on the Hilbert space of a -\(d=D-1\) dimensional quantum system. Hence, methods for targetting quantum ground states in -\(d\) dimensions can also be used to study problems in \((d+1)\)-dimensional classical -statistical mechanics.

-

It is clear that the quantum to classical mapping is not specific to the quantum Ising model -and can be applied to any hamiltonian. The path integral representation of the partition -function fits within the same scheme, and only differs in the fact that the limit -\(\epsilon\to 0\) is taken such that the additional dimension becomes continuous. This is -particularly natural if also the spatial dimensions of the quantum dimension are continuous, -i.e. if we have a quantum field theory. In this case, a \(D=d+1\) dimensional classical -statistical field theory is obtained. For relativistic quantum field theories, where it is -common practice to explicitly count the time dimension together with the space dimensions, -imaginary time evolution leads to an action, which is equivalently a hamiltonian of a -classical field theory in \(D=d+1\) spatial dimensions, with full Euclidean invariance.

-

One might thus wonder if there is anything new to be learned from studying quantum ground -states. First of all, there is one important catch which we have overlooked so far. There is -no guarantee that the above process yields a classical partition function with Boltzmann -weights which are positive, or even real. While this may seem like a technical detail, it is -of major importance. The quantum to classical mapping is the basis behind the Quantum Monte -Carlo method, one the most successful numerical methods for studying quantum many body -systems. One maps the quantum problem to a classical partition function and then uses one of -the many flavours of Monte Carlo sampling. However, with non-positive Boltzmann weights, the -interpretation of a probability distribution is lost and no efficient sampling procedure can -be designed, as samples might annihilate each other. This is known as the sign problem.

-

Secondly, for many non-relativistic quantum systems, the anisotropy between the imaginary -time direction and the spatial dimensions in the corresponding classical system cannot be -ignored, even at the critical point. In those cases, critical correlations behave -differently in the spatial and the time direction, which is characterised by a dynamical -critical exponent \(z\). The case \(z=1\) corresponds to the case where the critical point has -(emergent) rotation/Lorentz invariance between time and space.

-

A final reason to study quantum systems directly is that certain concepts are more natural -in that setting. In particular, the last 15 years, ideas from quantum information theory, -and in particular the concept of entanglement, have made their way into the standard toolbox -to study and characterize quantum many body systems.

-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/2-TensorNetworks/LinearAlgebra.html b/pr-preview/pr-27/2-TensorNetworks/LinearAlgebra.html deleted file mode 100644 index 40de0ebb..00000000 --- a/pr-preview/pr-27/2-TensorNetworks/LinearAlgebra.html +++ /dev/null @@ -1,878 +0,0 @@ - - - - - - - - - - - - - 8. (Multi-) Linear Algebra — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - -
- On this page -
- - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

(Multi-) Linear Algebra

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

8. (Multi-) Linear Algebra#

- -
-

8.1. Overview#

-

This lecture covers some basic linear algebra concepts and operations, that will serve as -foundation for most of what follows. The goal is to provide some intuitive understanding of -the concepts, without insisting on too much mathematical rigour. The most important goal is -to introduce and define the concept of a tensor, without resorting to the usual mathematical -definition, which is not very intuitive.

-

Simultaneously, the lecture also showcases some of the features of -TensorKit.jl, a Julia package that is extremely -well-suited for the demonstration of the concepts that are discussed.

-
-
-
using TensorKit
-
-
-
-
-

Before discussing tensor networks, it is necessary to understand what tensors are. -Furthermore, before really understanding tensors, it is instructive to reiterate some basic -concepts of linear algebra for the case of vectors and matrices, which are nothing but -specific cases of tensors. In fact, many of the concepts and ideas that are introduced and -discussed are defined in terms of thinking of tensors as vectors or matrices.

-

In what follows, vectors and matrices will be thought of from the viewpoint of computers, -where they are represented using regular one- and two-dimensional arrays of either real or -complex numbers. Nevertheless, much of the discussion can be readily generalized to -arbitrary vector spaces and linear maps.

-
-
-

8.2. Vectors and Matrices#

-

In general, a vector is an object in a vector space, which can be described by a list of -numbers that correspond to the components of the vector in some basis. For example, a vector -in a two-dimensional space is in its most general form described by -\(\vec{v} = \left[v_1, v_2\right]^T\).

-

As a reminder, the defining properties of vector spaces make sure that the following -operations are well-defined:

-
    -
  • Vectors can be added together, i.e. \(\vec{v} + \vec{w}\) is a vector.

  • -
  • Vectors can be multiplied by scalars, i.e. \(\alpha \vec{v}\) is a vector.

  • -
  • These operations behave as expected, i.e. there is a notion of associativity, commutativity, and distributivity.

  • -
-

Given two such vector spaces (not necessarily distinct) it is possible to define a linear -map between them, which is just a function that preserves the vector space structure. In -other words, a linear map \(A \colon V \rightarrow W\) maps vectors from one vector space \(V\) -to another vector space \(W\). Because of the structure of vector spaces, and the requirement -of linearity, such a map is completely determined by its action on the basis vectors of \(V\). -This leads in a very natural way to the notion of a matrix by considering the following -construction, where \(v_i\) are the components of \(\vec{v}\) and \(w_i\) are the components of -\(\vec{w}\):

-
-(8.1)#\[\begin{split}\begin{array}{rcl} -A & : & V \rightarrow W\\ - & & \vec{v} ↦ A(\vec{v}) \equiv \sum_j A_{ij} v_j = w_i \equiv \vec{w} -\end{array}\end{split}\]
-

where \(A_{ij}\) are the components of the matrix \(A\) in these bases. In other words, the -abstract notion of a linear map between vector spaces can be represented by a concrete -matrix, and the action of the map is the usual matrix product.

-

In particular, it is instructive to think of the columns of the matrix \(A\) as labelling the -components of the input vector space, also called domain, while the rows label the -component of the output vector space, or codomain.

-

In the context of Julia, we can create vector spaces, vectors and matrices through a syntax -that follows this very closely:

-
-
-
V = ^2             # type as \bbC<TAB> 
-W = ComplexSpace(3) # equivalent to ℂ^3
-
-A = TensorMap(rand, Float64, W  V) # ← as \leftarrow<TAB>
-v = Tensor(rand, Float64, V)
-w = A * v
-
-w[1]  A[1,1] * v[1] + A[1,2] * v[2]
-
-
-
-
-
true
-
-
-
-
-
-

Note

-

For linear maps, both notations \(V \rightarrow W\) and \(W \leftarrow V\) are used to denote -their codomain and domain. The choice of notation is mostly a matter of taste, as left to -right might seem more conventional for a language that reads from left to right, while right -to left is more natural when considering the mathematical usage, where matrices typically -act on vectors from left to right. In TensorKit, both notations are supported through the - and operators, and a Unicode-less version is also available, which defaults to . -Thus, the following are all equivalent:

-
A = TensorMap(rand, Float64, V  W)
-A = TensorMap(rand, Float64, W  V)
-A = TensorMap(rand, Float64, W, V)
-
-
-
-
-
-

8.3. Tensors and Tensor Products#

-

Using the same logic as above, it is possible to generalize the notion of a linear map by -making use of the tensor product, which is -nothing but an operation that can combine two vector spaces \(V\) and \(W\) into a new vector -space \(V \otimes W\). The tensor product is defined in such a way that the combination of -vectors from the original vector spaces preserves a natural notion of linearity, i.e. the -following equality holds for all vectors \(v \in V\), \(w \in W\), and scalars \(\lambda\):

-
-(8.2)#\[(\lambda v) \otimes w = v \otimes (\lambda w) = \lambda (v \otimes w)\]
-
-
-
λ = rand()
-(λ * v)  w  v  (λ * w)  λ * (v  w)
-
-
-
-
-
true
-
-
-
-
-

This new vector space can be equipped with a canonical basis, which is constructed by taking -the tensor product of the basis vectors of the original vector spaces. For example, if \(V\) -and \(W\) are two-dimensional vector spaces with basis vectors \(v_i\) and \(w_j\), respectively, -then the basis vectors of \(V \otimes W\) are given by \(v_i \otimes w_j\). In other words, the -vectors in \(V \otimes W\) are linear combinations of all combinations of the basis vectors of -\(V\) and \(W\).

-

When considering how to represent a vector in this new vector space, it can be written as a -list of numbers that correspond to the components of the vector in that basis. For example, -a vector in \(V \otimes W\) is described by:

-
-(8.3)#\[t = \sum_{i_1,i_2} t_{i_1i_2} (v_{i_1} \otimes w_{i_2})\]
-
-
-
t = Tensor(rand, Float64, V  W)
-t[] # shorthand for extracting the multi-dimensional array of components
-
-
-
-
-
2×3 StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}:
- 0.526571  0.413696  0.719603
- 0.487646  0.238492  0.286419
-
-
-
-
-

Here, the tentative name \(t\) was used to denote that this is in fact a tensor, where -\(t_{i_1i_2}\) are the components of that tensor \(t\) in the basis \(v_{i_1} \otimes w_{i_2}\). -Because of the induced structure of the tensor product, it is more natural and very common -to express this object not just as a list of numbers, but by reshaping that list into a -matrix. In this case, the components of the \(i_1\)-th row correspond to basis vectors that -are built from \(v_{i_1}\), and similarly the \(i_2\)-th column corresponds to basis vectors -that are built from \(w_{i_2}\).

-

As the tensor product can be generalized to more than two vector spaces, this finally leads -to the general definition of a tensor as an element of the vector space that is built up -from the tensor product of an arbitrary number of vector spaces. Additionally, the -components of these objects are then naturally laid out in a multi-dimensional array, which -is then by a slight misuse of terminology also called a tensor.

-
-

Note

-

The reshaping operation of components from a list of numbers into a multi-dimensional array -is a mapping between linear indices \(I\) and Cartesian indices \(i_1, i_2, \cdots, -i_N\). This is a very common and useful trick which allows reinterpreting tensors as vectors, -or vice versa.

-
-
-
-
LinearIndices((1:2, 1:3))
-
-
-
-
-
2×3 LinearIndices{2, Tuple{UnitRange{Int64}, UnitRange{Int64}}}:
- 1  3  5
- 2  4  6
-
-
-
-
-
-
-
collect(CartesianIndices((1:2, 1:3))) # collect to force printing
-
-
-
-
-
2×3 Matrix{CartesianIndex{2}}:
- CartesianIndex(1, 1)  CartesianIndex(1, 2)  CartesianIndex(1, 3)
- CartesianIndex(2, 1)  CartesianIndex(2, 2)  CartesianIndex(2, 3)
-
-
-
-
-
-
-

8.4. Tensors and Multi-Linear Maps#

-

Due to the fact that the tensor product of vector spaces is a vector space in of itself, it -is again possible to define linear maps between such vector spaces. Keeping in mind the -definition of a linear map from (8.1), the columns now label components of the -input vector space, while the rows label components of the output vector space. Now however, -the components of the input and output vector spaces are themselves comprised of a -combination of basis vectors from the original vector spaces. If a linear order of these -combinations can be established, the linear map can again be represented by a matrix:

-
-(8.4)#\[\begin{split}\begin{array}{rcl} -A & : & W_1 \otimes W_2 \otimes \cdots \otimes W_M \leftarrow - V_1 \otimes V_2 \otimes \cdots \otimes V_N \\ - & & v_1 \otimes v_2 \otimes \cdots \otimes v_N \mapsto - A(v_1 \otimes v_2 \otimes \cdots \otimes v_N) \\ - & & = \sum_{j_1, j_2, \cdots, j_N} A_{i_1, i_2, \cdots, i_M; j_1, j_2, \cdots, j_N} - v_{1, j_1} \otimes v_{2, j_2} \otimes \cdots \otimes v_{N, j_N} \\ - & & = \sum_{J} A_{I;J} v_J \\ - & & = w_1 \otimes w_2 \otimes \cdots \otimes w_M \\ -\end{array}\end{split}\]
-
-
-
V1 = ^2
-V2 = ^2
-W1 = ^2
-W2 = ^2
-
-A = TensorMap(rand, Float64, W1  W2  V1  V2)
-v = Tensor(rand, Float64, V1  V2)
-w = A * v
-w[]  reshape(reshape(A[], 4, 4) * reshape(v[], 4), 2, 2)
-
-
-
-
-
true
-
-
-
-
-

The attentive reader might have already noted that the definition of a linear map as a -matrix strongly resembles the definition of a vector in a tensor product vector space. This -is not a coincidence, and in fact the two can easily be identified by considering the -following identification (isomorphism):

-
-(8.5)#\[(W \leftarrow V) \cong (W \otimes V^*) \]
-
-
-
A = TensorMap(rand, Float64, W  V)
-B = Tensor(rand, Float64, W  V')
-space(A, 2) == space(B, 2)
-
-
-
-
-
true
-
-
-
-
-
-

Note

-

For finite-dimensional real or complex vector spaces without additional structure, this -isomorphism is trivial and is just the reshaping operation of the components of a vector -into a matrix. However, note that this is a choice, which is not unique, and already differs -for -row- and column-major order. In -a more general setting, the identification between \(V \otimes W^*\) and \(V \leftarrow W\) is -not an equivalence but an isomorphism. This means that it is still possible to relate one -object to the other, but the operation is not necessarily trivial.

-
-
-
-

8.5. Conclusion#

-

The entire discussion can be summarized and leads to the following equivalent definitions of -a tensor:

-
    -
  • A tensor is an element of a tensor product of vector spaces, which can be represented as a multi-dimensional array of numbers that indicate the components along the constituent basis vectors. Thus, a tensor is vector-like.

  • -
  • A tensor is a multi-linear map between vector spaces, which can be represented as a matrix that represents the action of the map on the basis vectors of the input vector space. Thus, a tensor is matrix-like.

  • -
-

The equivalence of these two definitions leads to the lifting of many important facets of -linear algebra to the multi-linear setting.

-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/2-TensorNetworks/Symmetries.html b/pr-preview/pr-27/2-TensorNetworks/Symmetries.html deleted file mode 100644 index f075bc0e..00000000 --- a/pr-preview/pr-27/2-TensorNetworks/Symmetries.html +++ /dev/null @@ -1,1118 +0,0 @@ - - - - - - - - - - - - - 11. Symmetries in Quantum Many-Body Physics — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Symmetries in Quantum Many-Body Physics

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

11. Symmetries in Quantum Many-Body Physics#

-

The goal of this section is to give a very gentle introduction to the concept of symmetries -in quantum many-body physics, and the notion of symmetric tensors. The general mathematical -framework of symmetries in physics (or at least the framework we will restrict to) is that -of group - and representation theory. Our goal is not to take this framework as a given and -illustrate it, but rather to first discuss a couple of important applications of symmetries -in the context of some concrete models and gradually build up to the more general framework. -We will finish our discussion with an outlook to generalizations of the framework presented -here. It goes without saying that we will only scratch the surface of this vast topic. The -interested reader is referred to the immense literature on this topic, or to a more -specialized course.

-
-

11.1. Examples and Applications#

-
-

11.1.1. Symmetry Breaking, Order Parameters and Phases#

-

Recall the one-dimensional transverse field Ising model defined above. Its degrees of -freedom are qubits ordered on a one-dimensional lattice, and its Hamiltonian reads

-
-\[H = -\sum_{i} \sigma^z_i\sigma^z_{i+1} -h_x\sum_i\sigma^x_i.\]
-

Let us simply consider periodic boundary conditions. Besides the obvious translation -symmetry, which we will discuss below, this model is also invariant under flipping all spins -simultaneously in the Z-direction, i.e. in the Pauli Z basis: -\(\ket{\uparrow}\leftrightarrow\ket{\downarrow}\). That this operation constitutes a symmetry -is clear from the Hamiltonian as the energy of the first term only depends on the -neighbouring spins being (anti-)aligned, which is clearly spin flip-invariant. The second -spin is trivially invariant as this models an external magnetic field which is orthogonal to -the Z-direction.

-

This spin flip is “implemented”, or more correctly “represented”, by the unitary operator -\(P=\bigotimes_i \sigma^x_i\). Notice that \(P^2=1\) in accordance with our intuition that -flipping all the spins twice is equivalent with leaving all spins untouched. The fact that -this operator represents a symmetry of the model then translates to \([H,P]=0\), or -equivalently \(P^\dagger HP=H\). Notice that the identity operator is also trivially a -symmetry (of every model) and thus the set \(\{1,P\}\) is closed under taking the product.

-

Even though the Hamiltonian has the symmetry regardless of the value of the parameter \(h_x\), -you might know from a previous course that the ground state or ground state subspace are not -necessarily invariant under the symmetry, a phenomenon known as spontaneous symmetry -breaking (SSB) or symmetry breaking for short. Let us investigate the ground state subspace -of the transverse field Ising model in the extremal case of vanishing and infinite magnetic -field.

-
    -
  • \(h_x\rightarrow \infty\) In this case the model effectly reduces to a paramagnet. The -unique ground state is the product state \(\ket{\Psi_+}=\ket{+}^{\otimes N}\) where -\(\ket{+}=\frac{1}{\sqrt{2}}(\ket{\uparrow}+\ket{\downarrow})\) is the unique eigenvalue 1 -eigenvector of \(\sigma^x\). Notice that this state is invariant under the symmetry operator -\(P\), \(P\ket{\Psi_+}=\ket{\Psi_+}\). In other words, the ground state in this case is -symmetric. For reasons mentioned below this state is also considered to be disordered.

  • -
  • \(h_x=0\) In this case the energy is minimized by aligning all the spins and the model -behaves as a classical ferromagnet. Obviously, two distinct ground states are -\(\ket{\Psi_\uparrow}=\ket{\uparrow\uparrow...\uparrow}\) and -\(\ket{\Psi_\downarrow}=\ket{\downarrow\downarrow...\downarrow}\). Contrary to the previous -case they span a two-dimensional ground state subspace, and these states are not -symmetric. In fact, under the action of \(P\) they get mapped onto the other: -\(P\ket{\Psi_\uparrow}=\ket{\Psi_\downarrow}\) and vice versa. The ground state in this case -is thus symmetry broken, or ordered.

  • -
-

Since the ground state degeneracy is necessarily an integer, it is clear that it can not -change smoothly from two to one when the magnetic field is slowly turned on from -\(h_x = 0 \rightarrow \infty\). Therefore the Ising model for small \(h_x\) and large \(h_x\) are -said to belong to different phases, and for some finite value of \(h_x\) a phase transition -where the ground state degeneracy changes abruptly is expected to take place. As it turns -out, this change happens for \(h_x = 1\), at which point the Ising model becomes critical.

-

Inspired by the credo of symmetry we can introduce a local operator which probes the phase -and can witness the phase transition. In the case of the Ising model this order parameter is -the local magnetisation on every site: \(O=\sum_i\sigma^z_i\). It is clear that this order -parameter anticommutes with the symmetry, \(P^\dagger OP=-O\), from which it follows that in -the symmetric phase the expectation value of the order parameter vanishes, -\(\braket{\Psi_+|O|\Psi_+}=0\), while in the ferromagnetic phase -\(\braket{\Psi_\uparrow|O|\Psi_\uparrow}>0\) and -\(\braket{\Psi_\downarrow|O|\Psi_\downarrow}<0\). Notice however that for the latter we could -also have chosen the ground state \(\ket{\Psi_\uparrow}+\ket{\Psi_\downarrow}\) in which case -the expectation value of \(O\) becomes 0. So it seems that the expectation value of the order -parameter is ill-defined is this phase. This can be remedied by first adding a small -symmetry breaking term \(\lambda\sum_i\sigma^z_i\) to the Hamiltonian which, depending on the -sign of \(\lambda\), selects one of the ground states \(\ket{\Psi_{\uparrow/\downarrow}}\) after -which the limit \(\lambda\rightarrow 0\) is taken.

-

The synopsis of this example is thus the following. Symmetries in quantum many-body physics -(but also in single-particle quantum mechanics) are represented by unitary operators which -are closed under multiplication. Depending on the parameters in the Hamiltonian, part of -these symmetries can be broken by the ground state subspace, and this pattern of symmetry -breaking is a hallmark feature of different phases of the model. Different phases can be -probed by a local order parameter which does not commute with the symmetries. This paradigm -of classifying phases based on symmetry principles was first put forward by Landau -[Landau, 1937], and since then bears his name.

-
-
-

11.1.2. Noether and Conserved Quantitites#

-

You might remember Noether’s theorem from a course on field theory. It states that every -continuous symmetry of a system (in field theory most often defined via its Lagrangian) -gives rise to a conserved current. In the context of quantum physics Noether’s theorem -becomes almost trivial and states that the expectation value of every operator that commutes -with the Hamiltonian has a conserved expectation value:

-
-\[[H, O] = 0 \implies \frac{d}{dt}\braket{\Psi(t)|O|\Psi(t)} = 0.\]
-

The proof is almost trivial and is left as a simple exercise.

-
    -
  • The simplest example of this principle is obviously the Hamiltonain that trivially -commutes with itself. The consequence is that the expectation value of the total energy is -conserved.

  • -
  • Another example is that of translation symmetry. Translation symmetry is implemented by -the operator \(T\) that acts on local operators \(O_i\) via \(T^\dagger O_iT=O_{i+1}\). Since -for a system with \(N\) sites we obviously have the identity \(T^N=1\), and \(T\) is unitary, -the eigenvalues of \(T\) are phases \(\exp(2\pi ip/N)\) where the quantum number -\(p=0,1,...,N-1\) is the momentum. By virtue of Noether, translation invariance is -understood to give rise to conservation of momentum, and thus momentum acts as a good -quantum number for the eigenstates of translationally invariant models.

  • -
-

Let us consider another non-trivial example to illustrate the implications of this theorem. -Recall the spins \(s\) XXZ Heisenberg model whose Hamiltonian reads

-
-\[H = -J\sum_i S^x_iS^x_{i+1}+S^y_iS^y_{i+1}+\Delta S^z_iS^z_{i+1}.\]
-

The spin operators are \(2s + 1\)-dimensional and satisfy the \(\mathfrak{su}(2)\) commutation -relations

-
-\[[\sigma^a_i,\sigma^b_j]=i\delta_{i,j}\sum_c \varepsilon_{abc}S^c_i \]
-

Let us define the total spin

-
-\[S^a = \sum_i S^a_i.\]
-

From a direct computation it follows that in the case where \(\Delta=1\), and the model thus -reduces to the Heisenberg XXX model, \(H\) commutes with all \(S^a\), \([H,S^a]=0\), \(a=x,y,z\). -However, when \(\Delta\neq 1\) only the Z component \(S^z\) commutes with \(H\), \([H, S^z]=0\). -Notice the difference with the Ising model where the same symmetry was present for all -values of \(h_x\).

-

This means that in the \(\Delta=1\) case the Hamiltonian is symmetric under the full \(SU(2)\) -(half integer s) or \(SO(3)\) (integer s) symmetry (see below), whereas when \(\Delta\neq 1\) -only an \(SO(2)\simeq U(1)\) symmetry generated by \(S^z\) is retained. If \(H\) commutes with -\(S^z\) it follows that it automatically also commutes with \(\exp(i\theta S^z)\), -\(\theta\in[0,2\pi)\). This operator has an interpretation as a rotation around the Z-axis -with an angle \(\theta\).

-

According to Noether the Heisenberg model thus has conserved quantities associated with -these operators. Regardless of \(\Delta\) the Z component of the total spin is conserved, and -for \(\Delta=1\) all components of the total spin are conserved. In particular this means that -the eigenvalue \(M_z\) of \(S^z\) and \(S(S+1)\) of \(\vec{S}\cdot\vec{S}\) are good quantum numbers -to label the eigenstates of the Heisenberg Hamiltonian.

-
-
-
-

11.2. Group and Representation Theory#

-

Motivated by the examples from above, we will gently introduce some notions of group - and -representation theory that form the backbone of a general theory of symmetries.

-
-

11.2.1. Group Theory#

-

Roughly speaking a group \(G\) is a set of symmetry operators and a multiplication rule on how -to compose them. Let us motivate the definition one step a time.

-

First of all notice that a model can have a finite or infinite (discrete or continuous) -number of symmetries. Clearly, the spin flip symmetry of the Ising model consists of only -one non-trivial symmetry operation, namely flipping all spins. The operator carrying out -this transformation is \(P=\bigotimes_i\sigma^x_i\). The XXZ model however has a continuous -symmetry, namely rotations around the Z-axis, that is implemented via \(\exp(i\theta S^z)\), -\(\theta\in[0,2\pi)\), where we should really think about every value of \(\theta\) as labeling -a different symmetry operation.

-

These symmetries can be composed or multiplied to form a new symmetry operation. Take for -example flipping all the spins. Flipping all spins twice results in not flipping any spins -at all, which is trivially also a symmetry of the Hamiltonian. Next, consider also the -\(U(1)\) symmetry of the XXZ model. First rotating over \(\theta_2\) and then over \(\theta_1\) -gives a new rotation over \(\theta_1+\theta_2\): \(\exp(i\theta_1 S^z)\exp(i\theta_2 -S^z)=\exp(i(\theta_1+\theta_2) S^z)\). This leads to the first part of the definition of what -a group is.

-
    -
  1. A group \(G\) is a set \(G=\{g_1,g_2,...\}\) endowed with a multiplication \(G\times -G\rightarrow G\). There exists an identity \(1\in G\) for the multiplication such that -\(1g=g1=g, \forall g\in G\).

  2. -
-

Note that this multiplication is not necessarily abelian. A simple example is the full -\(SU(2)\) symmetry of the XXX model defined above. However, the composition of symmetries is -still associative:

-
    -
  1. For all group elements \(g,h,k\) we have that \(g(hk)=(gh)k\).

  2. -
-

A property we also would like to formalize is the fact that every symmetry transformation -can be undone. Take for example a \(U(1)\) rotation \(\exp(i\theta S^z)\), if we compose it with -the opposite rotation \(\exp(i(2\pi-\theta) S^z)\) we get the identity. Hence:

-
    -
  1. Every group element \(g\) has a unique inverse \(g^{-1}\): \(gg^{-1}=g^{-1}g=1\).

  2. -
-

Together 1. 2. and 3. constitute the definition of a group. Before mentioning some examples -let us also introduce the concept of a subgroup. As the name suggests, a subgroup is a -subset of a group which itself constitutes a group. Note for example that a rotation over -\(\pi\), \(\exp(i\pi S^z)\), together with the identity, generates a subgroup of \(\{\exp(2\pi -i\theta S^z|\theta\in[0,2\pi)\}\) with two elements.

-

The concept of subgroups lies at the heart of symmetry breaking. Recall that in the -ferromagnetic phase, the Ising model breaks the spin flip symmetry. In Landau’s paradigm we -say that the pattern of symmetry breaking is \(\mathbb{Z}_2\rightarrow \{1\}\) (see below for -an explanation of the notation). In other words, the full symmetry group (\(\mathbb{Z}_2\)) is -broken in the ferromagnetic phase to a subgroup (the trivial group). More generally, a -theory with a \(G\) symmetry can undergo a pattern of symmetry breaking \(G\rightarrow H\) where -\(H\) is a subgroup of \(G\). The meaning of this symbolic expression is that the ground states -keep an H symmetry, and the ground state degeneracy is \(|G|/|H|\).

-
-

11.2.1.1. Examples#

-
    -
  • The trivial group is a group with only one element that is than automatically also the -identity, and a trivial multiplication law. Above, it was denoted by \(\{1\}\).

  • -
  • \(\mathbb{Z}_N\) is the additive group of integers modulo \(N\). The group elements are the -integers \(\{0,1,...,N-1\}\) and the group multiplication is addition modulo \(N\). Hence it -is clearly a finite group. In particular, the spin flip symmetry from above corresponds to -the group \(\mathbb{Z}_2\). Notice that for all \(N\) \(\mathbb{Z}_N\) is abelian.

  • -
  • Another abelian group is \(U(1)\). This group is defined as -\(U(1)=\left\{z\in\mathbb{C}:|z|^2 = 1\right\}\), with group multiplication the -multiplication of complex numbers. Note we encountered this group in the XXZ model as -being the rotations around the Z axis: \(\{\exp(2\pi i\theta S^z|\theta\in[0,2\pi)\}\).

  • -
  • \(SU(2)\) is the group of unimodular unitary \(2\times 2\) matrices:

    -
    -\[SU(2) := \left\{U \in \mathbb{C}^{2\times 2} | - \det U = 1, UU^\dagger = U^\dagger U = \mathbb{I}\right\}.\]
    -

    The group multiplication is given by group multiplication. Similarly, one defines -\(SU(N),N\geq 2\). Note that none of these groups are abelian.

    -
  • -
  • The 3D rotation group or special orthogonal group \(SO(3)\) is the group of real \(3\times 3\) -orthogonal matrices with unit determinant:

    -
    -\[SO(3) := \left\{M\in\mathbb{R}^{3\times 3}|MM^T=M^TM=\mathbb{I},\det M=1\right\}.\]
    -

    Similarly, one defines \(SO(N),N\geq 2\). Note that only \(SO(2)\) is abelian.

    -
  • -
-
-
-
-

11.2.2. Representation Theory#

-

In the above examples, we were dealing with the question which symmetry transformations -leave the Hamiltonian (and in the absence of symmetry breaking also the ground states) -invariant. These symmetry representations were implemented (represented) by invertible -linear operators, non-singular matrices, that form a closed set under multiplication. This -multiplication structure is what we identified as a group. What we could now do, is to take -a group as given, and wonder which linear transformations we can come up with that multiply -according to these multiplication rules. This is exactly the underlying idea of -representation theory. Representation theory deals with the question how groups can linearly -act on vector spaces.

-

This immediately raises a plethora of questions such as if we can classify all -representations (up to some kind of equivalence), if there exists ‘minimal’ representations -and how we can construct new representations of known ones. A minimal answer to these -questions is the goal of this section.

-
-

11.2.2.1. Definition#

-

For the sake of these notes, a representation of a group \(G\) is thus a set of matrices -indexed by the group elements, \(\{X_g|g\in G\}\) that multiply according to the -multiplication rule of \(G\):

-
-\[X_gX_h = X_{gh}\]
-

Note that the identity is always mapped to the identity matrix!

-

We call the dimension of the matrices \(X_g\) the dimension of the representation.

-
-
11.2.2.1.1. Examples#
-
    -
  • Every group can be trivially represented by mapping every group element to the ‘matrix’ -(1). Obviously, this representation is one-dimensional and is called the trivial -representation.

  • -
  • Probably the simplest non-trivial representation, is the representation of \(\mathbb{Z}_2\) -that maps the non-trivial element to -1. Concretely, \(X_0=1, X_1=-1\), and indeed -\(X_1X_1=(-1)^2=X_0\). This representation is called the sign representation.

  • -
  • Let us construct a two-dimensional representation of \(\mathbb{Z}_2\). Since the Pauli -matrix \(\sigma^x\) (as any other Pauli matrix) squares to the identity, \(\sigma^x\) together -with the two-dimensional identity matrix constitutes a two-dimensional representation of -\(\mathbb{Z}_2\). In the notation from above, \(X_0=\mathbb{I}_2\), \(X_1=\sigma^x\). This -representation is called the regular representation of \(\mathbb{Z}_2\).

  • -
-
-
-
-

11.2.2.2. Complex Conjugate Representation, Tensor Product and Direct Sum Representation#

-

Given a representation \(\{X_g|g\in G\}\), the complex conjugate representation \(\bar X\) is -defined as \(\bar X=\{\bar X_g|g\in G\}\) which satisfies the defining property of -representations via \(\bar X_g\bar X_h= \overline{X_gX_h}=\bar X_{gh}\).

-

Given two representations of \(G\), \(X\equiv\{X_g|g\in G\}\) and \(Y\equiv\{Y_g|g\in G\}\), there -are two obvious ways to construct a new representation.

-

The first one is the tensor product representation defined via the Kronecker product of -matrices:

-
-\[\{X_g\otimes Y_g|g\in G\}.\]
-

You should check that these still satisfy the defining property of a representation. The -dimension of the tensor product is the product of the dimensions of the two representations -\(X\) and \(Y\).

-

The other one is the direct sum:

-
-\[\{X_g\oplus Y_g|g\in G\}.\]
-

Its dimension is that the sum of the dimensions of \(X\) and \(Y\).

-
-
-

11.2.2.3. Irreducible Representations#

-

It is clear that physical observables should not depend on any choice of basis. Therefore -two representations are (unitarily) equivalent when there is a unitary basis transformation -\(U\) such that \(X_g' =UX_gU^\dagger\). Note that \(U\) is independent of \(g\).

-
-
11.2.2.3.1. Example#
-

Consider again the two-dimensional regular representation of \(\mathbb{Z}_2\) from above. The -basis transformation

-
-\[\begin{split}H=\frac{1}{\sqrt 2} -\begin{pmatrix} - 1 & 1\\ - 1 & -1 -\end{pmatrix}\end{split}\]
-

shows that this representation is equivalent to one where the non-trivial element of -\(\mathbb{Z}_2\) is represented by \(H\sigma^x H^\dagger=\sigma^z\). This illustrates that the -regular representation is equivalent to the direct sum of the trivial representation and the -sign representation!

-

The crux of this example is the following. Some representations can, by an appropriate -choice of basis, be brought in a form where all \(X_g\) are simultaneously block-diagonal:

-
-\[\begin{split}X_g'=UX_gU^\dagger= -\begin{pmatrix} - \fbox{$X^1_g$} & 0 &\cdots\\ - 0& \fbox{$X^2_g$} & \cdots\\ - \vdots & \vdots & \ddots -\end{pmatrix}.\end{split}\]
-

These blocks correspond to invariant subspaces of the representation, i.e. subspaces that -transform amongst themselves under the action of the group.

-

An irreducible representation, irrep for short, can then be defined as a representation that -can not be brought in a (non-trivial) block-diagonal form by any change of basis.

-

It can be shown that every finite group has a finite number of irreps. The sum of the -dimensions squared is equal to the number of elements in the group: \(\sum_\alpha -d_\alpha^2=|G|\) where the sum is over all irreps labeled by \(\alpha\) and \(d_\alpha\) denote -their respective dimensions.

-

One of the key questions of representation theory is what the irreps of a given group are -and how the tensor product of irreps (which is in general not an irrep!) decomposes in a -direct sum of irreps. The latter are sometimes known as the fusion rules. The basis -transformation that reduce a given representation in a direct sum of irreps is sometimes -called the Clebsch-Gordan coefficients, and are for some groups known explicitly. Before -discussing the example of \(SU(2)\), let us first state the most important result in -representation theory which is due to Schur.

-

[Schur’s lemma] If a matrix \(Y\) commutes with all representation matrices of an irreducible -representation of a group G, \(X_gY=YX_g\) \(\forall g\in G\), then \(Y\) is proportional to the -identity matrix.

-
-
-
-

11.2.2.4. Example#

-

The answer to the questions posed above is very well understood for the case of \(SU(2)\). You -probably know the answer from a previous course on quantum mechanics.

-

The irreps of \(SU(2)\) can be labeled by its spin, let us call it \(s\), that takes values -\(s=0,1/2,1,3/2,...\). The dimension of the spin \(s\) representation is equal to \(2s+1\), so -there is exactly one irrep of every dimension. The spin \(s=0\) irrep corresponds to the -trivial representation.

-

The fusion rules can be summarized as

-
-\[s_1\otimes s_2 \simeq \bigoplus_{s=|s_1-s_2|}^{s_1+s_2}s.\]
-

For example: \(\frac{1}{2}\otimes\frac{1}{2}\simeq 0\oplus 1\). The Clebsch-Gordan -coefficients for \(SU(2)\) have been computed analytically, and for low-dimensional irreps -have been tabulated for example -here.

-
-
-
-
-

11.3. Symmetric Tensors#

-

In physics we are often dealing with tensors that transform according to the tensor product -representation of a given group \(G\). A symmetric tensor can then be understood as a tensor -that transforms trivially under the action of \(G\), or more concretely under the tensor -product representation \(X\otimes\bar Y\otimes\bar Z\):

-
-../_images/symmtens.svg -
-

This has strong implications for the structure of the tensor \(T\). Notice that we didn’t -assume the representations \(X,Y\) and \(Z\) to be irreducible. As we argued above, an -appropriate change of basis can bring the representations \(X,Y\) and \(Z\) in block-diagonal -form where every block corresponds to an irrep of the group and every block can appear -multiple times, which we call the multiplicity of an irrep in the representation. Schur’s -lemma then implies that in this basis, the tensor becomes block-diagonal. In an appropriate -matricization of \(T\) we can thus write \(T=\bigoplus_c B_c\otimes\mathbb{I}_c\) where the -direct sum over \(c\) represents the decomposition of \(X\otimes\bar Y\otimes\bar Z\) in irreps -\(c\) that can appear multiple times. In other words, the generic symmetric tensor \(T\) can be -stored much more efficiently by only keeping track of the different blocks \(B_c\).

-

TensorKit is particularly well suited for dealing with symmetric tensors. What TensorKit -does is exactly what was described in the previous paragraph, it keeps track of the block -structure of the symmetric tensor, hereby drastically reducing the amount of memory it takes -to store these objects, and is able to efficiently manipulate them by exploiting its -structure to the maximum.

-

As a simple exercise, let us construct a rank 3 \(SU(2)\) symmetric tensor as above. For -example the spin \(1/2\) and spin \(1\) representation can be called via respectively

-
-
-
using TensorKit
-
-s = SU₂Space(1/2 => 1)
-l = SU₂Space(1 => 1)
-
-
-
-
- - -Hide code cell output - -
-
Rep[SU₂](1=>1)
-
-
-
-
-
-

Here, => 1 essentially means that we consider only one copy (direct summand) of these -representations. If we would want to consider the direct sum \(\frac{1}{2}\oplus\frac{1}{2}\) -we would write

-
-
-
ss = SU₂Space(1/2 => 2)
-
-
-
-
- - -Hide code cell output - -
-
Rep[SU₂](1/2=>2)
-
-
-
-
-
-

A symmetric tensor can now be constructed as

-
-
-
A = TensorMap(l  s  s)
-
-
-
-
-
TensorMap(Rep[SU₂](1=>1) ← (Rep[SU₂](1/2=>1) ⊗ Rep[SU₂](1/2=>1))):
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1,), 1, (false,), ()) ← FusionTree{Irrep[SU₂]}((1/2, 1/2), 1, (false, false), ()):
-[:, :, 1] =
- 0.0
-
-
-
-
-

This tensor then has, by construction, the symmetry property that it transforms trivially -under \(1\otimes\bar{\frac{1}{2}}\otimes\bar{\frac{1}{2}}\). The blocks can then be inspected -by calling blocks on the tensor, and we can also check that the dimensions of the domain -and codomain are as expected:

-
-
-
@assert dim(domain(A)) == 4
-@assert dim(codomain(A)) == 3
-blocks(A)
-
-
-
-
-
TensorKit.SortedVectorDict{SU2Irrep, Matrix{Float64}} with 1 entry:
-  1 => [0.0;;]
-
-
-
-
-

We see that this tensor has one block that we can fill up with some data of our liking. Let -us consider another example

-
-
-
B = TensorMap(s  s  s)
-blocks(B)
-
-
-
-
-
TensorKit.SortedVectorDict{SU2Irrep, Matrix{Float64}}()
-
-
-
-
-

This tensor does not have any blocks! This is compatible with the fact that two spin 1/2’s -cannot fuse to a third spin 1/2. Finally let us consider a tensor with with more blocks:

-
-
-
C = TensorMap(ss  ss)
-blocks(C)
-
-
-
-
-
TensorKit.SortedVectorDict{SU2Irrep, Matrix{Float64}} with 1 entry:
-  1/2 => [2.3342e-313 6.15379e-313; 3.39519e-313 6.92768e-310]
-
-
-
-
-

This tensor has four non-trivial entries.

-
-
-

11.4. Outlook and generalizations#

-

Let us conclude with an outlook and some generalizations.

-
    -
  • Besides the “global” symmetries we considered here, you might also be familiar with gauge -symmetries from another course. Gauge theories are ubiquitous in physics and describe a -plethora of interesting physical phenomena. Gauge symmetries should however not be thought -of as actual symmetries transforming physically different states into each other, but -rather describe a redundancy in the description of the system. Nevertheless, group theory -also lies at the heart of these theories.

  • -
  • In this brief overview we mostly neglected spatial symmetries. Spatial symmetries can be -understood as transformations that translate, rotate or reflect the lattice. These kind of -symmetries thus don’t act “on site” anymore. The full classification of spatial symmetry -groups is notoriously rich and beautiful, especially in higher dimensions, and exploiting -them in algorithms can result in tremendous speedup and stability. We already encountered -the example of translation symmetry. One of the benefits of exploiting this symmetry in -tensor networks is e.g. that if the ground state of an infinite one-dimensional model does -not break translation invariance, this ground state can be well modelled by a uniform -matrix product state, a matrix product state consisting of one tensor repeated -indefinitely.

  • -
  • Inspired by the discovery of topological phases of matter and their anyonic excitations, -there has been a growing fascination with the exploration of non-invertible, or -categorical symmetries. These symmetries are beyond the scope of these notes. These -categorical symmetries are not described by groups but by more general and intricate -algebraic structures called fusion categories, of which (finite) groups and their -representations are specific examples. For an example of how spin chains with categorical -symmetries can be constructed, see for example [Feiguin et al., 2007]. TensorKit -allows for an efficient construction and storage of tensors which are symmetric with -respect to these more general kind of symmetries.

  • -
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/2-TensorNetworks/TensorNetworkStates.html b/pr-preview/pr-27/2-TensorNetworks/TensorNetworkStates.html deleted file mode 100644 index 7880b826..00000000 --- a/pr-preview/pr-27/2-TensorNetworks/TensorNetworkStates.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - - - - - - - - 10. Tensor Network States — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - -
- On this page -
- - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Tensor Network States

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

10. Tensor Network States#

-

After our introduction on quantum many body systems and -tensor networks, we move on to considering how tensor networks can -characterize many-body systems. We start with a constructive approach to approximating an -arbitrary quantum state by a tensor network state. We then qualify in what settings such a -representation is efficient, and introduce several classes of tensor network states used in -different settings. We end this section by broadly commenting on how efficient manipulations -of tensor network states can be used to simulate quantum systems.

-
-

10.1. Quantum States as Tensor Networks#

-

Consider a quantum many body system which consists of physical spins with a local Hilbert -space \( \mathbb H_i = \mathbb C^d \) of dimension \( d \), which we will call the physical -dimension, are located at every site \( i \) of some lattice \( \Lambda \). This gives rise to -a total Hilbert space of the system \( \mathbb H = \bigotimes_{i = 1}^{N} \mathbb H_i = -\left( \mathbb C^d \right)^{\otimes N}\) where \( N = |\Lambda| \) is the total number of sites -in the lattice. A general quantum state in this many-body Hilbert space can be -represented in terms a set of \(d^N\) complex coefficients \(C_{s_1,s_2,...,s_N} \in \mathbb -C\), where \(s_i\in \{0,...,d-1\}\), with respect to the computational basis as

-
-\[\ket{\psi} = \sum_{s_1,s_2,...,s_N} C_{s_1,s_2,...,s_N}\ket{s_1,s_2,...,s_N}.\]
-

The exponential increase in the number of coefficients with the system size means that it is -entirely impossible to store the full state vector of a quantum system of any reasonable -size in this way. For example, a system of \(N=100\) spins with \(d=2\) has \(2^{100} \approx -10^{30}\) coefficients, which is far more than the number of atoms in the universe.

-

Instead of directly storing this full state vector, we can alternatively parametrize it as a -tensor network. Consider for example the case \(N=4\). We can then represent the state vector -as a tensor \(C_{s_1,s_2,s_3,s_4}\) with four indices, where each index corresponds to a -physical spin. The full state is then recovered as

-
-../_images/full_state.svg -
-

We can now split the full tensor \(C\) into separate components by consecutively applying the -SVD between pairs of physical indices. For example, splitting out the first index we can -rewrite \(C\) as

-
-../_images/svd1.svg -
-

In this expression we can interpret \(L^{(1)}\) a a \(d \times D\) matrix, \(\lambda^{(1)}\) as a -\(D \times D\) matrix and \(R^{(1)}\) as a \(D\) by \(d^{N-1}\) matrix. The horizontal edge in this -diagram is called a virtual bond and the dimension \(D\) of this bond is called the bond -dimension. The bond dimension is a measure of the entanglement in the state, and in this -case encodes the amount of entanglement between the first site and the rest of the system. -So far we have not actually done anything significant, since this decomposition of \(C\) -actually increased the total number of required coefficients, instead of reducing it. The -key point is that we can reduce the number of parameters by truncating \(\lambda^{(1)}\) to -only keep the \(D\) largest singular values. This results in a low rank approximation of the -original state, where the quality of the approximation is controlled by the chosen final -bond dimension \(D\).

-

By repeatedly applying this procedure, grouping and splitting indices in the resulting -diagrams and absorbing the bond tensors \(\lambda^{(i)}\) into the site tensors we can -decompose \(C\) into a tensor network of any geometry. For example, we can approximate \(C\) as -the contraction of a square network to end up with a tensor network state of the form

-
-../_images/tn_state.svg -
-

In words, this expression means that for every basis state \( \ket{s_1,s_2,s_3,s_4} \) its -corresponding coefficient in the superposition is obtained by indexing all of the physical -legs pointing downward according to the corresponding physical basis state and contracting -the resulting network.

-

We can therefore parametrize an arbitrary quantum state in terms of a set of local tensors -\(A^{(i)}\), where each of these tensors encodes a number of parameters that is polynomial in -its physical dimension \(d\) and bond dimensions \(D\) (which can in principle be different for -every virtual bond). For a general quantum state however, a good tensor network state -approximation requires a bond dimension which scales exponentially with the system size, -meaning that we have not actually gained anything in terms of efficiency. However, it turns -out that for many physically relevant states the bond dimension can be bounded by a constant -independent of the system size, in which case the tensor network representation leads to an -exponential reduction in the number of variational parameters.

-
-
-

10.2. Area Laws and Tensor Network States#

-

To see why this is the case, let us study the entanglement entropy of a tensor network -state. Consider the following two-dimensional network, where all physical indices have a -dimension \(d\) and we assume all virtual bonds have the same dimension \(D\),

-
-../_images/peps.svg -
-

We now want to quantify the entanglement between the shaded region \( \mathcal A\) and the -rest of the system for this specific state. To this end, we first recall the formula for the -bipartite entanglement entropy Eq. (6.1), and note that the number of -terms in this expression is determined by the number of non-zero Schmidt coefficients, the -latter of which is referred to as the Schmidt rank. Looking back now at our initial -decomposition of the full state tensor \(C\) by splitting out its first index above, we see -that the Shchmidt rank is precisely given by the bond dimension \(D\) across this cut. From -this, you should be able to convince yourself that the maximal entanglement entropy across -this cut is determined by the bond dimension as \(S \sim \log(D)\). Extending this line of -reasoning to our question of the entanglement between the region \( \mathcal A\) and the rest -of the system, we see that each virtual leg connecting \(\mathcal A\) to the rest of the -system can contribute a term \(\log(D)\) to the entanglement entropy. Therefore we arrive at

-
-\[S(\mathcal A) \sim \log(D) \; \partial \mathcal A,\]
-

where \( \partial \mathcal A \) is the size of the boundary of \(\mathcal A\) (which in this -two-dimensional case is its perimeter).

-

Clearly, this tensor network state then naturally obeys an area law for its entanglement -entropy. In our discussion of the -low temparature properties of quantum many body systems however, we have -already seen that low-energy states of locally interacting Hamiltonians obey exactly such an -area law. It is this fact that tensor network states inherently encode area law entanglement -that makes them so well suited for representing low-energy states of quantum systems. They -can only target a tiny corner of the full exponentially large Hilbert space, but this corner -is precisely where the most relevant physics happens. This observation has given rise to a -large family of tensor network states which allow for an efficient parametrization of states -with varying geometries.

- -
-

Note

-

An equally important feature of tensor networks is that they, aside from providing an -efficient parametrization of states, also allow for efficient manipulations of these -states. This means that they can be used to compute interesting features of quantum systems, -and can be optimized to target states of specific interest such as ground states and -low-lying excitations. For all of the network geometries depicted above there exist -corresponding algorithms that put them to efficient use, some of which will be highlighted -in future sections of this tutorial.

-
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/2-TensorNetworks/TensorNetworks.html b/pr-preview/pr-27/2-TensorNetworks/TensorNetworks.html deleted file mode 100644 index d99ffc44..00000000 --- a/pr-preview/pr-27/2-TensorNetworks/TensorNetworks.html +++ /dev/null @@ -1,1112 +0,0 @@ - - - - - - - - - - - - - 9. Tensor Network Theory — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Tensor Network Theory

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

9. Tensor Network Theory#

- -
-

9.1. Overview#

-

In this lecture we will introduce the basic concepts of tensor network theory. We will start -with a brief overview of the history of tensor networks and their relevance to modern -physics. We will then introduce the graphical notation that is often used to simplify -expressions, and discuss the relevant operations and decompositions along with their -computation complexity and their relevance to quantum many-body physics.

-

This discussion is largely based on [Bridgeman and Chubb, 2017].

-

This lecture also serves as a brief introduction to -TensorOperations.jl, and showcases some more -features of TensorKit.jl as well. Note that -TensorKit already re-exports the @tensor macro from TensorOperations, so it is not -necessary to import it separately if TensorKit is already loaded.

-
-
-
using TensorKit
-using Test # for showcase testing
-
-
-
-
-
-

9.1.1. History#

-

The history of tensor networks is a fascinating journey through the evolution of profound -theoretical ideas and evolutions, as well as the development of computational methods and -tools. These ideas have been developed in a variety of contexts, but have been especially -relevant to the study of quantum physics and machine learning.

-
    -
  1. Early Foundations:

  2. -
-
    -
  • The roots of tensor networks can be traced back to the early development of linear algebra and matrix notation in the 19th century, pioneered by mathematicians like Arthur Cayley and James Sylvester.

  • -
  • The concept of tensors as multi-dimensional arrays of numbers began to emerge in the late 19th and early 20th centuries.

  • -
-
    -
  1. Matrix Product States and DMRG:

  2. -
-
    -
  • The birth of modern tensor network theory can be attributed to the introduction of MPS in the 1960s (?).

  • -
  • One of the earliest, and still most widely used tensor network algorithm is DMRG. It was developed by Steven White in 1992, and provides one of the most efficient methods for simulating one-dimensional quantum many-body systems.

  • -
-
    -
  1. Quantum Information Theory:

  2. -
-
    -
  • In the 1980s and 1990s, the field of quantum information theory began to emerge, driven by (add names here)

  • -
  • Concepts such as quantum entanglement and quantum information became central to the study of quantum many-body systems.

  • -
-
    -
  1. Higher-Dimensional Tensor Networks:

  2. -
-
    -
  • As the field progressed, tensor network methods were extended to higher-dimensional systems, leading to the emergence of more general tensor network states (TNS)..

  • -
  • Two-dimensional tensor networks such as Projected Entangled Pair States (PEPS) and Multi-scale Entanglement Renormalization Ansatz (MERA) were introduced in the early 2000s.

  • -
-
    -
  1. Tensor Networks in other disciplines:

  2. -
-
    -
  • Many of the concepts and methods developed in the context of tensor networks have been applied to other disciplines, one of the most prominent being machine learning.

  • -
  • Unsuprisingly, they also play a central role in quantum computing, where tensor network algorithms provide a natural language to explore quantum circuit simulations.

  • -
-
    -
  1. Ongoing Research and Applications

  2. -
-
    -
  • Tensor network theory continues to be a vibrant and evolving field with ongoing research in various directions, such as the development of efficient tensor contraction algorithms, the application of tensor networks for understanding quantum phases of matter, the development of tensor network algorithms for quantum computing, and the application of tensor networks to machine learning.

  • -
-
-
-
-

9.2. Graphical Notation and Tensor Operations#

-

One of the main advantages of tensor networks is that they admit a very intuitive graphical -notation, which greatly simplifies the expressions involving numerous indices. This notation -is based on the idea of representing a single tensor as a node in a graph, where the indices -of the tensor are depicted by legs sticking out of it, one for each vector space. As an -example, a rank-four tensor \(R\) can be represented as:

-../_images/R-tensor.svg -
-

9.2.1. Indexing#

-

In this notation, the individual components of the tensor can be recoverd by fixing the open -legs of a diagram to some value, and the resulting diagram is then a scalar. For example, -the component \(R_{i_1,i_2,i_3,i_4}\) is given by:

-../_images/indexing.svg -
-
-

9.2.2. Grouping and Splitting of Indices#

-

Because of the isomorphism (8.5), the legs of the tensor can be freely -moved around, as long as their order is preserved. In some contexts the shape of -the node and the direction of the tensor can imply certain properties, such as making an -explicit distinction between the isomorphic representations, but in what follows we will not -make this distinction.

-

Furthermore, this naturally gives a notion of grouping and splitting of indices, which is -just a reinterpretation of a set of neighbouring vector spaces as a single vector space, and -the inverse operation. For example, the following diagrams are equivalent:

-../_images/grouping.svg -

Owing to the freedom in choice of basis, the precise details of grouping and splitting are -not unique. One specific choice of convention is the tensor product basis, which is -precisely the one we have used in the discussion of multi-linear algebra. More concretely, -one choice that is often used is the Kronecker product, which in the setting of -column-major ordering is given explicitly by grouping indices as follows:

-
-(9.1)#\[I := i_1 + d_1 * (i_2 - 1) + d_1 * d_2 * (i_3 - 1) + d_1 * d_2 * d_3 * (i_4 - 1) + \cdots\]
-

Here \(d_i\) is the dimension of the corresponding vector space, and \(I\) is the resulting -linear index. Note again that so long as the chosen convention is consistent, the precise -method of grouping and splitting is immaterial.

-

This can be conveniently illustrated by the reshape function in Julia, which performs -exactly this operation. For simple arrays, this operation does nothing but change the size -property of the data structure, as the underlying data necessarily needs to be stored in a -linear order in memory, as computer adresses are linear. Because of this, in tensor -networks, these operations are typically left implicit.

-
-
-
A = reshape(1:(2^4), (2, 2, 2, 2))
-B = reshape(A, (4, 2, 2))
-C = reshape(A, (2, 4, 2))
-# ...
-
-
-
-
-
2×4×2 reshape(::UnitRange{Int64}, 2, 4, 2) with eltype Int64:
-[:, :, 1] =
- 1  3  5  7
- 2  4  6  8
-
-[:, :, 2] =
-  9  11  13  15
- 10  12  14  16
-
-
-
-
-
-
-

9.2.3. Outer Products#

-

Of course, in order to really consider a tensor network, it is necessary to consider -diagrams that consist of multiple tensors, or in other words of multiple nodes. The simplest -such diagram represents the outer product of two tensors. This is represented by two -tensors being placed next to each other. The value of the resulting network is simply the -product of the constituents. For example, the outer product of a rank three tensor \(A\) and a -rank two tensor \(B\) is given by:

-../_images/outer-product.svg -
-
-

9.2.4. Traces#

-

More complicated diagrams can be constructed by joining some of the legs of the constituent -tensors. In a matter similar to the conventional Einstein notation, this implies a summation -over the corresponding indices.

-

If two legs from a single tensor are joined, this signifies a (partial) trace of a tensor -over these indices. For example, the trace of a rank three tensor \(A\) over two of its -indices is given by:

-../_images/trace.svg -

In this notation, the cyclic property of the trace follows by sliding one of the matrices -around the loop of the diagram. As this only changes the placement of the tensors in the -network, and not the value, the graphic proof of \(\text{Tr}(AB) = \text{Tr}(BA)\) is found.

-../_images/trace-cyclic.svg -
-
-

9.2.5. Contractions#

-

The most common tensor operation used is contraction, which is the joining of legs from -different tensors. This can equivalently be thought of as a tensor product followed by a -trace. For example, the contraction between two pairs of indices of two rank-three tensors -is drawn as:

-../_images/contraction.svg -

Familiar examples of contraction are vector inner products, matrix-vector multiplication, -matrix-matrix multiplication, and matrix traces.

-
    -
  • \(\langle \vec{x}, \vec{y} \rangle = x_i y_i\)

    -../_images/vecvec.svg -
  • -
  • \(A \vec{x} = A_{ij} x_j\)

    -../_images/matvec.svg -
  • -
  • \(A B = A_{ij} B_{jk}\)

    -../_images/matmat.svg -
  • -
  • \(\text{Tr}(A) = A_{ii}\)

    -../_images/tr.svg -
  • -
-
-
-
-

9.3. Network Contractions#

-

Combining the operations defined above, it is possible to construct arbitrarily complicated -tensor networks, which can then be evaluated by a sequence of pair-wise operations. The -result then reduces to a tensor which has a rank equal to the number of open legs in the -network. For example, the following diagram represents a generic tensor network:

-../_images/network.svg -
-

9.3.1. Notation#

-

In order to evaluate such networks, it is necessary to define a notational convention for -specifying a network with text. One of the most common conventions is that of -Einstein notation, where each index of a -tensor is assigned a label, and repeated labels are implicitly summed over. For example, the outer product, trace, and inner product can respectively be obtained as:

-
-
-
A = rand(2, 2, 2)
-B = rand(2, 2)
-@tensor C[i, j, k, l, m] := A[i, j, k] * B[l, m]
-@tensor D[i] := A[i, j, j]
-@tensor E[i, j, l] := A[i, j, k] * B[l, k]
-size(C), size(D), size(E)
-
-
-
-
-
((2, 2, 2, 2, 2), (2,), (2, 2, 2))
-
-
-
-
-
-

Note

-

The @tensor macro can be used to either create new tensors, using the := assignment, or -to copy data into existing tensors using =. In the latter case, the tensor must already -exist and have the right dimensions, but less additional memory is allocated.

-
-

This notation is very useful indeed, but quickly becomes unwieldy when one wishes to specify -in what order the pairwise operations should be carried out. Thus, in the same spirit but -with a minor modification, the NCON notation was -introduced. In this notation, the indices of a tensor are assigned integers, and pairwise -operations happen in increasing order. Similarly, negative integers are assigned to open -legs, which determine their resulting position. For example, the diagram above -can be written as:

-
-
-
B = rand(2, 2, 2, 2)
-C = rand(2, 2, 2, 2, 2)
-D = rand(2, 2, 2)
-E = rand(2, 2)
-F = rand(2, 2)
-@tensor begin
-    A[-1, -2] := B[-1, 1, 2, 3] * C[3, 5, 6, 7, -2] * D[2, 4, 5] * E[1, 4] * F[6, 7]
-end
-
-
-
-
-
2×2 Matrix{Float64}:
- 2.66961  2.70201
- 2.73193  2.83059
-
-
-
-
-
-
-

9.3.2. Contraction Order and Complexity#

-

While tensor networks are defined in such a way that their values are independent of the -order of pairwise operations, the computational complexity of evaluating a network can vary -wildly based on the chosen order. Even for simple matrix-matrix-vector multiplication, the -problem can easily be illustrated by considering the following two equivalent operations:

-
-\[w = A * (B * v) = (A * B) * v\]
-

If both \(A\) and \(B\) are square matrices of size \(N \times N\), and \(v\) and \(w\) are vectors of -length \(N\), the first operation requires \(2N^2\) floating point operations (flops), while the -second requires \(N^3 + N^2\) flops. This is a substantial difference, and it is clear that -the first operation is to be preferred.

-

More generally, the amount of flops required for contracting a pair of tensors can be -determined by considering the fact that the amount of elements to compute is equal to the -product of the dimensions of the open indices, and the amount of flops required to compute -each element is equal to the product of the dimensions of the contracted indices. Due to -this fact, it is typically the most efficient to minimize the surface area of contraction, -which boils down to the heuristic of minimizing the amount of legs that are cut, also known -as bubbling.

-

Many networks admit both efficient and inefficient contraction orders, and often it is -infeasible to compute the optimal order. Take for example a ladder-shaped network, which is -of particular relevance in the context of Matrix Product States, we can highlight a few -possible contraction orders, for which we leave it as an exercise to determine the -computational complexity:

-../_images/ladder1.svg -../_images/ladder2.svg -

Determining the optimal order however is a problem that is known to be NP-hard, and thus no -algorithm exists that can efficiently compute optimal orders for larger networks. -Nevertheless, efficient implementations allows finding optimal orders for networks of up to -30-40 tensors [Pfeifer et al., 2014], but other methods exist that can be used to -determine good (not necessarily optimal) contraction orders.

-

TensorOperations comes with some built-in tools for facilitating this process, and in -particular the opt keyword can be used to enable the use of the algorithm from -[Pfeifer et al., 2014]. Because this uses the Julia macro system, this can be done at -compilation time, and in other words only needs to be computed once.

-
-
-
@tensor opt=true begin
-    A[i, j] := B[i, α, β, γ] * C[γ, ϵ, ζ, η, j] * D[β, δ, ϵ] * E[α, δ] * F[ζ, η]
-end
-
-
-
-
-
2×2 Matrix{Float64}:
- 2.66961  2.70201
- 2.73193  2.83059
-
-
-
-
-
-
-
-

9.4. Tensor Factorizations#

-

Linear maps admit various kinds of factorizations, which are instrumental in a variety of -applications. They can be used to generate orthogonal bases, to find low-rank -approximations, or to find eigenvalues and vectors. In the context of tensors, the -established theory for factorizations of matrices can be generalized by interpreting tensors -as linear maps, and then applying the same factorization to the corresponding matrix -partition of the constituent vector spaces in a codomain and domain, after which everything -carries over. Thus, the only additional information that is required is the specification of -this partition. In this section we will discuss the most common factorizations of tensors, -but the reasoning can be generalized to any factorization of linear maps.

-
-
-
S1 = ^2  ^2  ^2
-S2 = ^2  ^3
-
-
-
-
-
(ℂ^2 ⊗ ℂ^3)
-
-
-
-
-
-

9.4.1. Eigenvalue Decomposition#

-

The Eigen decomposition of a matrix -\(A\) is a factorization of the form:

-
-\[A = V \Lambda V^{-1}\]
-

where \(V\) is a matrix of eigenvectors, and \(\Lambda\) is a diagonal matrix of eigenvalues. In -particular, the set of eigenvectors form a basis for all possible products \(Ax\), which is -the same as the image of the corresponding matrix transformation. For normal matrices, these -eigenvectors can be made orthogonal and the resulting decomposition is also called the -spectral decomposition.

-

The eigenvalue decomposition mostly finds it use in the context of linear equations of the -form:

-
-\[Av = \lambda v\]
-

where \(v\) is an eigenvector of \(A\) with eigenvalue \(\lambda\).

-

For tensors, the eigenvalue decomposition is defined similarly, and the equivalent equation -is diagrammatically represented as:

-../_images/eig.svg -
-
-
A = TensorMap(randn, ComplexF64, S1, S1) # codomain and domain equal for eigendecomposition
-D, V = eig(A)
-@test A * V  V * D
-
-
-
-
-
Test Passed
-
-
-
-
-
-
-

9.4.2. Singular Value Decomposition#

-

The -Singular Value Decomposition -(SVD) can be seen as a generalization of the eigendecomposition of a square normal matrix to -any rectangular matrix \(A\). Specifically, it is a factorization of the form -\(A = U \Sigma V^\dagger\) where \(U\) and \(V\) are isometric matrices -(\(U^\dagger U = V^\dagger V = \mathbb{1}\)), and \(\Sigma\) is a diagonal matrix of singular -values. The SVD is typically used to find low-rank approximations for matrices, and it was -shown [Eckart and Young, 1936] that the best rank-\(k\) approximation is given by the -SVD, where \(\Sigma\) is truncated to the first (largest) \(k\) singular values.

-

Again, a tensorial version is defined by first grouping indices to form a matrix, and then -applying the SVD to that matrix.

-../_images/svd.svg -../_images/unitary.svg -
-
-
A = TensorMap(randn, ComplexF64, S1, S2)
-partition = ((1, 2), (3, 4, 5))
-U, S, V = tsvd(A, partition...)
-@test permute(A, partition)  U * S * V
-@test U' * U  id(domain(U))
-@test V * V'  id(codomain(V))
-
-
-
-
-
Test Passed
-
-
-
-
-
-
-

9.4.3. Polar decomposition#

-

The polar decomposition of a square -matrix \(A\) is a factorization of the form \(A = UP\), where \(U\) is a semi-unitary matrix and \(P\) is -a positive semi-definite Hermitian matrix. It can be interpreted as decomposing a linear -transformation into a rotation/reflection \(U\), combined with a scaling \(P\). The polar -decomposition is unique for all matrices that are full rank.

-../_images/polar.svg -
-
-
A = TensorMap(randn, ComplexF64, S1, S2)
-partition = ((1, 2), (3, 4, 5))
-Q, P = leftorth(A, partition...; alg=Polar())
-@test permute(A, partition)  Q * P
-@test Q * Q'  id(codomain(Q))
-@test (Q * Q')^2  (Q * Q')
-
-
-
-
-
Test Passed
-
-
-
-
-
-
-

9.4.4. QR Decomposition#

-

The QR decomposition is a factorization of -the form \(A = QR\), where \(Q\) is an orthogonal matrix and \(R\) is an upper triangular matrix. -It is typically used to solve linear equations of the form \(Ax = b\), which admits a solution -of the form \(x = R^{-1} Q^\dagger b\). Here \(R^{-1}\) is particularly easy to compute because -of the triangular structure (for example by Gaussian elimination). Additionally, for -overdetermined linear systems, the QR decomposition can be used to find the least-squares -solution.

-../_images/qr.svg -../_images/leftOrth.svg -
-
-
A = TensorMap(randn, ComplexF64, S1, S2)
-partition = ((1, 2), (3, 4, 5))
-Q, R = leftorth(A, partition...; alg=QR())
-@test permute(A, partition)  Q * R
-@test Q' * Q  id(domain(Q))
-
-
-
-
-
Test Passed
-
-
-
-
-

The QR decomposition is unique up to a diagonal matrix of phases, and can thus be made -unique by requiring that the diagonal elements of \(R\) are positive. This variant is often -called QRpos. Additional variants exist that are flipped and/or transposed, such as the RQ, -QL, and LQ decompositions.

-
-

Note

-

Often it is useful to make a distinction between factorizations that are rank revealing, -and factorizations that are not. A factorization is rank revealing if the rank of the matrix -can be determined from the factorization. For example, the SVD is rank revealing, while the -QR decomposition is not. However, the trade-off being that the SVD decomposition is -substantially more expensive, the QR decomposition is often preferred in practice.

-
-
-
-

9.4.5. Nullspaces#

-

Finally, the nullspace of a matrix \(A\) is the set of vectors \(x\) such that \(Ax = 0\). This is -typically determined via the SVD, where the nullspace is given by the right singular vectors -corresponding to zero singular values.

-
-
-
A = TensorMap(randn, ComplexF64, S1, S2)
-partition = ((1, 2, 3), (4, 5))
-N = leftnull(A, partition...)
-@test norm(N' * permute(A, partition))  0 atol=1e-14
-@test N' * N  id(domain(N))
-
-
-
-
-
Test Passed
-
-
-
-
-
-
-
-

9.5. Conclusion#

-

In this lecture we have introduced the basic concepts of tensor network theory. We have -defined tensors and the operations that are commonly performed, as well as the graphical -notation that is used to represent them. We have also discussed the computational complexity -of tensor networks, and the importance of finding efficient contraction orders. Finally, we -have discussed the most common tensor factorizations, and how they can be used.

-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/3-MatrixProductStates/Algorithms.html b/pr-preview/pr-27/3-MatrixProductStates/Algorithms.html deleted file mode 100644 index cd1a6830..00000000 --- a/pr-preview/pr-27/3-MatrixProductStates/Algorithms.html +++ /dev/null @@ -1,735 +0,0 @@ - - - - - - - - - - - - - 14. A Simple Tensor Network Algorithm — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

A Simple Tensor Network Algorithm

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

14. A Simple Tensor Network Algorithm#

-

Having introduced tensor networks in general, with a focus on the case of MPS, we now turn -to the question of how to use them to solve specific problems. While a large number of -tensor network algorithms have been developed, many of them more advanced and/or efficient -than the ones we will discuss here, we will focus on a few simple algorithms that are easy -to understand and implement. Importantly, these algorithms are also the building blocks of -more advanced algorithms, for example in higher spatial dimensions.

-

Effectively, we have already seen how to use MPS to compute expectation values or -correlation functions, or derive all kind of properties. Here, we focus on how to obtain the -desired MPS in the first place. In other words, given a certain problem, how can we optimize -an MPS, or a more general tensor network, to solve it?

-
-

14.1. Simulating Quantum Systems#

-

As a first example, let us consider the problem of simulating a quantum system. We can -formalize this idea as follows: Given a Hamiltonian \(H\), and some initial state -\(\ket{\psi_0}\) at time \(t=0\), is there a way to compute the time-evolved state -\(\ket{\psi(t)} = e^{-i H t} \ket{\psi_0}\) at some later time \(t\).

-

In general, this is a very hard problem. For example, one could naively try to -compute the matrix exponential, -but this quickly becomes prohibitively expensive, as the dimension of the Hamiltonian scales -exponentially with the number of particles. However, for physically relevant systems the -Hamiltonian does not consist of a random matrix, but rather exhibits additional structure -that can be used to simplify the problem.

-
-
-

14.2. Time-Evolving Block Decimation (TEBD)#

-

A particularly powerful example can be found for systems with local interactions, where the -Hamiltonian is of the form:

-
-\[H = \sum_{i,j} h_{ij}\]
-

where \(h_{ij}\) denotes a local operator, acting only on a small number of sites. In this -case, although \(e^{-i H t}\) is unfeasible to compute, each of the constituent terms act only -on a much smaller subsystem and therefore \(e^{-ih_{ij}t}\) can be computed efficiently. -However, as these terms generally do not commute, we cannot simply apply them one after the -other. Instead, we can use the first-order Suzuki-Trotter decomposition to approximate the -time-evolution operator, which states that for any two Hermitian operators \(A\) and \(B\), and -any real number \(\Delta t\), we have:

-
-(14.1)#\[e^{(A + B) \Delta t} = e^{A \Delta t} e^{B \Delta t} + \mathcal O(\Delta t^2).\]
-

If we now split the full time interval \(t\) into \(m\) steps, we obtain the approximation

-
-\[e^{-i H t} = \left( e^{-i H_e \frac{t}{m}} e^{-i H_o \frac{t}{m}} \right)^m + \mathcal O -\left( \frac{t^2}{m}\right)\]
-

where the approximation error can be managed by choosing a sufficiently large \(m\).

-
-

Note

-

There actually exist entire families of such exponential product approximations up to a -given order [Hatano and Suzuki, 2005]. For our purposes however, it is sufficient to -illustrate a simulation procedure using this first-order approximation.

-
-
-

14.2.1. Example: One-Dimensional Nearest-Neighbor Hamiltonians#

-

We can put the discussion above into practice by applying it to the example of a nearest-neighbour Hamiltonian on a one-dimensional lattice:

-
-\[H = \sum_{n=1}^N h_{n,n+1}\]
-

where \(N\) is the number of sites and we are assuming periodic boundary conditions. We now -want to simulate the dynamics of this Hamiltonian in an efficient way using the -aforementioned approximation Eq. (14.1). The simplest way to do this is to -split the local terms into two groups, where terms within a group commute with each other, -but not with terms in the other group. For example, we could split the Hamiltonian into even -(\(H_e\)) and odd terms (\(H_o\)):

-
-(14.2)#\[H_e = \sum_n h_{(2n, 2n+1)}, \qquad H_o = \sum_n h_{(2n+1, 2n+2)}.\]
-

It is a simple exercise to show that the local terms within a group commute, as they act on -non-overlapping sites. Therefore, if we can find a MPS representation of the initial state, -the procedure for simulating the time evolution is as follows:

-../_images/tebd_mps.svg -

This procedure does not solve the problem as-is, as evaluating this network exactly would -still require a bond dimension which grows exponentially with the number of layers \(m\). -Instead, we can retain an efficient description by locally truncating the bond dimension, by -computing an SVD an retaining only the largest \(\chi\) singular values.

-
-../_images/tebd_trunc.svg -
-
-
- -
-

14.4. Conclusion#

-

We have now seen a first example of algorithms that can be used for optimizing tensor -networks, either to simulate dynamics or to find groundstates. We conclude by mentioning -that this is only the tip of the iceberg, and that there exist many more algorithms that can -be used to solve a variety of problems.

-
-

Outlook

-

To close out this lecture, we briefly comment on the higher dimensional generalizations of -the TEBD procedure and the difficulties this brings with it. For local quantum Hamiltonians -in higher dimensions we can follow a similar procedure, where we split the full Hamiltonian -into sum of parts that each only contain non-overlapping local terms. Time evolution can -then be simulated by applying a similar sequence of layers, where in each layer we evolve -with all local operators in a given Hamiltonian part in parallel.

-

The problem with this approach however is that the local update step tebd_trunc is -ill-conditioned for higher-dimensional networks if the full quantum state is is not taken -into account for the truncation. Indeed, while in the one-dimensional case the rest of the -network surrounding the sites we want to update can be brought into account exactly by -working in appropriate gauge, this is not possible in general. Consider for example a -general network where want to apply some update to the central site,

-../_images/tensor_network.svg -

Since this network contains loops, there is no way to exactly capture the surrounding -network in general. One instead has to resort to approximation techniques for the -environments of a given update site, where the quality of the environment approximations -directly affects the stability of the local update. The simplest way of doing this is to use -the so-called simple update procedure [Jiang et al., 2008] where all loops in the -network are simply ignored and the environment is approximated by a product state,

-../_images/simple_update.svg -

More accurate results can be obtained by taking into account the full quantum state of the -system in each local update by means of the full update procedure -[Jordan et al., 2008]. However, this gain in accuracy comes with a substantial -increase in computational cost due to the full environment approximation at each step.

-
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/3-MatrixProductStates/InfiniteMPS.html b/pr-preview/pr-27/3-MatrixProductStates/InfiniteMPS.html deleted file mode 100644 index 4c8c67f6..00000000 --- a/pr-preview/pr-27/3-MatrixProductStates/InfiniteMPS.html +++ /dev/null @@ -1,930 +0,0 @@ - - - - - - - - - - - - - 13. Infinite Matrix Product States — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Infinite Matrix Product States

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

13. Infinite Matrix Product States#

-

This section discusses matrix product states (MPS) in the thermodynamic limit and their -properties. Our discussion is mostly based on the excellent review -[Vanderstraeten et al., 2019], which provides a thorough technical overview of -tangent-space methods for uniform MPS. The formal exposition is supplemented with some very -basic code examples on working with infinite MPS using -MPSKit.jl at the end of this section. For more -details on the numerical implementation of routines for uniform MPS we refer to the Julia -version of the tutorials on uniform MPS, -which is again based on [Vanderstraeten et al., 2019].

- -
-

13.1. Matrix Product States in the Thermodynamic Limit#

-
-

13.1.1. Representation#

-

The finite MPS representation introduced in the previous previous section can be readily -extended to the thermodynamic limit by constructing a quantum state of an infinite spin system as a product of an infinite chain of tensors. For infinite systems which are invariant under translations, it is natural to also impose transation-invariance on the corresponding MPS. This leads to a uniform MPS which has the same tensor \(A^{(i)} := A\) at every site, where \(A\) again has a physical dimension \(d\) and bond dimension \(D\). In diagramatic notation, a uniform MPS can be represented as

-../_images/umps.svg -
-

Note

-

In some cases, instead of assuming an MPS has the same tensor at each site it is more -natural to use a state with a non-trivial repeating unit cell. A uniform MPS with a unit -cell of size three would for example correspond to the state

-../_images/umps3.svg -

While we will restrict our discussion to MPS with a single-site unit cell, most concepts and -techniques apply just as well to the multi-site unit cell case.

-
-

One of the central objects when working with MPS in the thermodynamic limit is the transfer operator or -transfer matrix, defined in our case as

-../_images/tm.svg -

The transfer matrix corresponds to an operator acting on the space of \(D\times D\) matrices, -and can be interpreted as a 4-leg tensor \(\mathbb C^D \otimes \mathbb C^D \leftarrow \mathbb -C^D \otimes \mathbb C^D\). The transfer matrix can be shown to be a completely positive map, -such that its leading eigenvalue is a positive number. The eigenvalues of the transfer -matrix characterize the normalization and correlation length of a uniform MPS, while its -eigenvectors can be used to evaluate expectation values of local observables.

-
-
-

13.1.2. Normalization#

-

The norm of a uniform MPS corresponds to a contraction of the form

-../_images/mpsNorm.svg -

Clearly, this norm is nothing more than an infinite product of MPS transfer matrices defined -above. Consider the spectral decomposition of the \(n\)th power \(\mathbb E^n\),

-../_images/tmPower.svg -

where \(l\) and \(r\) are the left and right fixed points which correspond to the largest -magnitude eigenvalue \(\lambda_0\) of \(\mathbb E\),

-../_images/fixedPoints.svg -

and the \(\lambda_i\) represent the remaining eigenvalues of smaller mangitude, where writing the spectral decomposition we have implicitly assumed that the fixed points are properly normalized as

-../_images/traceNorm.svg -

Taking the -limit of this spectral decomposition, it follows that the infinite product of transfer matrices reduces -to a projector onto the fixed points corresponding to the leading eigenvalue \(\lambda_0\),

-../_images/tmLimit.svg -

To ensure a properly normalized state we should therefore rescale the leading eigenvalue -\(\lambda_0\) to one by rescaling the MPS tensor as \(A \leftarrow A / \sqrt{\lambda_0}\).

-

With these properties in place, the norm of an MPS reduces to the overlap between the -boundary vectors and the fixed points. Since there is no effect of the boundary vectors on -the bulk properties of the MPS, we can always choose these such that MPS is properly -normalized as \( \left \langle \psi(\bar{A})\middle | \psi(A) \right \rangle = 1\).

-
-
-

13.1.3. Expectation Values#

-

The fixed points of the transfer matrix can for example be used to compute expectation values of -operators. Suppose we wish to evaluate expectation values of an extensive operator,

-
-\[O = \frac{1}{\mathbb{Z}} \sum_{n \in \mathbb{Z}} O_n.\]
-

If we assume that each \(O_n\) acts on a single site and we are working with a properly -normalized MPS, translation invariance dictates that the expectation value of \(O\) is given -by the contraction

-../_images/expVal.svg -

In the uniform gauge, we can use the fixed points of the transfer matrix to contract -everything to the left and to the right of the operator, such that we are left with the -contraction

-../_images/expVal2.svg -
-
-

13.1.4. Correlation Functions#

-

Correlation functions are computed similarly. Let us look at

-
-\[c^{\alpha\beta}(m,n) = \bra{\psi(\bar A)} (O^\beta_m)^\dagger O^\alpha_n \ket{\psi(A)},\]
-

where \(m\) and \(n\) are abritrary locations in the chain, and, because of translation -invariance, the correlation function only depends on the difference \(m-n\). Again, we -contract everything to the left and right of the operators by inserting the fixed points \(l\) -and \(r\), so that

-../_images/corrFunc.svg -

From this expression, we learn that it is the transfer matrix that determines the -correlations in the ground state. Indeed, if we again use the spectral decomposition of the -transfer matrix, recalling that now \(\lambda_0 = 1\), we can see that the correlation -function reduces to

-../_images/corrFunc2.svg -

The first part is just the product of the expectation values of \(O^\alpha\) and \(O^\beta\), -called the disconnected part of the correlation function, and the rest is an exponentially -decaying part. This expression implies that connected correlation functions of an MPS -always decay exponentially, which is one of the reasons why MPS generally have a harder -time dealing with critical states. The correlation length \(\xi\) is determined by the second -largest eigenvalue of the transfer matrix \(\lambda_1\) as

-
-\[\xi = -\frac{1}{\log|\lambda_\mathrm{max}|}.\]
-
-

Note

-

The subleading eigenvalues of the transfer matrix typically also have a physical meaning, -because they correspond to subleading correlations in the system. For example, by focussing -on eigenvalues in a specific symmetry sector one can target the correlations associated to -exitations corresponding to that particular symmetry. The subleading eigenvalues also play a -crucial role in the powerful technique of finite entanglement scaling for infinite MPS -[Rams et al., 2018]. Using this framework we can accurately capture critical phenomena -using MPS, despite the ansatz inherently having exponentially decaying correlations.

-
-
-
-
-

13.2. Gauging Revisited#

-
-

13.2.1. Gauging in the Thermodynamic Limit#

- -

While a given MPS tensor \(A\) corresponds to a unique state \(\left | \psi(A) \right \rangle\), -the converse is not true, as different tensors may give rise to the same state. This is -easily seen by noting that the gauge transform

-../_images/gaugeTransform.svg -

leaves the physical state invariant. We may use this freedom in parametrization to impose -canonical forms on the MPS tensor \(A\).

-

We start by considering the left-orthonormal form of an MPS, which is defined in terms of -a tensor \(A_L\) that satisfies the condition

-../_images/leftOrth1.svg -

We can find the gauge transform \(L\) that brings \(A\) into this form

-../_images/leftGauge.svg -

using an iterative procedure based on the QR docomposition, where starting from some initial -guess \(L^0\) we repeatedly perform the QR-based update

-../_images/qrStep.svg -

This iterative procedure is bound to converge to a fixed point for which -\(L^{(i+1)}=L^{(i)}=L\) and \(A_L\) is left orthonormal by construction:

-../_images/qrConv.svg -

Note that this left gauge choice still leaves room for unitary gauge transformations

-../_images/unitaryGauge.svg -

which can be used to bring the right fixed point \(r\) into diagonal form. Similarly, we can -find the gauge transform that brings \(A\) into right-orthonormal form

-../_images/rightGauge.svg -

such that

-../_images/rightOrth.svg -

and the left fixed point \(l\) is diagonal. A right-orthonormal tensor \(A_R\) and a matrix \(R\) -such that \(A R = R A_R\) can be found using a similar iterative procedure.

-

Finally, we can define a mixed gauge for the uniform MPS by choosing one site, the ‘center -site’, and bringing all tensors to the left of it in the left-orthonormal form and all the -tensors to the right of it in the right-orthonormal form. Defining a new tensor \(A_C\) on the -center site, we obtain the form

-../_images/mixedGauge.svg -

By contrast, the original representation using the same tensor at every site is commonly -referred to as the uniform gauge. The mixed gauge has an intuitive interpretation. -Defining \(C = LR\), this tensor then implements the gauge transform that maps the -left-orthonormal tensor to the right-orthonormal one, thereby defining the center-site -tensor \(A_C\):

-../_images/mixedGauge2.svg -

This relation is called the mixed gauge condition and allows us to freely move the center -tensor \(A_C\) through the MPS, linking the left- and right orthonormal tensors.

-

Finally we may bring \(C\) into diagonal form by performing a singular value decomposition \(C -= USV^\dagger\) and absorbing \(U\) and \(V^\dagger\) into the definition of \(A_L\) and \(A_R\) -using the residual unitary gauge freedom

-../_images/diagC.svg -
-

Note

-

When working in the mixed gauge, the normalization of the MPS is entirely determined by that -of the center tensors \(A_C\) and \(C\). Indeed, it is easily seen that requiring that an MPS is -normalized now reduces to

-../_images/normAC.svg -

or alternatively to \({\rm tr}(C^\dagger C) = 1\).

-
-
-
-

13.2.2. Expectation Values Revisited#

-

In the mixed gauge, we can locate the center site where the operator is acting, and then -contract everything to the left and right to the identity to arrive at the particularly -simple expression for the expectation value

-../_images/expVal3.svg -
-
-

13.2.3. Entanglement Entropy#

-

The mixed canonical form with a diagonal \(C\) now allows to straightforwardly write down a -Schmidt decomposition of the state across an arbitrary bond in the chain

-
-\[\left | \psi(A) \right \rangle = \sum_{i=1}^{D} C_i \left | \psi^i_L(A_L) \right \rangle \otimes \left | \psi^i_R(A_R) \right \rangle,\]
-

where the states \(\left | \psi^i_L(A_L) \right \rangle\) and \(\left | \psi^i_R(A_R) \right -\rangle\) are orthogonal states on half the lattice. The diagonal elements \(C_i\) are exactly -the Schmidt coefficient of any bipartition of the MPS, and as such determine its bipartite -entanglement entropy

-
-\[S = -\sum_i C_i^2 \log(C_i^2) .\]
-
-
-

13.2.4. Truncation#

-

The mixed canonical form also enables efficient truncatation of an MPS. The sum in the above -Schmidt decomposition can be truncated, giving rise to a new MPS that has a reduced bond -dimension for that bond. This truncation is optimal in the sense that the norm between the -original and the truncated MPS is maximized. To arrive at a translation invariant truncated -MPS, we can truncate the columns of the absorbed isometries \(U\) and \(V^\dagger\) -correspondingly, thereby transforming every tensor \(A_L\) or \(A_R\). The truncated MPS in -the mixed gauge is then given by

-../_images/truncMPS.svg -

We note that the resulting state based on this local truncation is not guaranteed to -correspond to the MPS with a lower bond dimension that is globally optimal. This would -require a variational optimization of the cost function.

-
-\[\left | \left | ~\left | \psi(A) \right \rangle - \left | \psi(\tilde{A}) \right \rangle ~\right | \right |^2.\]
-
-
-

13.2.5. Code Example: MPSKit.InfiniteMPS#

-

The Julia package MPSKit.jl provides many tools -for working with infinite MPS. Without going into much detail, we can already check some -aspects of our discussion above with this numerical implementation.

-

We can construct an -MPSKit.InfiniteMPS -by specifying the physical and virtual vector spaces of the MPS. We will use standard -complex vector spaces as specified by a -TensorKit.ComplexSpace, -and choose a physical dimension \(d = 3\) and bond dimension \(D = 5\).

-
-
-
using MPSKit, TensorKit
-
-d = 3 # physical dimension
-D = 5 # bond dimension
-mps = InfiniteMPS(^d, ^D)
-
-
-
-
-
single site InfiniteMPS:
-│   ⋮
-│ CR[1]: TensorMap(ℂ^5 ← ℂ^5)
-├── AL[1]: TensorMap((ℂ^5 ⊗ ℂ^3) ← ℂ^5)
-│   ⋮
-
-
-
-
-

The infinite MPS is automatically stored in the mixed canonical form introduced above. For -example, we can check that its normalization is indeed characterized by the center gauge -tensors \(A_C\) and \(C\).

-
-
-
using LinearAlgebra
-
-@show norm(mps)
-@show norm(mps.AC[1])
-@show norm(mps.CR[1]);
-
-
-
-
-
norm(mps) = 0.9999999999999999
-norm(mps.AC[1]) = 0.9999999999999999
-norm(mps.CR[1]) = 1.0
-
-
-
-
-

We can also explicitly verify the mixed gauge conditions on \(A_L\), \(A_R\), \(A_C\) and \(C\) by -evaluating the corresponding tensor network diagrams using the -TensorOperations.@tensor macro.

-
-
-
using TensorOperations
-
-@tensor AL_id[-1; -2] := mps.AL[1][1 2; -2] * conj(mps.AL[1][1 2; -1])
-@tensor AR_id[-1; -2] := mps.AR[1][-1 1; 2] * conj(mps.AR[1][-2 1; 2])
-
-@assert AL_id  id(space(mps.AL[1], 3)') "AL not in left-orthonormal form!"
-@assert AR_id  id(space(mps.AR[1], 1)) "Ar not in right-orthonormal form!"
-
-@tensor LHS[-1 -2; -3] := mps.AL[1][-1 -2; 1] * mps.CR[1][1; -3]
-@tensor RHS[-1 -2; -3] := mps.CR[1][-1; 1] * mps.AR[1][1 -2; -3]
-
-@assert LHS  RHS && RHS  mps.AC[1] "Center gauge MPS tensor not consistent!"
-
-
-
-
-

We can also easily evaluate the expectation value of local operators

-
-
-
O = TensorMap(randn, ^d  ^d)
-expectation_value(mps, O)
-
-
-
-
-
1-element Vector{ComplexF64}:
- 0.12559307141051923 + 0.10955622901083523im
-
-
-
-
-

as well as compute the correlation length encoded in the MPS.

-
-
-
correlation_length(mps)
-
-
-
-
-
0.40097713703530957
-
-
-
-
-

MPSKit.jl exports a variety of infinite MPS algorithms, some of which will be discussed in -the next section.

-
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/3-MatrixProductStates/MatrixProductOperators.html b/pr-preview/pr-27/3-MatrixProductStates/MatrixProductOperators.html deleted file mode 100644 index e130eda8..00000000 --- a/pr-preview/pr-27/3-MatrixProductStates/MatrixProductOperators.html +++ /dev/null @@ -1,3120 +0,0 @@ - - - - - - - - - - - - - 15. Matrix Product Operators and Applications — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Matrix Product Operators and Applications

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

15. Matrix Product Operators and Applications#

-

If Matrix Product States are a tensor network way of representing quantum states in one -dimension, we can similarly use tensor networks to represent the operators that act on -these states. Matrix Product Operators (MPOs) form a structured and convenient description -of such operators, that can capture most (if not all) relevant operators. Additionally, they -also form a natural way of representing the transfer matrix of a 2D statistical mechanical -system, and can even be used to study higher dimensional systems by mapping them to quasi-1D -systems.

-

In this lecture, we will discuss the construction of MPOs, as well as showcase their use -through MPSKit.jl and -MPSKitModels.jl.

-
-
-
using TensorKit
-using MPSKit
-using MPSKitModels
-
-
-
-
-

In general, an MPO is a chain of tensors, where each tensor has two physical indices and two -virtual indices:

-../_images/mpo.svg -
-

15.1. Statistical Mechanics in 2D#

-

Before discussing one-dimensional transfer matrices, let us first consider how partition -functions of two-dimensional classical many-body systems can be naturally represented as a -tensor network. To this end, consider the partition function of the -classical Ising model,

-
-\[\mathcal Z = \sum_{\{s_i\}} \text{e}^{-\beta H(\{s_i\})},\]
-

where \(s_i\) denotes a configuration of spins, and \(H(\{s_i\})\) is the corresponding -energy, as determined by the Hamiltonian:

-
-\[H(\{s_i\}) = -J \sum_{\langle i,j \rangle} s_i s_j\]
-

where the first sum is over nearest neighbors.

-
-

15.1.1. Partition Functions as Tensor Networks#

-

As the expression for the partition function is an exponential of a sum, we can also write -it as a product of exponentials, which can be reduced to the following network:

-../_images/partition_function_1.svg -

Here, the black dots at the vertices represent Kronecker \(\delta\)-tensors,

-../_images/kronecker.svg -

and the matrices \(t\) encode the Boltzmann weights associated to each nearest-neighbor interaction,

-../_images/boltzmann.svg -

It is then simple, albeit somewhat involved to check that contracting this network gives -rise to the partition function, where the sum over all configurations is converted into the -summations in the contractions of the network. Finally, it is more common to absorb the edge -tensors into the vertex tensors by explicitly contracting them, such that the remaining -network consists of tensors at the vertices only:

-../_images/partition_function.svg -
-

Note

-

Because there are two edges per vertex, an intuitive way of absorbing the edge tensors is to -absorb for example the left and bottom edge tensors into the vertex tensor. However, this -leads to a slightly asymmetric form, and more commonly the square root \(q\) of the Boltzmann -matrices is taken, such that each vertex tensor absorbs such a factor from each of the -edges, resulting in a rotation-invariant form.

-../_images/boltzmann_mpo.svg -
-

In particular, the construction of the operator that makes up the MPO can be achieved in a -few lines of code, through the use of TensorKit:

-
-
-
β = 1.0
-
-# construct edge tensors
-t = TensorMap(ComplexF64[exp(β) exp(-β); exp(-β) exp(β)], ^2, ^2)
-q = sqrt(t)
-
-# construct vertex tensors
-δ = TensorMap(zeros, ComplexF64, ^2  ^2, ^2  ^2)
-δ[1, 1, 1, 1] = 1.0
-δ[2, 2, 2, 2] = 1.0
-
-# absorb edge tensors
-@tensor O[-1 -2; -3 -4] := δ[1 2; 3 4] * q[-1; 1] * q[-2; 2] * q[3; -3] * q[4; -4]
-
-
-
-
-
TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):
-[:, :, 1, 1] =
-   7.321388457312336 + 0.0im  0.49999999999999895 + 0.0im
- 0.49999999999999895 + 0.0im  0.06766764161830616 + 0.0im
-
-[:, :, 2, 1] =
- 0.49999999999999906 + 0.0im  0.06766764161830614 + 0.0im
- 0.06766764161830614 + 0.0im  0.49999999999999906 + 0.0im
-
-[:, :, 1, 2] =
-   0.499999999999999 + 0.0im  0.06766764161830616 + 0.0im
- 0.06766764161830616 + 0.0im  0.49999999999999906 + 0.0im
-
-[:, :, 2, 2] =
- 0.06766764161830616 + 0.0im  0.499999999999999 + 0.0im
-   0.499999999999999 + 0.0im  7.321388457312336 + 0.0im
-
-
-
-
-
-
-

15.1.2. Transfer Matrices#

-

In order to then evaluate the partition function, we can use the -Transfer-matrix method, which is a -technique that splits the two-dimensional network into rows (or columns) of so-called -transfer matrices, which are already represented as MPOs. In fact, this method has even led -to the famous exact solution of the two-dimensional Ising model by Onsager. -[Onsager, 1944].

-../_images/transfer.svg -

In the context of tensor networks, this technique is even useful beyond exactly solvable -cases, as efficient algorithms exist to determine the product of an MPO with an MPS in an -approximate manner. This allows us to efficiently split the computation of the partition -function in a sequence of one-dimensional contractions, thus reducing the complexity of the -problem by solving it layer by layer.

-
-
-

15.1.3. Thermodynamic Limit#

-

Importantly, this technique is not limited to finite systems, and in fact allows for the -computation of the partition function of systems directly in the thermodynamic limit, -alleviating the need to consider finite-size effects and extrapolation techniques. The key -insight that allows for this is that the partition function may be written as

-
-\[\mathcal Z = \lim_{N \to \infty} \mathrm{Tr} \left( T^N \right)\]
-

where \(T\) is the row-to-row transfer matrix, and \(N\) is the number of rows (or columns) in -the network. If we then consider the spectral decomposition of the transfer matrix, we can -easily show that as the number of rows goes to infinity, the largest eigenvalue of the -transfer matrix dominates, and the partition function is given by

-
-\[\mathcal Z = \lim_{N \to \infty} \lambda_{\mathrm{max}}^N \braket{\psi}{\psi}\]
-

where \(\lambda_{\mathrm{max}}\) is the largest eigenvalue of the transfer matrix, and -\(\ket{\psi}\) is the corresponding (MPS) eigenvector. In other words, the partition function -can be computed if it is possible to find the largest eigenvalue of the transfer matrix, for -which efficient algorithms exist.

-

For example, one can resort to many types of boundary MPS techniques -[Zauner-Stauber et al., 2018], which are a generic class of algorithms to -numerically solve these kinds of problems. In particular, they all rely on an efficient way -of finding an (approximate) solution to the following problem:

-../_images/boundary_mps.svg -
-
-

15.1.4. Expectation Values#

-

In order to compute relevant quantities for such systems, we can verify that the expectation -value of an operator \(O\) is given by the weighing the value of that operator for a given -microstate, with the probability of that microstate:

-
-\[\langle O \rangle = \frac{1}{\mathcal Z} \sum_{\{s_i\}} O(\{s_i\})\text{e}^{-\beta -H(\{s_i\})}\]
-

For a local operator \(O_i\), this can again be written as a tensor network, where a single -Kronecker tensor at a vertex is replaced with a tensor measuring the operator, and then -absorbing the remaining edge tensors:

-../_images/expectation_value.svg -

For example, in the case of the magnetisation \(O = \sigma_z\), the tensor \(M\) can be -explicitly constructed as follows:

-
-
-
Z = TensorMap(ComplexF64[1.0 0.0; 0.0 -1.0], ^2, ^2)
-@tensor M[-1 -2; -3 -4] := δ[1 2; 3 4] * Z[4; 5] * q[-1; 1] * q[-2; 2] * q[3; -3] * q[5; -4]
-
-
-
-
-
TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):
-[:, :, 1, 1] =
- 7.3210757428908035 + 0.0im       0.4953999296304103 + 0.0im
- 0.4953999296304103 + 0.0im  -1.0097568878600302e-17 + 0.0im
-
-[:, :, 2, 1] =
-      0.4953999296304104 + 0.0im  -3.8901691517473414e-18 + 0.0im
- -3.8901691517473414e-18 + 0.0im     -0.49539992963041035 + 0.0im
-
-[:, :, 1, 2] =
-   0.49539992963041035 + 0.0im  3.993515140140208e-18 + 0.0im
- 3.993515140140208e-18 + 0.0im    -0.4953999296304104 + 0.0im
-
-[:, :, 2, 2] =
- 3.993515140140208e-18 + 0.0im  -0.4953999296304103 + 0.0im
-   -0.4953999296304103 + 0.0im  -7.3210757428908035 + 0.0im
-
-
-
-
-

Using this network, the expectation value can be computed by first contracting the top and -bottom part, replacing them by their fixed-point MPS representations, and then contracting -the remaining MPS-MPO-MPS sandwich. This is achieved by similarly contracting the left and -right part, replacing them by their fixed-point tensors, which are commonly called the -environments \(G_L\) and \(G_R\), respectively. The final resulting network is then just a -local network, which can be contracted efficiently.

-../_images/expectation_value2.svg -
-

Note

-

This process of sequentally reducing the dimensionality of the network can even be further -extended, where 3D systems can be studied by first determining a 2D boundary PEPS, for which -a 1D boundary MPS can be determined, which admits 0D boundary tensors. This kind of -algorithms are commonly referred to as boundary methods.

-
-
-
-
-

15.2. Quantum Mechanics in 1+1D#

-

For quantum systems in one spatial dimension, the construction of MPOs boils down to the -ability to write a sum of local operators in MPO-form. The resulting operator has a very -specific structure, and is often referred to as a Jordan block MPO.

-
-

15.2.1. Jordan Block MPOs#

-

For example, if we consider the -Transverse-field Ising model,

-
-\[H = -J \sum X_j X_{j+1} - h \sum Z_j\]
-

it can be represented as an MPO through the (operator-valued) matrix,

-
-\[\begin{split}W = \begin{pmatrix} -1 & X & -hZ \\ -0 & 0 & -JX \\ -0 & 0 & 1 -\end{pmatrix}\end{split}\]
-

along with the boundary vectors,

-
-\[\begin{split}v_L = \begin{pmatrix} -1 & 0 & 0 -\end{pmatrix} -, \qquad -v_R = \begin{pmatrix} -0 \\ 0 \\ 1 -\end{pmatrix}\end{split}\]
-

The Hamiltonian on \(N\) sites is then given by the contraction

-
-\[H = V_L W^{\otimes N} V_R\]
-
-

Note

-

While the above example can be constructed from building blocks that are strictly local -operators, this is not always the case, especially when symmetries are involved. In those -cases, the elements of the matrix \(W\) have additional virtual legs that are contracted -between different sites.

-
-
-
-

15.2.2. Finite-State Machines#

-

An intuitive approach to construct such MPOs is to consider the sum of local -terms by virtue of a -finite-state machine. This is a -mathematical model of computation that consists of a finite set of states, and a set of -transitions between those states. In the context of MPOs, this is realised by associating -each virtual level with a state, and each transition then corresponds to applying a local -operator. In that regard, the MPO is then a representation of the state of the finite-state -machine, and the matrix \(W\) is the transition matrix of the machine.

-

In general, the matrix \(W\) can then be thought of as a block matrix with entries

-
-\[\begin{split}\begin{pmatrix} -1 & C & D \\ -0 & A & B \\ -0 & 0 & 1 -\end{pmatrix}\end{split}\]
-

which corresponds to the finite-state diagram:

- -

It can then be shown that this MPO generates all single-site local operators \(D\), two-site -operators \(CB\), three-site operators \(CAB\), and so on. In other words, the MPO is a -representation of the sum of all local operators, and by carefully extending the structure -of the blocks \(A\), \(B\), \(C\), and \(D\), it is possible to construct MPOs that represent sums -of generic local terms, and even approximate long-range interactions by a sum of -exponentials.

-

To gain a bit more understanding of this, we can use the following code to reconstruct the -total sum of local terms, starting from the Jordan MPO construction:

-
-
-
using Symbolics
-
-L = 4
-# generate W matrices
-@variables A[1:L] B[1:L] C[1:L] D[1:L]
-Ws = map(1:L) do l
-    return [1 C[l] D[l]
-            0 A[l] B[l]
-            0 0    1]
-end
-
-# generate boundary vectors
-Vₗ = [1, 0, 0]'
-Vᵣ = [0, 0, 1]
-
-# expand the MPO
-expand(Vₗ * prod(Ws) * Vᵣ)
-
-
-
-
-
-\[ \begin{equation} -D_1 + D_2 + D_3 + D_4 + B_2 C_1 + B_3 C_2 + B_4 C_3 + A_2 B_3 C_1 + A_3 B_4 C_2 + A_2 A_3 B_4 C_1 -\end{equation} - \]
-
-
-
-
-

15.2.3. Expectation Values#

-

In order to compute expectation values of such MPOs, we can use the same technique as -before, and sandwich the MPO between two MPSs.

- -

However, care must be taken when the goal is to determine a local expectation value density, -as this is not necessarily well-defined. In fact, the MPO represents the sum of all local -terms, and sandwiching it will always lead to the total energy. In order to consistently -define local contributions, a choice must be made how to distribute this among the sites. -For example, even in the case of two-site local operators, it is unclear if this local -expectation value should be accredited to the left, or right site, or even split between -both sites. In the implementation of MPSKit, the chosen convention is to distribute the -expectation value evenly among its starting and ending point, in order to not overcount -contributions of long-range interactions.

-

Typically this is achieved by renormalizing the environment tensors in a particular way, -such that then local expectation values can be obtained by either contracting the first row -of \(W\) with the right regularized environment, or the last column of \(W\) with the left -regularized environment. This respectively yields the expectation value of all terms -starting at that site, or all terms ending at that site.

-

Again, it can prove instructive to write this out explicitly for some small examples to gain -some intuition. Doing this programatically, we get all terms starting at some site as -follows:

-
-
-
Ws_reg_right = Ws .- Ref([1 0 0; 0 0 0; 0 0 0])
-expand(Vₗ * Ws_reg_right[end-2] * Ws_reg_right[end-1] * Ws_reg_right[end] * Vᵣ)
-
-
-
-
-
-\[ \begin{equation} -D_2 + B_3 C_2 + A_3 B_4 C_2 -\end{equation} - \]
-
-
-

and similarly all terms ending at some site as follows:

-
-
-
Ws_reg_left = Ws .- Ref([0 0 0; 0 0 0; 0 0 1])
-expand(Vₗ * Ws_reg_left[1] * Ws_reg_left[2] * Ws_reg_left[3] * Vᵣ)
-
-
-
-
-
-\[ \begin{equation} -D_3 + B_3 C_2 + A_2 B_3 C_1 -\end{equation} - \]
-
-
-
-
-

15.2.4. Jordan MPOs in the Thermodynamic Limit#

-

In the thermodynamic limit, the same MPO construction can be used to represent the infinite -sum of local terms. However, special care must be taken when considering expectation values, -as now only local expectation values are well-defined, and the total energy diverges with -the system size.

-

This is achieved by considering the same regularization of the environment tensors, such -that the divergent parts are automatically removed. This construction can be found in more -detail in [Hubig et al., 2017].

-
-
-

15.2.5. Quasi-1D Systems#

-

Finally, it is worth noting that the MPO construction can also be used to study -two-dimensional systems, by mapping them to quasi-one-dimensional systems. This is typically -achieved by imposing periodic boundary conditions in one of the spatial directions, and then -snaking an MPS through the resulting lattice. In effect, this leads to a one-dimensional -model with longer-range interactions, which can then be studied using the standard MPS -techniques. However, the -no free lunch theorem applies here as -well, and the resulting model will typically require a bond dimension that grows -exponentially with the periodic system size, in order to achieve the area law of -entanglement in two-dimensional systems.

-
-
-

15.2.6. MPSKitModels and the @mpoham Macro#

-

While the above construction of MPOs is quite general, it is also quite cumbersome to -manually construct, especially when dealing with complicated lattices or non-trivial unit -cells. To this end, the package -MPSKitModels.jl offers a convenient way of -constructing these MPOs automatically, by virtue of the @mpoham macro. This macro allows -for the construction of MPOs by specifying the local operators that are present in the -Hamiltonian, and the lattice on which they act. For example, we can construct the MPO for -the Heisenberg models with nearest- or next-nearest-neighbor interactions as follows:

-
-
-
J₁ = 1.2
-SS = S_exchange() # predefined operator in MPSKitModels
-
-lattice = InfiniteChain(1)
-H₁ = @mpoham begin
-    sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice))
-end
-
-
-
-
- - -Hide code cell output - -
-
MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.6 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.6 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- -0.42426406871192834 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.42426406871192845 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
-                 0.0 + 0.0im  1.0 + 0.0im
-                 0.0 + 0.0im  0.0 + 0.0im
- -0.7071067811865476 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im                 0.0 + 0.0im
- 1.0 + 0.0im                 0.0 + 0.0im
- 0.0 + 0.0im  0.7071067811865475 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-]])
-
-
-
-
-
-
-
-
lattice = InfiniteCylinder(4)
-H₂ = @mpoham begin
-    sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice))
-end
-
-
-
-
- - -Hide code cell output - -
-
MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.6 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.6 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- -0.42426406871192834 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.42426406871192845 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.6 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.6 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- -0.42426406871192834 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.42426406871192845 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
-                 0.0 + 0.0im  1.0 + 0.0im
-                 0.0 + 0.0im  0.0 + 0.0im
- -0.7071067811865476 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im                 0.0 + 0.0im
- 1.0 + 0.0im                 0.0 + 0.0im
- 0.0 + 0.0im  0.7071067811865475 + 0.0im
-; … ; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
-                 0.0 + 0.0im  1.0 + 0.0im
-                 0.0 + 0.0im  0.0 + 0.0im
- -0.7071067811865476 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im                 0.0 + 0.0im
- 1.0 + 0.0im                 0.0 + 0.0im
- 0.0 + 0.0im  0.7071067811865475 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-]])
-
-
-
-
-
-
-
-
J₂ = 0.8
-lattice = InfiniteCylinder(4)
-H₃ = @mpoham begin
-    sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice)) +
-    sum(J₂ * SS{i, j} for (i, j) in next_nearest_neighbours(lattice))
-end
-
-
-
-
- - -Hide code cell output - -
-
MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.6 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.6 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- -0.42426406871192834 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.42426406871192845 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
-                 0.0 + 0.0im  1.0 + 0.0im
-                 0.0 + 0.0im  0.0 + 0.0im
- -0.7071067811865476 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im                 0.0 + 0.0im
- 1.0 + 0.0im                 0.0 + 0.0im
- 0.0 + 0.0im  0.7071067811865475 + 0.0im
-; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
-                 0.0 + 0.0im  1.0 + 0.0im
-                 0.0 + 0.0im  0.0 + 0.0im
- -0.7071067811865476 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im                 0.0 + 0.0im
- 1.0 + 0.0im                 0.0 + 0.0im
- 0.0 + 0.0im  0.7071067811865475 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.4 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.4 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- -0.2828427124746189 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.282842712474619 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
-                 0.0 + 0.0im  1.0 + 0.0im
-                 0.0 + 0.0im  0.0 + 0.0im
- -0.7071067811865476 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im                 0.0 + 0.0im
- 1.0 + 0.0im                 0.0 + 0.0im
- 0.0 + 0.0im  0.7071067811865475 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 2] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 1, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 3] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-]])
-
-
-
-
-
-
-
-
-

15.3. Conclusion#

-

In conclusion, Matrix Product Operators are a powerful tool to represent quantum operators -as well as transfer matrices. They allow for efficient and versatile expressions of -expectation values, and form the building block for many tensor network algorithms, both in -(1+1) or (2+0) dimensions, as well as in higher dimensions.

-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/3-MatrixProductStates/MatrixProductStates.html b/pr-preview/pr-27/3-MatrixProductStates/MatrixProductStates.html deleted file mode 100644 index f5ca5257..00000000 --- a/pr-preview/pr-27/3-MatrixProductStates/MatrixProductStates.html +++ /dev/null @@ -1,744 +0,0 @@ - - - - - - - - - - - - - 12. Matrix Product States — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Matrix Product States

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

12. Matrix Product States#

-

Having introduced tensor network states in general in the previous section, we now turn to -the specific case of a single spatial dimension. In this setting we will discuss matrix -product states and their properties.

-
-

12.1. A Matrix Product State#

-

We work in the same setting as the section on -tensor network states, where now our physical spins of local -physical dimension \(d\) are laid out on a linear chain with \(N\) sites. As before, we can -decompose the full tensor of coefficients \(C\) of a given quantum state \(\ket{\psi}\)

-
-\[\ket{\psi} = \sum_{s_1,s_2,...,s_N} C_{s_1,s_2,...,s_N}\ket{s_1,s_2,...,s_N}.\]
-

into a network of local tensors by consecutive SVDs, where each time we only keep some -suitable number of singular values \(D_i\) for every cut. For the case of \(N=4\) we can -explicitly carry out this full procedure in the following way:

-../_images/svd2.svg -

Absorbing the bond tensors \(\lambda^{(i)}\) into the neighboring site tensor we end up with a -matrix product state (MPS),

-../_images/fmps.svg -

Once again, the horizontal edges connecting the different site tensors are called virtual -bonds and the dimension \(D_i\) of these bonds is called the bond dimension. This bond -dimension controls the precision of our low-rank approximation, where in the limit of -increasing bond dimension an MPS can approximate any quantum state to arbitrary precision. -However, in accordance with our previous discussion we expect to be able to -describe low-energy states of local Hamiltonians using a maximal bond dimension \(D\) that -scales with the boundary of the system, which in one dimension is just constant in the -system size.

-

To see where the ‘matrix product’ in the name comes from, we can write out such a state in a -more explicit form as

-
-\[\ket{\psi} = \sum_{s_1,s_2,...,s_N} \sum_{k,l,...,z\in{0,D-1}} A^{(1)}_{s_1,k}A^{(2)}_{k,s_2,l}...A^{(N)}_{z,s_2,l} \ket{s_1,s_2,...,s_N}\]
-

Interpreting the \(A_{s_i}^{(i)}\) as \(D \times D\) matrices, we indeed recognize that the -corresponding coefficient in the computational basis is given by their matrix product. This -becomes even more explicit if we consider periodic boundary conditions \(N \sim 1\), where we -can write a corresponding MPS

-../_images/pfmps.svg -

as

-
-\[\ket{\psi} = \sum_{s_1,s_2,...,s_N} {\rm Tr} \left[A^{(1)}_{s_1}A^{(2)}_{s_2}...A^{(N)}_{s_N}\right] \ket{s_1,s_2,...,s_N}.\]
-

This class of states can be used as a variational anzatz to for example perform -time evolution or find ground states within the -manifold of MPS of a given bond dimension \(D\). Before moving on to MPS algorithms, we first -summarize some of the key properties that make these states so easy to work with.

-
-

Note

-

Alternatively, one could introduce MPS as a so-called projected entangled-pair state -(PEPS) in the following way. Consider again our chain of length \(N\), where we now place two -ancillary spins of dimension \(D\) on every site. We then maximally entangle each of these -ancillary spins with the corresponding spin on the neighboring site, resulting in a chain of -entangled pairs of the form \(\ket{\phi}=\sum_{j=0}^{d-1}\ket{j,j}\). Finally, we project the -two spins at each site onto the local physical Hilbert space of dimension \(d\), resulting in -a state

-../_images/peps1.svg -

If we write the projectors \(\mathcal P^{(i)}: \mathbb {C}^D \otimes \mathbb{C}^D \rightarrow -\mathbb{C}^d\) as

-
-\[\mathcal{P}^{(i)} = \sum_{s_i,\alpha,\beta}A_{k, s_i, l}^{(i)}\ket{s_i}\bra{kl},\]
-

you should be able to see that the resulting state is precisely an MPS with tensors -\(A^{(i)}\). This construction originates from ideas in quantum information theory -regarding entanglement and teleportation. While it may seem a bit involved, this -construction has a very natural generalization to two and more spatial dimensions, -where it has been put to extensive use.

-
-
-
-

12.2. Entanglement in MPS#

-

As a first property we study the entanglement structure of an MPS. Consider an MPS with a -fixed bond dimension \(D\). We can choose any bond of the MPS to make a bipartition of the -system, where all sites to the left of the bond belong to one subsystem and all sites to the -right of the bond belong to the other subsystem. Performing an SVD across this bond, -just as we have done in our initial construction, gives us a corresponding set of singular -values \(s_i\). As we have seen before, the squares of these singular values -are the Schmidt coefficients of the bipartition, and make up the entanglement spectrum of -the MPS. The entanglement spectrum of a given low-energy state encodes many interesting -properties of the corresponding system, and can for example be used to recognize symmetries -and detect phase transitions.

-

The same Schmidt coefficients can be used to compute the bipartite entanglement entropy -across the cut as

-
-\[S = -\sum_i s_i^2 \log(s_i^2).\]
-

For one-dimensional states which obey an area law, the maximum entropy across a cut is -bounded by a constant. Again we see that by increasing the bond dimension sufficiently, we -will always be able to saturate this value of \(S\), confirming our previous statement that -MPS faithfully capture these states. Furthermore, even for states that do not satisfy an -area law, such as critical states, carefully relating entanglement properties such as the -entanglement entropy to the correlation length (which are then both controlled by the bond -dimension) allows to derive many key properties of the critical system.

-
-
-

12.3. Gauge Freedom#

-

Not all MPS describe different physical states. One can perform a set of transformations on -an MPS to change the local tensors, but that leave the physical state unchanged. These -transformations are called gauge transformations. The freedom to choose a particular MPS -representation when describing a given physical state is also called a gauge freedom. The -gauge transformations that leave an MPS invariant are given by basis transforms on the -virtual level. Given such a basis transform \(M\) as a \(D\times D\) invertible matrix, it is -easy to see that the following procedure relates two different MPS which encode the same -physical state,

-../_images/gauge.svg -

where the \(B^{(i)}\) tensors are obtained by absorbing \(M^{-1}\) and \(M\) on the left and right -virtual index of \(A^{(i)}\) respectively.

-

Since a physical state can be described by many different MPS by virtue of the gauge -freedom, one can wonder if the same state can be described by two MPS that are not related -by a gauge transform. This question is answered by the fundamental theorem of MPS, which -states that any two translationally invariant MPS are equal if and only if their tensors are -related by a gauge transform. So the gauge freedom is the only freedom we have in describing -a physical state by an MPS.

-

From a more practical point of view, this gauge freedom is exploited in various algorithms -by making use of so-called canonical forms. One common canonical form for example is the -left-canonical form, where we gauge transform a given MPS tensor \(A\) to a different tenor -\(A_L\) which satisfies the condition \(\sum_{s_i=0}^{d-1}(A_L)^\dagger_{s_i}(A_L)_{s_i} = \mathbb -1_{D\times D}\), or in pictures,

-../_images/leftOrth2.svg -

A similar form can be imposed to obtain the right-canonical form in a finite MPS, we can -bring the tensors in left- or right canonical form as we wish by factorizing them into -appropriate isometries using the QR or polar decomposition. This moving of -the gauge center has proved essential in finite MPS algorithms, as we will see -later.

-
-
-

12.4. Expectation Values#

-

Another key feature of MPS is that expectation values of local operators can be computed -efficiently. Consider an operator \(O_i\) acting on site \(i\) of a state given by an MPS -\(\ket{\psi[A]}\). To calculate this expectation value we introduce the object

-../_images/transfer1.svg -

which we will call the \(O\)-transfer matrix. In the case of \(O=\mathbb 1\) we just call it the -transfer matrix. For a finite MPS with periodic boundary conditions, this can be written -succinctly as

-
-\[\braket{\psi|O_i|\psi} = Tr\left(\mathbb{E}^{i}\mathbb{E}_O\mathbb{E}^{N-i-1}\right).\]
-

This quantity can be evaluated -efficiently by contracting the corresponding diagram from end to end.

-
-
-

12.5. Correlation Functions#

-

The method to calculate expectation values can be easily generalized to calculate two-point -correlation functions of an MPS. Consider two operators \(O_i\) and \(Q_j\) each acting on -respectively site \(i\) and \(j\). The correlator between these two operators is denoted by -\(\braket{\psi|O_i O_j|\psi}\), and corresponds to the contraction

-../_images/corrFunc1.svg -

Adopting the transfer matrix notation this becomes

-
-\[\braket{\psi|O_i O_j|\psi} = {\rm Tr}\left(\mathbb{E}^{i}\mathbb{E}_O\mathbb{E}^{j-i-1}\mathbb{E}_O\mathbb{E}^{N-j-1}\right).\]
-

The dependence of the correlator on \(i\) and \(j\), for large separations between the two, is -dominated by the factor \(\mathbb{E}\), taken to some large power. This operator is in fact a -completely positive map (CP map), and one can always normalize the state \(\ket{\psi}\) such -that the dominant eigenvalue of \(\mathbb{E}\) is 1 and the others lie within the unit disk. -Making use of the spectral decomposition, we can show that the exponential dependence on the -eigenvalues corresponds to an exponential decay in the correlation functions, meaning that -an MPS always has exponentially decaying correlations. We will return to this point in more -detail when considering infinite systems in the next section.

-
-
-

12.6. Code Example: MPSKit.FiniteMPS#

-

To be added.

-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/4-Algorithms/FixedpointAlgorithms.html b/pr-preview/pr-27/4-Algorithms/FixedpointAlgorithms.html deleted file mode 100644 index d78f6118..00000000 --- a/pr-preview/pr-27/4-Algorithms/FixedpointAlgorithms.html +++ /dev/null @@ -1,966 +0,0 @@ - - - - - - - - - - - - - 16. Fixed-Point algorithms — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - -
- On this page -
- - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Fixed-Point algorithms

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

16. Fixed-Point algorithms#

-

In this section we introduce two algorithms for approximating the ground state of local gapped Hamiltonians using matrix product state techniques. Approximating ground states in a variational manner boils down to minimizing

-
-\[ \min_{\ket{\psi}\in D} \frac{\braket{\psi|H|\psi}}{\braket{\psi|\psi}},\]
-

over a restricted class of states \(D\). For simplicity, we will assume the Hamiltonian under consideration has an MPO representation of the form

-../_images/mpoHam.svg -

which can encode interactions of arbitrary range as discussed in the previous section. In this formulation, approximating the ground state of \(H\) is equivalent to finding the MPS fixed point the MPO Hamiltonian corresponding to the eigenvalue \(\Lambda\) with the smallest real part,

-../_images/fixedpoint.svg -

In the algorithms discussed below we optimize over matrix product states of a fixed finite bond dimension. In the first algorithm known as DMRG (density matrix renormalization group) the states we consider are finite MPS, whereas the second algorithm VUMPS (variational uniform matrix product state algorithm), as the name suggests, optimizes over uniform MPS. Hence, VUMPS enables direct optimization in the thermodynamic limit, without breaking translation invariance.

-

Our exposition of DMRG closes follows the one in [Bridgeman and Chubb, 2017], and that of VUMPS closely follows the excellent set of lecture notes [Vanderstraeten et al., 2019].

-
-

16.1. DMRG#

-

Starting from a random MPS ansatz, DMRG tries to approximate the ground state by sequentially optimizing over all the MPS tensors one by one and sweeping through the chain, until convergence is reached. Let us discuss this algorithm in a bit more detail step by step.

-
-

16.1.1. Algorithm#

-

Let us consider a random ansatz, by taking random tensors \(\{A_1,A_2,...,A_L\}\), \(L\) being the number of sites. Fixing all tensors but the one at site \(i\), the local tensor \(A_i\) is updated according to

-../_images/localUpdate.svg -

Though seemingly daunting we can turn this problem in a simple eigenvalue problem by making full use of the mixed gauge. By bringing all tensors on the right of \(A_i\) in the right canonical form and those to the left in left canonical form the denominator simply becomes \(\braket{A_i|A_i}\) and the update reduces to

-../_images/localUpdate2.svg - -

Here the effective Hamiltonian \(\mathcal H_i\), defined as

-../_images/effHam.svg -

encodes the effect of the full system Hamiltonian on the current center site \(i\). The variational problem of the local update can then be solved by finding the eigenvector of \(\mathcal{H}_i\) corresponding to the smallest real eigenvalue, and this repeatedly for every site sweeping back and forth through the chain, each time moving the orthogonality center of the MPS. At each update step a large part of the effective Hamiltonian can simply be reused, making the routine very efficient. Notice however that DMRG manifestly breaks translation invariance by updating one tensor at a time. As we will see, VUMPS does not suffer from this artefact.

-

From this brief explanation it should be clear that DMRG is a surprisingly simple algorithm. Nevertheless DMRG has proven itself time and time again, and is the most successful algorithm for variationally approximating the ground state of local gapped (1+1)d Hamiltonians. DMRG is implemented in MPSKit and can be called by DMRG().

-
-
-

16.1.2. Example#

-

Let us illustrate the use of DMRG in MPSKit by approximating the ground state of the transverse field Ising model. The Ising model is implemented in MPSKitModels as follows

-
-\[ H = -J\left(\sum_{<i,j>} Z_i Z_j + \sum_i h_x X_i + h_z Z_i\right),\]
-

where we are free to choose the parameters \(J\), \(h_x\) and \(h_z\), and \(X\) and \(Z\) are the generators of \(\mathfrak{su}(2)\), and thus differ from the usual Pauli matrices by a factor of \(\frac{1}{2}\).

-

Let us consider 16 lattice sites, bond dimension 12, open boundary conditions and let’s stick to the default critical values of \(h_x=0.5\) and \(h_z=0\). Finding the ground state using DMRG then only takes a handful of iterations!

-
-
-
using TensorKit, MPSKit, MPSKitModels
-
-d = 2 # Physical dimension
-L = 16 # Length spin chain
-D = 12 # Bond dimension
-
-H = transverse_field_ising()
-
-algorithm = DMRG(); # Summon DMRG
-Ψ = FiniteMPS(L, ^d, ^D) # Random MPS ansatz with bond dimension D
-Ψ₀,_ = find_groundstate(Ψ, H, algorithm);
-
-
-
-
-
┌ Info: DMRG iteration:
-  iter = 1
-  ϵ = 0.0005326848329962604
-  λ = -20.01638790045522 - 1.69387690237017e-16im
-  Δt = 0.646787812
-┌ Info: DMRG iteration:
-  iter = 2
-  ϵ = 1.3447595970721666e-7
-  λ = -20.016387900460202 + 2.3832857257682006e-17im
-  Δt = 0.082970472
-
-
-
┌ Info: DMRG iteration:
-  iter = 3
-  ϵ = 3.2547213592364735e-8
-  λ = -20.016387900460266 - 5.933982876424318e-16im
-  Δt = 0.022579385
-┌ Info: DMRG iteration:
-  iter = 4
-  ϵ = 1.2051191981316597e-8
-  λ = -20.016387900460273 - 8.779908258550268e-17im
-  Δt = 0.024247745
-┌ Info: DMRG iteration:
-  iter = 5
-  ϵ = 4.468305529377547e-9
-  λ = -20.01638790046028 - 2.2329965386914683e-15im
-  Δt = 0.015626563
-┌ Info: DMRG iteration:
-  iter = 6
-  ϵ = 1.6576613024032395e-9
-  λ = -20.01638790046028 + 1.9513234593767897e-15im
-  Δt = 0.018433804
-┌ Info: DMRG iteration:
-  iter = 7
-  ϵ = 6.154532192441363e-10
-  λ = -20.016387900460302 + 1.923899804039612e-16im
-  Δt = 0.013056537
-┌ Info: DMRG iteration:
-  iter = 8
-  ϵ = 2.2868822183759553e-10
-  λ = -20.016387900460288 - 4.195021525164557e-17im
-  Δt = 0.011804665
-
-
-
┌ Info: DMRG iteration:
-  iter = 9
-  ϵ = 8.504255231816188e-11
-  λ = -20.016387900460266 + 9.980536216141623e-17im
-  Δt = 0.01104208
-┌ Info: DMRG iteration:
-  iter = 10
-  ϵ = 3.164944418490319e-11
-  λ = -20.016387900460277 + 3.711808572814786e-17im
-  Δt = 0.010065283
-┌ Info: DMRG iteration:
-  iter = 11
-  ϵ = 1.1787761332126287e-11
-  λ = -20.016387900460273 + 8.868584677716098e-16im
-  Δt = 0.009222207
-┌ Info: DMRG iteration:
-  iter = 12
-  ϵ = 4.392374800389212e-12
-  λ = -20.016387900460266 + 1.2190353089600007e-15im
-  Δt = 0.008492783
-┌ Info: DMRG iteration:
-  iter = 13
-  ϵ = 1.6394607745955364e-12
-  λ = -20.016387900460273 - 5.28239256777398e-16im
-  Δt = 0.007997797
-┌ Info: DMRG iteration:
-  iter = 14
-  ϵ = 6.110346266128261e-13
-  λ = -20.016387900460266 + 1.532956536656155e-16im
-  Δt = 0.007693257
-┌ Info: DMRG summary:
-  ϵ = 2.0e-12
-  λ = -20.016387900460266 + 1.532956536656155e-16im
-  Δt = 1.144352462
-
-
-
-
-
-
-
-

16.2. VUMPS#

-

As mentioned above, VUMPS optimizes uniform MPS directly in the thermodynamic limit. Since the total energy becomes unbounded in this limit, our objective should be to rather minimize the energy density. When working in the mixed gauge, this minimization problem can be represented diagrammatically as

-../_images/energyOpt.svg -

where we have introduced the left- and right fixed points \(F_L\) and \(F_R\) defined as

-../_images/env.svg -

which obey the normalization condition

-../_images/envNorm.svg -

The VUMPS algorithm offers the advantage of global optimalization by design, since the algorithm, contrary to DMRG, does not rely on individual updates of local tensors.

-

Given a Hamiltonian of the form mentioned above and an intial random uniform MPS defined by \(\{A_L, A_R,C\}\), VUMPS approximates the ground state by finding an approximate solution to the fixed-point equations

-
-\[\begin{split} A_C' = H_{A_C}(A_C), \\ - C' = H_C(C), \\ - A_C = A_LC = CA_R.\end{split}\]
-

A detailed derivation that these equations characterize the variational minimum in the manifold of uniform MPS is beyond the scope of these notes, but see [Vanderstraeten et al., 2019].

-

In these equations the effective Hamiltonians \(H_{A_C}\) and \(H_{C}\) acting on \(A_C\) and \(C\) respectively are given by is given by

-../_images/H_AC.svg -../_images/H_C.svg -

The last equation then simply states that \(C\) intertwines the left - and right-orthonormal form of the tensor \(A\).

-
-

16.2.1. Algorithm#

-

Let us now explain step-by-step how VUMPS finds an approximate solution to the fixed-point equations in an iterative way.

-
    -
  1. We initialize the algorithm with the random guess \(\{A_L, A_R,C\}\), and chose a tolerance \(\eta\).

  2. -
  3. We first solve the first two eigenvalue equations

    -
    -\[\begin{split} A_C = H_{A_C}(A_C), \\ - C = H_C(C),\end{split}\]
    -

    using for example an Arnoldi algorithm with the previous approximations of \(A_C\) and \(C\) as initial guess. This yields two tensors \(\tilde A_C\) and \(\tilde C\).

    -
  4. -
  5. From \(\tilde A_C\) and \(\tilde C\) we compute \(\tilde A_L\) and \(\tilde A_R\) that minimize following two-norms

    -
    -\[\begin{split} \epsilon_L = \min_{A_L^\dagger A_L=1} ||\tilde A_C-\tilde A_L\tilde C||_2, \\ - \epsilon_R = \min_{A_R A_R^\dagger=1} ||\tilde A_C-\tilde C\tilde A_R||_2,\end{split}\]
    -

    and thus approximately solve the last equation. Note that the minimum is taken over respectively left - and right isometric matrices. We comment below on the analytic soltuion of these equations and how this analytic solution can be approximated efficiently.

    -
  6. -
  7. Update \(A_L\leftarrow\tilde A_L\), \(A_R\leftarrow\tilde A_R\) and \(C\leftarrow\tilde C\).

  8. -
  9. Evaluate \(\epsilon=\max(\epsilon_L,\epsilon_R)\) and repeat until \(\epsilon\) is below the tolerance \(\eta\).

  10. -
-

Let us finally comment on solving the minimization problem to approximate \(\tilde A_{L/R}\).

-

A beautiful result in linear algebra states that the minimum is exactly given by \(\tilde A_L=U_lV_l^\dagger\) where \(U_l\) and \(V_l\) are the isometries arising from the singular value decomposition of \(\tilde A_C\tilde C^\dagger=U_l\Sigma_lV_l^\dagger\), and similarly \(\tilde A_R=U_rV_r^\dagger\), where \(\tilde C^\dagger\tilde A_C=U_r\Sigma_rV_r^\dagger\). Even though this approach will work well for the first iteration steps, this might not be the best solution close to convergence. When approaching the exact solution \(A^s_C=A^s_LC=CA^s_R\) the singular values in \(\Sigma_{l/r}\) become really small so that in finite precision arithmetic the singular vector in the isometries \(U_{l/r}\) and \(V_{l/r}\) are poor approximations of the exact singular vectors. A robust and close to optimal solution turns out to be

-
-\[ \tilde A_L = U^l_{A_C}(U^l_C)^\dagger,\qquad \tilde A_R = (U^r_C)^\dagger U^r_{A_C},\]
-

where the \(U\)’s are the unitaries appearing in the polar decomposition of

-
-\[\begin{split} \tilde A_C = U^l_{A_C}P^l_{A_C},\qquad \tilde C = U^l_CP^l_C,\\ - \tilde A^r_C = P^r_{A_C}U^r_{A_C},\qquad \tilde C = P^r_CU^r_C.\end{split}\]
-
-
-

16.2.2. Example#

-

Let us demonstrate the algorithm using MPSKit by estimating the ground state energy density of the spin 1 XXX model. The VUMPS algorithm is called in the same way as we called DMRG. We initialize a random initial MPS with bond dimension 12 and physical dimension 3 (because the spin 1 representation of SU(2) is \(2\cdot1+1=3\)-dimensional). Obviously we don’t have to specify a system size because we work directly in the thermodynamic limit.

-
-
-
H = heisenberg_XYZ()
-
-Ψ = InfiniteMPS(^3, ^D)
-algorithm = VUMPS()
-Ψ₀, envs = find_groundstate(Ψ, H, algorithm);
-
-
-
-
-
┌ Info: VUMPS iteration:
-  iter = 1
-  ϵ = 0.4719404564358398
-  λ = -0.09959695122131748 - 1.3040636633559757e-16im
-  Δt = 0.053156709
-┌ Info: VUMPS iteration:
-  iter = 2
-  ϵ = 0.4506152025399737
-  λ = -0.5583932234087311 + 5.553135352688308e-17im
-  Δt = 0.010223283
-┌ Info: VUMPS iteration:
-  iter = 3
-  ϵ = 0.3629368844908232
-  λ = -0.993574501246331 + 7.795711024065943e-17im
-  Δt = 0.024041981
-┌ Info: VUMPS iteration:
-  iter = 4
-  ϵ = 0.13370307456046374
-  λ = -1.3549047523508608 + 6.284940422381764e-17im
-  Δt = 0.007571753
-┌ Info: VUMPS iteration:
-  iter = 5
-  ϵ = 0.01582598186552914
-  λ = -1.4008384693488047 - 1.9982973682606948e-16im
-  Δt = 0.007492494
-┌ Info: VUMPS iteration:
-  iter = 6
-  ϵ = 0.007459679693948124
-  λ = -1.4012988366021029 - 5.764860989061647e-17im
-  Δt = 0.008910909
-┌ Info: VUMPS iteration:
-  iter = 7
-  ϵ = 0.00399154578462199
-  λ = -1.4013561841111188 - 2.1883569012788706e-17im
-  Δt = 0.008854833
-┌ Info: VUMPS iteration:
-  iter = 8
-  ϵ = 0.0011455497777277282
-  λ = -1.4013783791455072 - 5.5190095310059743e-17im
-  Δt = 0.016109313
-┌ Info: VUMPS iteration:
-  iter = 9
-  ϵ = 0.000401541135649868
-  λ = -1.4013803528079771 - 9.954377398999163e-17im
-  Δt = 0.006348695
-┌ Info: VUMPS iteration:
-  iter = 10
-  ϵ = 0.00013514788004829803
-  λ = -1.4013806079316597 - 2.3677164203916684e-17im
-  Δt = 0.006413757
-
-
-
┌ Info: VUMPS iteration:
-  iter = 11
-  ϵ = 4.793582818793851e-5
-  λ = -1.4013806388259225 + 9.400567752639473e-17im
-  Δt = 0.006579898
-┌ Info: VUMPS iteration:
-  iter = 12
-  ϵ = 1.6853849012249328e-5
-  λ = -1.4013806428928055 + 4.663267041884612e-17im
-  Δt = 0.006457859
-┌ Info: VUMPS iteration:
-  iter = 13
-  ϵ = 6.14302972102875e-6
-  λ = -1.40138064343216 - 3.9411673633208964e-18im
-  Δt = 0.011694586
-┌ Info: VUMPS iteration:
-  iter = 14
-  ϵ = 2.2191341201556632e-6
-  λ = -1.401380643506309 - 2.71145561760739e-17im
-  Δt = 0.006486793
-┌ Info: VUMPS iteration:
-  iter = 15
-  ϵ = 8.247539552814379e-7
-  λ = -1.4013806435165632 + 6.27746085727569e-17im
-  Δt = 0.006606467
-┌ Info: VUMPS iteration:
-  iter = 16
-  ϵ = 3.0381270697001354e-7
-  λ = -1.4013806435180085 - 7.360988577709973e-17im
-  Δt = 0.006506651
-┌ Info: VUMPS iteration:
-  iter = 17
-  ϵ = 1.1439909425967689e-7
-  λ = -1.4013806435182143 + 4.740638298943028e-17im
-  Δt = 0.006377809
-┌ Info: VUMPS iteration:
-  iter = 18
-  ϵ = 4.274157397995229e-8
-  λ = -1.4013806435182454 + 8.230437511059935e-17im
-  Δt = 0.011077852
-┌ Info: VUMPS iteration:
-  iter = 19
-  ϵ = 1.6237952207617785e-8
-  λ = -1.4013806435182474 + 1.7286444964567578e-17im
-  Δt = 0.006469751
-┌ Info: VUMPS iteration:
-  iter = 20
-  ϵ = 6.130775774164611e-9
-  λ = -1.401380643518249 - 4.388913559151589e-17im
-  Δt = 0.006485772
-┌ Info: VUMPS iteration:
-  iter = 21
-  ϵ = 2.3439697211408005e-9
-  λ = -1.4013806435182496 + 9.076610585685075e-17im
-  Δt = 0.006400072
-┌ Info: VUMPS iteration:
-  iter = 22
-  ϵ = 8.921580512534823e-10
-  λ = -1.4013806435182496 - 3.543113964500985e-18im
-  Δt = 0.007674595
-┌ Info: VUMPS iteration:
-  iter = 23
-  ϵ = 3.427344780625515e-10
-  λ = -1.401380643518248 + 1.6912865276329293e-17im
-  Δt = 0.011840929
-
-
-
┌ Info: VUMPS iteration:
-  iter = 24
-  ϵ = 1.3129414037177357e-10
-  λ = -1.4013806435182494 - 2.264590234517779e-18im
-  Δt = 0.006903282
-┌ Info: VUMPS iteration:
-  iter = 25
-  ϵ = 5.0630289785976875e-11
-  λ = -1.401380643518249 - 1.3308398136231881e-17im
-  Δt = 0.006563748
-┌ Info: VUMPS iteration:
-  iter = 26
-  ϵ = 1.949807197019253e-11
-  λ = -1.401380643518248 + 5.248240045237138e-17im
-  Δt = 0.006484149
-┌ Info: VUMPS iteration:
-  iter = 27
-  ϵ = 7.542652840093537e-12
-  λ = -1.4013806435182508 + 7.973535265547894e-17im
-  Δt = 0.006532749
-┌ Info: VUMPS iteration:
-  iter = 28
-  ϵ = 2.9171689579777305e-12
-  λ = -1.4013806435182499 - 5.080907190674386e-18im
-  Δt = 0.010962064
-┌ Info: VUMPS iteration:
-  iter = 29
-  ϵ = 1.1310794158535638e-12
-  λ = -1.4013806435182494 + 5.464103894193135e-17im
-  Δt = 0.005739366
-┌ Info: VUMPS iteration:
-  iter = 30
-  ϵ = 4.3952525290723206e-13
-  λ = -1.401380643518249 - 1.8882969228324614e-17im
-  Δt = 0.005644267
-┌ Info: VUMPS summary:
-  ϵ = 4.3952525290723206e-13
-  λ = -1.401380643518249 - 1.8882969228324614e-17im
-  Δt = 1.166622834
-
-
-
-
-

It takes about 30 iterations and a second or two to reach convergence. Let us gauge how well the ground state energy density was approximated by calling

-
-
-
expectation_value(Ψ₀, H)
-
-
-
-
-
1-element PeriodicArray{ComplexF64, 1}:
- -1.4013806435182494 - 3.681340623886102e-17im
-
-
-
-
-

The value we obtain here is to be compared with the quasi-exact value -1.401 484 038 971 2(2) obtained in [Haegeman et al., 2011]. As you can see, even with such a small bond dimension we can easily approximate the ground state energy up to 3 decimals.

-
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/4-Algorithms/TimeEvolutionAlgorithms.html b/pr-preview/pr-27/4-Algorithms/TimeEvolutionAlgorithms.html deleted file mode 100644 index 903fb05b..00000000 --- a/pr-preview/pr-27/4-Algorithms/TimeEvolutionAlgorithms.html +++ /dev/null @@ -1,801 +0,0 @@ - - - - - - - - - - - - - 17. Time Evolution — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

Time Evolution

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

17. Time Evolution#

-

In this segment of the tutorial, we delve into some time evolution techniques for MPS. In particular we will focus on the TDVP and Time Evolution MPO methods. Another method (i)TEBD has already been explained in an earlier section. Following this we briefly explain how imaginary time evolution can be used to find ground states and how thermal density matrices can be simulated using MPS. -At the end of this section we offer some basic code examples.

-

In the case of quantum many body systems time evolution amounts to solving the time dependent Schrodinger equation

-
-(17.1)#\[i \frac{\partial}{\partial t} \ket{\Psi(t)}= \hat{H}\ket{\Psi(t)}\]
-

for a given Hamiltonian \(\hat{H}\) with initial condition \(\ket{\Psi_0}=\ket{\Psi(t_0)}\). For a time independent Hamiltonian the solution is given by

-
-\[\ket{\Psi(t)} = U(t)\ket{\Psi_0} = \exp(-it\hat{H})\ket{\Psi_0}\]
-

By approximating the time evolution operator \(U\) in the Tensor Network language, we can also study real-time dynamics.

-
-

Note

-

One should keep in mind that time evolution in general will increase the entanglement of the state so that in practice time evolution can only be done with Tensor Networks for relatively modest times. For example in case of a quench the entanglement for 1D systems grows as \(S \sim t\) , (see [Calabrese and Cardy, 2005]) so that the bond dimension \(D \sim \exp(at)\) in order to accurately follow the dynamics.

-
- -
-

17.1. TDVP#

-

The Time-Dependent Variational Principle is an old concept, originaly developed by Dirac and Frenkel in the 1930’s. The idea is to solve the schrodinger equation by minimizing

-
-\[\|i \frac{\partial}{\partial t} \ket{\Psi(t)}- \hat{H}\ket{\Psi(t)}\|^2\]
-

In the case of MPS, we can parametrize the state \(\ket{\Psi(t)}\) by a set of time dependent matrices \(\{A_1(t),A_2(t),\dots A_N(t)\}\) (where N is the system size for finiteMPS or the size of the unit cell for infinite MPS). In other words the state \(\ket{\Psi(t)}\) lives in a manifold determined by these matrices, the MPS-manifold. Geometrically the solution of the minimization problem is given by the projection of the RHS of the schrodinger equation onto the MPS manifold

-
-(17.2)#\[\frac{d}{dt} \ket{\Psi(A)} = -i \hat{P}_{T\ket{\Psi(A)}} \hat{H}\ket{\Psi(A)}\]
-

where \(\hat{P}_{T\ket{\Psi(A)}}\) is the operator that projects the state onto the tangent space. As a consequence the time-evolving state will never leave the MPS manifold and parametrization in terms of \(A(t)\) makes sense. One can in principle work out the above equation on the level of the \(A\) matrices and try to solve the above equation. This gives a complicated set of (non-linear) equations that can be solved by one’s favourite finite difference scheme, but requires the inversion of matrices with small singular values (and thus numerical instabilities) [Haegeman et al., 2011], [Haegeman et al., 2016]. Instead, it turns out that a natural and inversion free way of solving this equation is possible if we use the gauge freedom of MPS.

-

For a finite MPS, one can show that in the mixed gauge the action of the projection operator onto \(\hat{H}\ket{\Psi(A)}\) is given by [Vanderstraeten et al., 2019]

-../_images/TDVPProjector.svg -

The projector action consists of two sums, one where an effective Hamiltonian \(\hat{H}_{\text{eff}}^{A_C}\) acts on the \(A_C\) on site \(n\) and one where \((\hat{H}_{\text{eff}}^{C})\) acts on the bond tensor \(C\) to the right of it. The effective Hamiltonias are given by

-../_images/Heffs.svg -

Thanks to the decomposition of \(\hat{P}_{T\ket{\Psi(A)}} \hat{H}\ket{\Psi(A)}\) (17.2) now resembles an ODE of the form

-
-(17.3)#\[\frac{d}{dt} Y = A(Y) + B(Y)\]
-

This type of ODE can be solved by a splitting method [Lubich et al., 2015] i.e. we solve \(\frac{d}{dt} Y = A(Y)\) and \(\frac{d}{dt} Y = B(Y)\) seperately and then combine the two results to obtain an approximate solution to (17.3). Applying this idea to (17.2) we thus need to solve equations of the form

-
-\[\frac{d}{dt} \ket{\Psi(A)} = -i \hat{H}_{\text{eff}}^{A_C}[ A_C(n)]\]
-

and

-
-\[\frac{d}{dt} \ket{\Psi(A)}= i \hat{H}_{\text{eff}}^{C}[ C(n)]\]
-

These can be further simplified by noting that we can put all the time dependence inside one tensor, which we choose to be either \(A_C(n)\) or \(C(n)\). It is then sufficient to solve

-
-(17.4)#\[\dot{A}_C(n) = -i \hat{H}_{\text{eff}}^{A_C}[ A_C(n)]\]
-

and

-
-(17.5)#\[\dot{C}(n) = i \hat{H}_{\text{eff}}^{C}[ C(n)]\]
-

for each site \(n\) seperately. These can be integrated exactly to give

-
-(17.6)#\[A_C(n,t+dt) = \exp(-idt \hat{H}_{\text{eff}}^{A_C}) A_C(n,t)\]
-

and

-
-(17.7)#\[C(n,t+dt) = \exp(idt \hat{H}_{\text{eff}}^{C}) C(n,t)\]
-

A natural way to combine the seperate solutions is to perform a sweep-like update. Starting from the first site we do:

-
-

TDVP algorithm for finite MPS

-
    -
  1. Update \(A_C(n)\) according to (17.6).

  2. -
  3. QR the resulting new \(A_C(n,t+dt)\) to get a new updated \(A_L(n,t+dt)\) en \(C(n,t+dt)\).

  4. -
  5. Update the new \(C(n,t+dt)\) via (17.7) to get an \(\tilde{C}\).

  6. -
  7. Absorb \(\tilde{C}\) into \(A_R(n+1,t)\) to get a new \(A_C(n+1,t)\)

  8. -
  9. Repeat for n+1

  10. -
-
-

At the end of the chain one only updates the \(A_C\) since there is no \(C\) there.

-

Doing the above left to right sweep gives a first order integrator i.e. we have solved the time evolution up to order \(\mathcal{O}(dt^2)\). Since the terms can be solved in any order we can also perform a reverse sweep i.e. working from right to left. Combining this with the left to right sweep yields a second order integrator (because the reverse sweep is the adjoint of the forwards sweep).

-

For an infinite MPS one could also do a sweep-like update until some criteria converges to obtain new tensors \(\{A_L,C,A_C,A_R\}\). However this can be costly since one has to iterate until convergence. Instead we can exploit the translational invariance of the system by demanding that \(C=\tilde{C}\). Since \(\tilde{C}=\exp(idt \hat{H}_{\text{eff}}^{C}) C(n,t+dt)\) we can turn things around and find

-
-\[C(n,t+dt)=\exp(-idt \hat{H}_{\text{eff}}^{C}) C(n)\]
-

Given the newly found \(C(n,t+dt)\) and \(A_C(n,t+dt)\) one can determine a new \(A_L\), giving a MPS for \(t+dt\).

-
-

Note

-

Unlike other time evolution methods, TDVP retains some of the physical -properties of the Schrodinger equation it is trying to solve. First of all, it acts trivial on (numerical) eigenstates of \(\hat{H}\) since then \(\hat{H}_{\text{eff}}^{A_C}[A_C] \propto A_C\) and the whole MPS picks up a phase equal to \(e^{-i dtE}\). In addition it conserves energy and is time-reversible for time-independent Hamiltonians [Vanderstraeten et al., 2019].

-
-
-
-

17.2. Time Evolution MPO#

-

Perhaps the most natural way to perform the time evolution would be to write the time evolution operator as a MPO. The evolved state would then simply be the contraction of this MPO onto an MPS (see ref). The exponential implementing the time evolution can be approximated up to any order by its trunctated Taylor series

-
-\[\exp(-\tau\hat{H}) = \hat{1} + \tau\hat{H} + \frac{\tau^2}{2}\hat{H}^2 + \mathcal{O}(\tau^3)\]
-

The MPO approximation of the time evolution operator then boils down to implementing powers of \(\hat{H}\) in an efficient (i.e. with the lowest possible MPO bond dimension) and size-extensive way [Damme et al., 2023]. For example, for a MPO Hamiltonian of the form

-../_images/MPOHam.svg -

which corresponds to the Hamiltonian

-
-\[\hat{H} = \sum_i \hat{D}_i + \hat{C}_i \hat{B}_{i+1}\]
-

The first order approximation of \(U=\exp(-\tau\hat{H})\) is given in MPO form by

-../_images/TimeMPO_1stOrder.svg -

Doing the matrix multiplcation (and remembering that for MPO the boundary conditions are so the we need to track the upper left expression) we find

-
-\[\exp(-\tau\hat{H}) \approx \hat{1} + \tau \left(\sum_i D_i + C_i B_{i+1}\right) = \hat{1} + \tau \hat{H}\]
-

as desired.

-

The trick for generating the first order approximation involves removing the third “level” from the MPO form of H and multiplying with the appropriate factor of τ. This can be visualised as follows

-../_images/FirstOrderTrick.svg -

This method can be extended to any desired order in \(\tau\) as outlined in [Damme et al., 2023].

-
-
-

17.3. Imaginary time evolution#

-

Besides simulating dynamics, any time evolution method can also be used to find the groundstate of \(\hat{H}\) by taking \(t\) to be imaginary. The basis for this idea is the fact that

-
-\[\ket{\Psi_0} = \lim_{\tau->+\infty} \frac{e^{-\tau \hat{H}} \ket{\Psi}}{\sqrt{\braket{\Psi|e^{-2\tau \hat{H}} |\Psi}}}\]
-

where \(\ket{\Psi}\) is any initial state not orthogonal to the ground state. Indeed expanding the initial state in the eigenbasis of \(\hat{H}\) we have \(\ket{\Psi} = \sum_i c_i \ket{E_i}\) with \(\ket{E_i}\) the eigenstate corresponding to energy \(E_i\) with ordering \(E_0 < E_1 < E_2 < \dots\). Then

-
-\[e^{-\tau \hat{H}} \ket{\Psi} = \sum_i c_i e^{-\tau E_i} \ket{E_i}\]
-

In taking the limit \(\tau\to+\infty\) the slowest vanishing exponential is that of \(E_0\). In this way the ground state gets projected out of the initial state. Demanding that the state is normalized gives

-
-\[\lim_{\tau->+\infty} \frac{e^{-\tau \hat{H}} \ket{\Psi}}{\sqrt{\braket{\Psi|e^{-2\tau \hat{H}} |\Psi}}} = \lim_{\tau->+\infty} \frac{\sum_i c_i e^{-\tau E_i} \ket{E_i}}{\sqrt{\sum_i |c_i|^2 e^{-2\tau E_i}}} = \frac{c_0 }{|c_0|} \ket{E_0}\]
-

which gives the ground state up to an irrelevant phase factor.

-
-
-

17.4. Finite Temperature#

-

It is possible to use time evolution methods to construct thermal density operators i.e. \(\rho = \frac{1}{Z}e^{-\beta \hat{H}}\) with \(\beta=1/T\) and \(Z\) a normalization constant. The idea here is to write \(\rho\) as an MPO

-../_images/DensityMatrix.svg -

with the constraint that

-../_images/Mconstraint.svg -

Here the triangles represent an isometry that fuses the two legs together into a bigger leg. This particular form ensures that \(\rho\) is a positive semi-definite operator and thus physical [Verstraete et al., 2004]. Note that for \(d_k=1\) we obtain the density matrix of a pure state. We can represent \(\rho\) as the density matrix of pure state (i.e. a MPS) by introducing ancillas \(\{\ket{a_k}\}\) so that

-../_images/AncillaMPS.svg -

where the thicker physical legs indicate that they contain both the \(s\) and \(a\) degrees of freedom. One immediately sees that \(\rho=\text{Tr}_a({\ket{\Psi}\bra{\Psi}})\). The thermal density operators \(\rho(\beta)\) for any \(\beta\) can then be found by starting from the \(\beta=0\) state \(\rho(0)=\mathbf{1}\) and performing imaginary time evolution

-
-\[e^{-\beta H} = (e^{-\Delta \tau \hat{H}})^M\rho(0)(e^{-\Delta \tau \hat{H}})^M\]
-

with \(\Delta \tau = \frac{\beta}{2M}\) [Verstraete et al., 2004].

-
-
-

17.5. Code example: MPSKit.timestep,make_time_mpo#

-

Below is some code on how MPSKit and MPSKitModels can be used out-of-the-box to perform time evolution.

-
-
-
using TensorKit,MPSKit,MPSKitModels
-using Plots
-
-
-
-
-
-
-
H₀ = transverse_field_ising(;J=1.0,g=0.0);
-
-#Create a random MPS with physical bond dimension d=2 and virtual D=10 and optimize it
-Ψ = InfiniteMPS([2],[10]);
-(gs,envs)    = find_groundstate(Ψ,H₀,VUMPS(;verbose=false));
-
-#Let's check some expectation values
-sz_gs     = expectation_value(gs,σᶻ()) # we have found the |↑↑...↑> or |↓↓...↓> state
-E_gs      = expectation_value(gs,H₀,envs)
-
-# time evolution Hamiltonian
-Ht        = transverse_field_ising(;J=1.0,g=0.25);
-Ebefore   = real(expectation_value(gs,Ht)[1])
-dt        = 0.1
-
-# Let's do one time step with TDVP
-alg       = TDVP();
-envs      = environments(gs,Ht);
-(Ψt,envs) = timestep(gs,Ht,dt,alg,envs);
-szt_tdvp  = real(expectation_value(Ψt,σᶻ())[1]);
-Et_tdvp   = real(expectation_value(Ψt,Ht,envs)[1]);
-
-# let's make a first order time evolution mpo out of Ht
-Ht_mpo    = make_time_mpo(Ht, dt, TaylorCluster{1}());
-
-(Ψt,_) = approximate(gs, (Ht_mpo, gs), VUMPS(; verbose=false));
-szt_tmpo  = real(expectation_value(Ψt,σᶻ())[1]);
-Et_tmpo   = real(expectation_value(Ψt,Ht)[1]);
-
-@show szt_tdvp-szt_tmpo
-@show Ebefore-Et_tmpo
-@show Ebefore-Et_tdvp;
-
-
-
-
-
szt_tdvp - szt_tmpo = 2.0289947257001728e-5
-Ebefore - Et_tmpo = 1.284094658693391e-5
-Ebefore - Et_tdvp = -2.21243089626455e-7
-
-
-
-
-

We see that \(<σᶻ(t)>\) for both methods after one timestep are reasonably close, but that the energy (density) is (more) conserved for the tdvp method. -If we were to do the time evolution for many timesteps and for different orders of time evolution MPO we would end up with the following plot

-../_images/TimeEvolution.svg

We clearly see that increasing the order of the time evolution mpo improves the result.

-
-
-
# We can also find the groundstate using imaginary time evolution
-H        = transverse_field_ising(;J=1.0,g=0.35);
-
-# Here we will do 1 iteration and see that the energy has dropped
-Ψ        = InfiniteMPS([2],[10]);
-Ψenv     = environments(Ψ,H) ;
-Ebefore  = real(expectation_value(Ψ,H,envs)[1]);
-(Ψ,Ψenv) = timestep(Ψ,H,-1im*dt,TDVP(),Ψenv);
-Eafter   = real(expectation_value(Ψ,H,Ψenv)[1]);
-
-Eafter < Ebefore
-
-
-
-
-
true
-
-
-
-
-

If we were to do this for many iterations the energy of the evolved state eventually reach that of the ground state as shown below.

-../_images/ImagTimeEvolution.svg
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/5-Tutorials/FiniteEntanglementScaling.html b/pr-preview/pr-27/5-Tutorials/FiniteEntanglementScaling.html deleted file mode 100644 index ce22d794..00000000 --- a/pr-preview/pr-27/5-Tutorials/FiniteEntanglementScaling.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - - - - - - - - 19. Finite Entanglement Scaling — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Finite Entanglement Scaling

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

19. Finite Entanglement Scaling#

-

Tutorial on finite entanglement scaling with uniform MPS, using MPSKit.jl.

-

Coming soon.

-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/5-Tutorials/SymmetricTensors.html b/pr-preview/pr-27/5-Tutorials/SymmetricTensors.html deleted file mode 100644 index fb5e8302..00000000 --- a/pr-preview/pr-27/5-Tutorials/SymmetricTensors.html +++ /dev/null @@ -1,3427 +0,0 @@ - - - - - - - - - - - - - 18. A Symmetric Tensor Deep Dive: Constructing Your First Tensor Map — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - - -
- -
- -

TensorTutorials

- -

A Symmetric Tensor Deep Dive: Constructing Your First Tensor Map

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

18. A Symmetric Tensor Deep Dive: Constructing Your First Tensor Map#

-

In this tutorial, we will demonstrate how to construct specific TensorMaps which are -relevant to some common physical systems, with an increasing degree of complexity. We will -assume the reader has gone through the tutorial sections on -tensor network theory and -symmetries in tensor networks. In going through these examples we aim -to provide a relatively gently introduction to the meaning of -symmetry sectors and -vector spaces within the -context of TensorKit.jl, -how to initialize a TensorMap over a given vector space -and finally how to manually set the data of a symmetric TensorMap. We will keep our -discussion as intuitive and simple as possible, only adding as many technical details as -strictly necessary to understand each example. When considering a different physical system -of interest, you should then be able to adatpt these recipes and the intuition behind them -to your specific problem at hand.

-
-

Note

-

Many of these examples are already implemented in the -MPSKitModels.jl package, in which case we -basically provide a narrated walk-through of the corresponding code.

-
-
-
-
using LinearAlgebra
-using TensorKit
-using MPSKitModels
-using WignerSymbols
-using SUNRepresentations
-using Test # for showcase testing
-
-
-
-
-
-

18.1. Level 0: The 1-Dimensional Ising Model#

-

As the most basic example, we will consider the -1-dimensional transverse-field Ising model, -whose Hamiltonian is given by

-
-(18.1)#\[H = -J \left (\sum_{\langle i, j \rangle} Z_i Z_j + g \sum_{i} X_i\right).\]
-

Here, \(X_i\) and \(Z_i\) are the -Pauli operators acting on site \(i\), and the -first sum runs over pairs of nearest neighbors \(\langle i, j \rangle\). This model has a -global \(\mathbb{Z}_2\) symmetry, as it is invariant under the transformation \(U H U^\dagger = -H\) where the symmetry transformation \(U\) is given by a global spin flip,

-
-(18.2)#\[U = \prod_i X_i.\]
-

We will circle back to the implications of this symmetry later.

-

As a warmup we will implement the Hamiltonian (18.1) in the standard way by -encoding the matrix elements of the single-site operators \(X\) and \(Z\) into aan array of -complex numbers, and then combine them in a suitable way to get the Hamiltonian terms. -Instead of using plain Julia arrays, we will use a representation in terms of TensorMaps -over complex vector spaces. These will essentially just be wrappers around base arrays at -this point, but their construction requires some consideration of the notion of spaces, -which generalize the notion of size for arrays. Each of the operators \(X\) and \(Z\) acts on -a local 2-dimensional complex vector space. In the context of TensorKit.jl such a space can -be represented as ComplexSpace(2), or using the convenient shorthand ℂ^2. A single-site -Pauli operator maps from a domain physical space to a codomain physical space, and can -therefore be represented as instances of a TensorMap(..., ℂ^2 ℂ^2). The corresponding -data can then be filled in by hand according to the familiar Pauli matrices in the following -way:

-
-
-
# initialize numerical data for Pauli matrices
-x_mat = ComplexF64[0 1; 1 0]
-z_mat = ComplexF64[1 0; 0 -1]
-
-# construct physical Hilbert space
-V = ^2
-
-# construct the physical operators as TensorMaps
-X = TensorMap(x_mat, V  V)
-Z = TensorMap(z_mat, V  V)
-
-# combine single-site operators into two-site operator
-ZZ = Z  Z
-
-
-
-
- - -Hide code cell output - -
-
TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
-  0.0 + 0.0im   0.0 + 0.0im
- -1.0 + 0.0im  -0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  -1.0 + 0.0im
- 0.0 + 0.0im  -0.0 + 0.0im
-
-[:, :, 2, 2] =
-  0.0 + 0.0im  -0.0 + 0.0im
- -0.0 + 0.0im   1.0 - 0.0im
-
-
-
-
-
-

We can easily verify that our operators have the desired form by checking their data in the -computational basis:

-
-
-
ZZ
-
-
-
-
-
TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
-  0.0 + 0.0im   0.0 + 0.0im
- -1.0 + 0.0im  -0.0 + 0.0im
-
-[:, :, 1, 2] =
- 0.0 + 0.0im  -1.0 + 0.0im
- 0.0 + 0.0im  -0.0 + 0.0im
-
-[:, :, 2, 2] =
-  0.0 + 0.0im  -0.0 + 0.0im
- -0.0 + 0.0im   1.0 - 0.0im
-
-
-
-
-
-
-
X
-
-
-
-
-
TensorMap(ℂ^2 ← ℂ^2):
- 0.0 + 0.0im  1.0 + 0.0im
- 1.0 + 0.0im  0.0 + 0.0im
-
-
-
-
-
-

Note

-

In order to combine these local operators into a concrete Hamiltonian that can be used in -MPSKit.jl we can make use of the convenient -@mpoham macro exported by -MPSKitModels.jl. For an infinite translation -invariant Ising chain, we can use the following piece of code which produces the Hamiltonian -in an interesting-looking form (see MPSKit.jl for details on this format).

-
-
-
-
lattice = InfiniteChain(1)
-H = @mpoham begin
-    sum(nearest_neighbours(lattice)) do (i, j)
-        return ZZ{i,j}
-    end + sum(vertices(lattice)) do i
-        return X{i}
-    end
-end
-
-
-
-
- - -Hide code cell output - -
-
MPSKit.MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- -1.4142135623730945 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.414213562373095 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-
-[:, :, 2, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- -0.7071067811865476 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.7071067811865475 + 0.0im
-; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  0.0 + 0.0im
- TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im  0.0 + 0.0im
-
-[:, :, 2, 1] =
- 0.0 + 0.0im  1.0 + 0.0im
-]])
-
-
-
-
-
-
-
-

18.2. Level 1: The \(\mathbb{Z}_2\)-symmetric Ising Model#

-
-

18.2.1. The irrep basis and block sparsity#

-

Let us now return to the global \(\mathbb{Z}_2\) invariance of the Hamiltonian -(18.1), and consider what this implies for its local terms \(ZZ\) and \(X\). -Representing these operators as TensorMaps, the invariance of \(H\) under a global -\(\mathbb{Z}_2\) transformation implies the following identities for the local tensors:

-
-../_images/ZZX_symm.svg -
-

Recalling the discussion on symmetries in tensor networks, we recognize -that these identitities precisely mean that these local tensors transform trivially under a -tensor product representation of \(\mathbb{Z}_2\). This implies that, in an appropriate basis -for the local physical vector space, our local tensors would become block-diagonal where -each so-called matrix block is labeled by a \(\mathbb{Z}_2\) irrep. From the same -discussion, we recall that the appropriate local basis transformation is precisely the one -that brings the local representation \(X\) into block-diagonal form. Clearly, this -transformation is nothing more than the Hadamard transformation which maps the computational -basis of \(Z\) eigenstates \(\{\ket{\uparrow}, \ket{\downarrow}\}\) to that of the \(X\) -eigenstates \(\{\ket{+}, \ket{-}\}\) defined as \(\ket{+} = \frac{\ket{\uparrow} + -\ket{\downarrow}}{\sqrt{2}}\) and \(\ket{-} = \frac{\ket{\uparrow} - -\ket{\downarrow}}{\sqrt{2}}\). In the current context, this basis is referred to as the -irrep basis of \(\mathbb{Z}_2\), where the local basis state \(\ket{+}\) corresponds to the -trivial representation of \(\mathbb{Z}_2\) while \(\ket{-}\) corresponds to the sign -representation.

-

Next, let’s make the statement that ‘the matrix blocks of the local tensors are labeled by -\(\mathbb{Z}_2\) irreps’ more concrete. To this end, consider the action of \(ZZ\) in the irrep -basis, which is given by the four nonzero matrix elements

-
-\[\begin{split}\begin{align} -ZZ : \mathbb C^2 \otimes \mathbb C^2 &\to \mathbb C^2 \otimes \mathbb C^2 : \\ -\ket{+} \otimes \ket{+} &\mapsto \ket{-} \otimes \ket{-}, \\ -\ket{+} \otimes \ket{-} &\mapsto \ket{-} \otimes \ket{+}, \\ -\ket{-} \otimes \ket{+} &\mapsto \ket{+} \otimes \ket{-}, \\ -\ket{-} \otimes \ket{-} &\mapsto \ket{+} \otimes \ket{+}. -\end{align}\end{split}\]
-

If we denote the trivial \(\mathbb{Z}_2\) irrep by \('0'\), corresponding to a local \(\ket{+}\) -state, and the sign irrep by \('1'\), corresponding to a local \(\ket{-}\) state, and recall -that in this notation the fusion rules of \(\mathbb{Z}_2\) are given by addition modulo 2, we -can associate each of the above matrix elements to a so-called fusion tree of -\(\mathbb{Z}_2\) irreps with a corresponding coefficient of 1,

-
-../_images/Z2_fusiontrees.svg -
-

From this we can observe our previous statement very clearly: the \(ZZ\) operator indeed -consists of two distinct two-dimensional matrix blocks, each of which are labeled by the -value of the coupled irrep on the middle line of each fusion tree. The first block -corresponds to the even coupled irrep ‘0’, and acts within the two-dimensional subspace -spanned by \(\{\ket{+,+}, \ket{-,-}\}\), while the second block corresponds to the odd coupled -irrep ‘1’, and acts within the two-dimensional subspace spanned by \(\{\ket{+,-}, -\ket{-,+}\}\). In TensorKit.jl, this block-diagonal structure of a symmetric tensor is -explicitly encoded into its representation as a TensorMap, where only the matrix blocks -corresponding to each coupled irrep are stored.

-

For our current purposes however, we never really need to explicitly consider these matrix -blocks. Indeed, when constructing a TensorMap it is sufficient to set its data by manually -assigning a matrix element to each fusion tree of the form above labeled -by a given tensor product of irreps. This matrix element is then automatically inserted into -the appropriate matrix block. So, for the purpose of this tutorial we will interpret a -symmetric TensorMap simply as a list of fusion trees, to each of which corresponds a -certain reduced matrix element.

-
-

Note

-

In general, such a reduced matrix element is not necessarily a scalar, but rather an array -whose size is determined by the degeneracy of the irreps in the codomain and domain of the -fusion tree. For this reason, a reduced matrix element associated to a given fusion tree is -also referred to as an array block. In the following we will use terms ‘reduced matrix -element’, ‘array block’ or just ‘block’ interchangeably. However, it should be remembered -that these are distinct from the matrix blocks in the block-diagonal decomposition of the -tensor.

-
-
-
-

18.2.2. Fusion trees and how to use them#

-

This view of the underlying symmetry structure in terms of fusion trees and corresponding -array blocks is a very convenient way of working with the TensorMap type. Consider a -generic fusion tree of the form

-
-../_images/fusiontree.svg -
-

which can be used to label a block of a TensorMap corresponding to a two-site operator. -This object should actually be seen as a pair of fusion trees. The first member of the -pair, related to the codomain of the TensorMap, is referred to as the splitting tree and -encodes how the coupled charge \(c\) splits into the uncoupled charges \(s_1\) and \(s_2\). -The second member of the pair, related to the domain of the TensorMap, is referred to as -the fusion tree and encodes how the uncoupled charges \(f_1\) and \(f_2\) fuse to the coupled -charge \(c\). Both the splitting and fusion tree can be represented as a -TensorKit.FusionTree -instance. You will find such a FusionTree has the following properties encoded into its -fields:

-
    -
  • uncoupled::NTuple{N,I}: a list of N uncoupled charges of type I<:Sector

  • -
  • coupled::I: a single coupled charge of type I<:Sector

  • -
  • isdual::NTuple{N,Bool}: a list of booleans indicating whether the corresponding uncoupled charge is dual

  • -
  • innerlines::NTuple{M,I}: a list of inner lines of type I<:Sector of length M = N - 2

  • -
  • vertices::NTuple{L,T}: list of fusion vertex labels of type T and length L = N - 1

  • -
-

For our current application only uncoupled and coupled are relevant, since -\(\mathbb{Z}_2\) irreps are self-dual and have Abelian fusion rules. We will come back to -these other properties when discussion more involved applications. Given some TensorMap, -the method TensorKit.fusiontrees(t::TensorMap) returns an iterator over all pairs of -splitting and fusion trees that label the blocks of t.

-

We can now put this into practice by directly constructing the \(ZZ\) operator in the irrep -basis as a \(\mathbb{Z}_2\)-symmetric TensorMap. We will do this in three steps:

-
    -
  • First we construct the physical space at each site as a \(\mathbb{Z}_2\)-graded vector space.

  • -
  • Then we initialize an empty TensorMap with the correct domain and codomain vector spaces built from the previously constructed physical space.

  • -
  • And finally we iterate over all splitting and fusion tree pairs and manually fill in the corresponding nonzero blocks of the operator.

  • -
-

After the basis transform to the irrep basis, we can view the two-dimensional complex -physical vector space we started with as being spanned by the trivial and sign irrep of -\(\mathbb{Z}_2\). In the language of TensorKit.jl, this can be implemented as a Z2Space, an -alias for a -\(\mathbb{Z}_2\)-graded vector space -Vect[Z2Irrep], which contains the trivial irrep Z2Irrep(0) with degeneracy 1 and the -sign irrep Z2Irrep(1) with degeneracy 1. We can define this space in the following way and -check its dimension:

-
-
-
V = Z2Space(0 => 1, 1 => 1)
-dim(V)
-
-
-
-
-
2
-
-
-
-
-

Given this physical space, we can initialize the \(ZZ\) operator as an empty TensorMap with -the appropriate structure.

-
-
-
ZZ = TensorMap(zeros, ComplexF64, V  V  V  V)
-
-
-
-
-
TensorMap((Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1)) ← (Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1))):
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-

The output of this command again demonstrates the underlying structure of a symmetric -tensor. We see that all eight valid fusion trees with two incoming irreps and two outgoing -irreps of the type above are listed with their corresponding block data. Each -of these blocks is an array of shape \((1, 1, 1, 1)\) since each irrep occuring in the space -\(V\) has degeneracy 1. Using the fusiontrees method and the fact that we can index a -TensorMap using a splitting/fusion tree pair, we can now fill in the nonzero blocks of the -operator by observing that the \(ZZ\) operator flips the irreps of the uncoupled charges in -the domain with respect to the codomain, as shown in the diagrams above. Flipping a given -Z2Irrep in the codomain can be implemented by fusing them with the sign irrep -Z2Irrep(1), giving:

-
-
-
flip_charge(charge::Z2Irrep) = only(charge  Z2Irrep(1))
-for (s, f) in fusiontrees(ZZ)
-    if s.uncoupled == map(flip_charge, f.uncoupled)
-        ZZ[s, f] .= 1
-    end
-end
-ZZ
-
-
-
-
-
TensorMap((Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1)) ← (Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1))):
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-

Indeed, the resulting TensorMap exactly encodes the matrix elements of the \(ZZ\) operator -shown in the diagrams above. The \(X\) operator can be constructed in -a similar way. Since it is by definition diagonal in the irrep basis with blocks directly -corresponding to the trivial and sign irrep, its construction is particularly simple:

-
-
-
X = TensorMap(zeros, ComplexF64, V  V)
-for (s, f) in fusiontrees(X)
-    if only(f.uncoupled) == Z2Irrep(0)
-        X[s, f] .= 1
-    else
-        X[s, f] .= -1
-    end
-end
-X
-
-
-
-
-
TensorMap(Rep[ℤ₂](0=>1, 1=>1) ← Rep[ℤ₂](0=>1, 1=>1)):
-* Data for sector (Irrep[ℤ₂](0),) ← (Irrep[ℤ₂](0),):
- 1.0 + 0.0im
-* Data for sector (Irrep[ℤ₂](1),) ← (Irrep[ℤ₂](1),):
- -1.0 + 0.0im
-
-
-
-
-

Given these local operators, we can use them to construct the full manifestly -\(\mathbb{Z}_2\)-symmetric Hamiltonian.

-
-

Note

-

An important observation is that when explicitly imposing the \(\mathbb{Z}_2\) symmetry we -directly constructed the full \(ZZ\) operator as a single symmetric tensor. This in contrast -to the case without symmetries, where we constructed a single-site \(Z\) operator and then -combined them into a two-site operator. Clearly this can no longer be done when imposing -\(\mathbb{Z}_2\), since a single \(Z\) is not invariant under conjugation with the symmetry -operator \(X\). One might wonder whether it is still possible to construct a two-site -Hamiltonian term by combining local objects. This is possible if one introduces an auxiliary -index on the local tensors that carries a non-trivial charge. The intuition behind this will -become more clear in the next example.

-
-
-
-
-

18.3. Level 2: The \(\mathrm{U}(1)\) Bose-Hubbard Model#

-

For our next example we will consider the -Bose-Hubbard model, which -describes interacting bosons on a lattice. The Hamiltonian of this model is given by

-
-(18.3)#\[H = -t \sum_{\langle i,j \rangle} \left( a_{i}^+ a_{j}^- + a_{i}^- a_{j}^+ \right) - \mu \sum_i N_i + \frac{U}{2} \sum_i N_i(N_i - 1).\]
-

This Hamiltonian is defined on the Fock space associated to a chain of bosons, -where the action bosonic creation, annihilation and number operators \(a^+\), \(a^-\) and \(N = -a^+ a^-\) in the local occupation number basis is given by

-
-(18.4)#\[\begin{split}\begin{align} -a^+ \ket{n} &= \sqrt{n + 1} \ket{n + 1} \\ -a^- \ket{n} &= \sqrt{n} \ket{n - 1} \\ -N \ket{n} &= n \ket{n} -\end{align}\end{split}\]
-

Their bosonic nature can be summarized by the familiar the commutation relations

-
-\[\begin{split}\begin{align*} -\left[a_i^-, a_j^-\right] &= \left[a_i^+, a_j^+\right] = 0 \\ -\left[a_i^-, a_j^+\right] &= \delta_{ij} \\ -\left[N, a^+\right] &= a^+ \\ -\left[N, a^-\right] &= -a^- \\ -\end{align*}\end{split}\]
-

This Hamiltonian is invariant under conjugation by the global particle number operator, \(U H -U^\dagger = H\), where

-
-\[U = \sum_i N_i\]
-

This invariance corresponds to a \(\mathrm{U}(1)\) particle number symmetry, which can again -be manifestly imposed when constructing the Hamiltonian terms as TensorMaps. From the -representation theory of \(\mathrm{U}(1)\) we know that it’s irreps are all one-dimensional -and can be labeled by integers, where the fusion of two irreps is given by addition.

-
-

18.3.1. Directly Constructing the Hamiltonian Terms#

-

We recall from our discussion on the \(\mathbb{Z}_2\) symmetric Ising model that, in order to -construct the Hamiltonian terms as symmetric tensors, we should work in the irrep basis -where the symmetry transformation is block diagonal. In the current case, the symmetry -operation is the particle number operator, which is already diagonal in the occupation -number basis. Therefore, we don’t need an additional local basis transformation this time, -and can just observe that each local basis state can be identified with the \(\mathrm{U}(1)\) -irrep associated to the corresponding occupation number.

-

Following the same approach as before, we first write down the action of the Hamiltonian -terms in the irrep basis:

-
-\[\begin{split}\begin{align*} -a_i^+ a_j^- \ket{n_i, n_j} &= \sqrt{(n_i + 1)n_j} \ket{n_i + 1, n_j - 1} \\ -a_i^- a_j^+ \ket{n_i, n_j} &= \sqrt{n_i(n_j + 1)} \ket{n_i - 1, n_j + 1} \\ -N \ket{n} &= n \ket{n} -\end{align*}\end{split}\]
-

It is then a simple observation that these matrix elements are exactly captured by the -following \(\mathrm{U}(1)\) fusion trees with corresponding block values:

-
-../_images/U1_fusiontrees.svg -
-

This gives us all the information necessary to construct the corresponding TensorMaps. We -follow the same steps as outlined in the previous example, starting with the construction of -the physical space. This will now be a \(\mathrm{U}(1)\) graded vector space U1Space, where -each basis state \(\ket{n}\) in the occupation number basis is represented by the -corresponding \(\mathrm{U}(1)\) irrep U1Irrep(n) with degeneracy 1. While this physical -space is in principle infinite dimensional, we will impose a cutoff in occupation number at -a maximum of 5 bosons per site, giving a 6-dimensional vector space:

-
-
-
cutoff = 5
-V = U1Space(n => 1 for n in 0:cutoff)
-
-
-
-
-
Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)
-
-
-
-
-

We can now initialize the \(a^+ a^-\), \(a^- a^+\) and \(N\) operators as empty TensorMaps with -the correct domain and codomain vector spaces, and fill in the nonzero blocks associated to -the fusion trees shown above. To do this we need access to the integer -label of the \(\mathrm{U}(1)\) irreps in the fusion and splitting trees, which can be accessed -through the charge field of the U1Irrep type.

-
-
-
a⁺a⁻ = TensorMap(zeros, ComplexF64, V  V  V  V)
-for (s, f) in fusiontrees(a⁺a⁻)
-    if s.uncoupled[1] == only(f.uncoupled[1]  U1Irrep(1)) && s.uncoupled[2] == only(f.uncoupled[2]  U1Irrep(-1))
-        a⁺a⁻[s, f] .= sqrt(s.uncoupled[1].charge * f.uncoupled[2].charge)
-    end
-end
-a⁺a⁻
-
-
-
-
- - -Hide code cell output - -
-
TensorMap((Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)) ← (Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1))):
-* Data for sector (Irrep[U₁](0), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 1.4142135623730951 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 1.4142135623730951 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 1.7320508075688772 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 1.7320508075688772 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 2.449489742783178 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 2.449489742783178 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 3.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 2.23606797749979 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 2.23606797749979 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 2.8284271247461903 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 2.8284271247461903 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 3.4641016151377544 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 3.4641016151377544 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 3.1622776601683795 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 3.1622776601683795 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 3.872983346207417 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 3.872983346207417 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 4.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 4.47213595499958 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 4.47213595499958 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 5.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-
-
-
-
a⁻a⁺ = TensorMap(zeros, ComplexF64, V  V  V  V)
-for (s, f) in fusiontrees(a⁻a⁺)
-    if s.uncoupled[1] == only(f.uncoupled[1]  U1Irrep(-1)) && s.uncoupled[2] == only(f.uncoupled[2]  U1Irrep(1))
-        a⁻a⁺[s, f] .= sqrt(f.uncoupled[1].charge * s.uncoupled[2].charge)
-    end
-end
-a⁻a⁺
-
-
-
-
- - -Hide code cell output - -
-
TensorMap((Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)) ← (Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1))):
-* Data for sector (Irrep[U₁](0), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 1.4142135623730951 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 1.4142135623730951 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 1.7320508075688772 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 1.7320508075688772 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 2.449489742783178 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 2.449489742783178 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 2.23606797749979 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 2.8284271247461903 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 2.8284271247461903 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 3.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 2.23606797749979 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](1)):
-[:, :, 1, 1] =
- 3.1622776601683795 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 3.4641016151377544 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 3.1622776601683795 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 3.4641016151377544 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 4.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 3.872983346207417 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 3.872983346207417 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](2)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](3)):
-[:, :, 1, 1] =
- 4.47213595499958 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 4.47213595499958 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](4)):
-[:, :, 1, 1] =
- 5.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](5), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](5)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-
-
-
-
N = TensorMap(zeros, ComplexF64, V  V)
-for (s, f) in fusiontrees(N)
-    N[s, f] .= f.uncoupled[1].charge
-end
-N
-
-
-
-
- - -Hide code cell output - -
-
TensorMap(Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ← Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)):
-* Data for sector (Irrep[U₁](0),) ← (Irrep[U₁](0),):
- 0.0 + 0.0im
-* Data for sector (Irrep[U₁](1),) ← (Irrep[U₁](1),):
- 1.0 + 0.0im
-* Data for sector (Irrep[U₁](2),) ← (Irrep[U₁](2),):
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](3),) ← (Irrep[U₁](3),):
- 3.0 + 0.0im
-* Data for sector (Irrep[U₁](4),) ← (Irrep[U₁](4),):
- 4.0 + 0.0im
-* Data for sector (Irrep[U₁](5),) ← (Irrep[U₁](5),):
- 5.0 + 0.0im
-
-
-
-
-
-
-
-

18.3.2. Creation and Annihilation Operators as Symmetric Tensors#

-

Just as in the \(\mathbb{Z}_2\) case, it is obvious that we cannot directly construct the -creation and annihilation operators as instances of a TensorMap(..., V V) since they are -not invariant under conjugation by the symmetry operator. However, it is possible to -construct them as TensorMaps using an auxiliary vector space, based on the following -intuition. The creation operator \(a^+\) violates particle number conservation by mapping the -occupation number \(n\) to \(n + 1\). From the point of view of representation theory, this -process can be thought of as the fusion of an U1Irrep(n) with an U1Irrep(1), naturally -giving the fusion product U1Irrep(n + 1). This means we can represent \(a^+\) as a -TensorMap(..., V V A), where the auxiliary vector space A contains the \(+1\) irrep -with degeneracy 1, A = U1Space(1 => 1). Similarly, the decrease in occupation number when -acting with \(a^-\) can be thought of as the splitting of an U1Irrep(n) into an -U1Irrep(n - 1) and an U1Irrep(1), leading to a representation in terms of a -TensorMap(..., A V V). Based on these observations, we can represent the matrix -elements (18.4) as blocks labeled by the \(\mathrm{U}(1)\) fusion trees

-
-../_images/bosonops.svg -
-

We can then combine these operators to get the appropriate Hamiltonian terms,

-
-../_images/bosonham.svg -
-
-

Note

-

Although we have made a suggestive distinction between the ‘left’ and ‘right’ versions of -the operators \(a_L^\pm\) and \(a_R^\pm\), one can actually be obtained from the other by -permuting the physical and auxiliary indices of the corresponding TensorMaps. This -permutation has no effect on the actual array blocks of the tensors due to the -bosonic braiding style -of \(\mathrm{U}(1)\) irreps, so the left and right operators can in essence be seen as the -‘same’ tensors. This is no longer the case when considering fermionic systems, where -permuting indices can in fact change the array blocks as we will see next. As a consequence, -it is much less clear how to construct two-site symmetric operators in terms of local -symmetric objects.

-
-

The explicit construction then looks something like

-
-
-
A = U1Space(1 => 1)
-
-
-
-
-
Rep[U₁](1=>1)
-
-
-
-
-
-
-
a⁺ = TensorMap(zeros, ComplexF64, V  V  A)
-for (s, f) in fusiontrees(a⁺)
-    a⁺[s, f] .= sqrt(f.uncoupled[1].charge+1)
-end
-a⁺
-
-
-
-
- - -Hide code cell output - -
-
TensorMap(Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ← (Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](1=>1))):
-* Data for sector (Irrep[U₁](1),) ← (Irrep[U₁](0), Irrep[U₁](1)):
-[:, :, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[U₁](2),) ← (Irrep[U₁](1), Irrep[U₁](1)):
-[:, :, 1] =
- 1.4142135623730951 + 0.0im
-* Data for sector (Irrep[U₁](3),) ← (Irrep[U₁](2), Irrep[U₁](1)):
-[:, :, 1] =
- 1.7320508075688772 + 0.0im
-* Data for sector (Irrep[U₁](4),) ← (Irrep[U₁](3), Irrep[U₁](1)):
-[:, :, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](5),) ← (Irrep[U₁](4), Irrep[U₁](1)):
-[:, :, 1] =
- 2.23606797749979 + 0.0im
-
-
-
-
-
-
-
-
a⁻ = TensorMap(zeros, ComplexF64, A  V  V)
-for (s, f) in fusiontrees(a⁻)
-    a⁻[s, f] .= sqrt(f.uncoupled[1].charge)
-end
-a⁻
-
-
-
-
- - -Hide code cell output - -
-
TensorMap((Rep[U₁](1=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)) ← Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)):
-* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](1),):
-[:, :, 1] =
- 1.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](2),):
-[:, :, 1] =
- 1.4142135623730951 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](3),):
-[:, :, 1] =
- 1.7320508075688772 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](4),):
-[:, :, 1] =
- 2.0 + 0.0im
-* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](5),):
-[:, :, 1] =
- 2.23606797749979 + 0.0im
-
-
-
-
-
-

It is then simple to check that this is indeed what we expect.

-
-
-
@tensor a⁺a⁻_bis[-1 -2; -3 -4] := a⁺[-1; -3 1] * a⁻[1 -2; -4]
-@tensor a⁻a⁺_bis[-1 -2; -3 -4] := a⁻[1 -1; -3] * a⁺[-2; -4 1]
-@tensor N_bis[-1 ; -2] := a⁺[-1; 1 2] * a⁻[2 1; -2]
-
-@test a⁺a⁻_bis  a⁺a⁻ atol=1e-14
-@test a⁻a⁺_bis  a⁻a⁺ atol=1e-14
-@test N_bis  N atol=1e-14
-
-
-
-
-
Test Passed
-
-
-
-
-
-

Note

-

From the construction of the Hamiltonian operators -in terms of creation and annihilation operators we clearly see that they are -invariant under a transformation \(a^\pm \to e^{\pm i\theta} a^\pm\). More generally, any -invertible transformation on the auxiliary space leaves the resulting contraction unchanged. -This ambiguity in the definition clearly shows that one should really always think in terms -of the fully symmetric procucts of \(a^+\) and \(a^-\) rather than in terms of these operators -themselves. In particular, one can always decompose such a symmetric product into the -form above by means of an SVD.

-
-
-
-
-

18.4. Level 3: Fermions and the Kitaev Model#

-

While we have already covered quite a lot of ground towards understanding symmetric tensors -in terms of fusion trees and corresponding blocks, the symmetries considered so far have -been quite ‘simple’ in the sense that sectors corresponding to irreps of \(\mathbb{Z}_2\) and -\(\mathrm{U}(1)\) have -Abelian fusion rules -and -bosonic exchange statistics. -This means that the fusion of two irreps always gives a single irrep as the fusion product, -and that exchanging two irreps in a tensor product is trivial. In practice, this implies -that for tensors with these symmetries the fusion trees are completely fixed by the -uncoupled charges, which uniquely define both the inner lines and the coupled charge, and -that tensor indices can be permuted freely without any ‘strange’ side effects.

-

In the following we will consider examples with fermionic and even anyonic exchange -statistics, and non-Abelian fusion rules. In going through these examples it will become -clear that the fusion trees labeling the blocks of a symmetric tensor imply more information -than just a labeling.

-
-

18.4.1. Fermion Parity Symmetry#

-

As a simple example we will consider the Kitaev chain, which describes a chain of -interacting spinless fermions with nearest-neighbor hopping and pairing terms. The -Hamiltonian of this model is given by

-
-(18.5)#\[H = \sum_{\langle i,j \rangle} \left(-\frac{t}{2}(c_i^+ c_j^- - c_i^- c_j^+) + \frac{\Delta}{2}(c_i^+ c_j^+ - c_i^- c_j^-) \right) - \mu \sum_{i} N_i\]
-

where \(N_i = c_i^+ c_i^-\) is the local particle number operator. As opposed to the previous -case, the fermionic creation and annihilation operators now satisfy the anticommutation -relations

-
-\[\begin{split}\begin{align*} -\left\{c_i^-, c_j^-\right\} &= \left\{c_i^+, c_j^+\right\} = 0 \\ -\left\{c_i^-, c_j^+\right\} &= \delta_{ij} .\\ -\end{align*}\end{split}\]
-

These relations justify the choice of the relative minus sign in the hopping and pairing -terms. Indeed, since fermionic operators on different sites always anticommute, these -relative minus signs are needed to ensure that the Hamiltonian is Hermitian, since \(\left( -c_i^+ c_j^- \right)^\dagger = c_j^+ c_i^- = - c_i^- c_j^+\) and \(\left( c_i^+ c_j^+ -\right)^\dagger = c_j^- c_i^- = - c_i^- c_j^-\). The anticommutation relations also naturally -restrict the local occupation number to be 0 or 1, leading to a well-defined notion of -fermion-parity. The local fermion-parity operator is related to the fermion number -operator as \(Q_i = (-1)^{n_i}\), and is diagonal in the occupation number basis. The -Hamiltonian (18.5) is invariant under conjugation by the global fermion-parity -operator, \(Q H Q^\dagger = H\), where

-
-\[Q = \exp \left( i \pi \sum_i N_i \right) = (-1)^{\sum_i N_i}.\]
-

This fermion parity symmetry, which we will denote as \(f\mathbb{Z}_2\), is a -\(\mathbb{Z}_2\)-like symmetry in the sense that it has a trivial representation, which we -call even and again denote by ‘0’, and a sign representation which we call odd and -denote by ‘1’. The fusion rules of these irreps are the same as for \(\mathbb{Z}_2\). Similar -to the previous case, the local symmetry operator \(Q_i\) is already diagonal, so the -occupation number basis coincides with the irrep basis and we don’t need an additional basis -transform. The important difference with a regular \(\mathbb{Z}_2\) symmetry is that the -irreps of \(f\mathbb{Z}_2\) have fermionic braiding statistics, in the sense that exhanging -two odd irreps gives rise to a minus sign.

-

In TensorKit.jl, an \(f\mathbb{Z}_2\)-graded vector spaces is represented as a -Vect[FermionParity] space, where a given \(f\mathbb{Z}_2\) irrep can be represented as a -FermionParity -sector instance. Using the simplest instance of a vector space containing a single even and -odd irrep, we can already demonstrate the corresponding fermionic braiding behavior by -performing a permutation -on a simple TensorMap.

-
-
-
V = Vect[FermionParity](0 => 1, 1 => 1)
-t = TensorMap(ones, ComplexF64, V  V  V)
-
-
-
-
-
TensorMap(Vect[FermionParity](0=>1, 1=>1) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):
-* Data for sector (FermionParity(0),) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1] =
- 1.0 + 0.0im
-* Data for sector (FermionParity(0),) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1] =
- 1.0 + 0.0im
-* Data for sector (FermionParity(1),) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1] =
- 1.0 + 0.0im
-* Data for sector (FermionParity(1),) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1] =
- 1.0 + 0.0im
-
-
-
-
-
-
-
permute(t, ((1,), (3, 2)))
-
-
-
-
-
TensorMap(Vect[FermionParity](0=>1, 1=>1) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):
-* Data for sector (FermionParity(0),) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1] =
- 1.0 + 0.0im
-* Data for sector (FermionParity(0),) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1] =
- -1.0 + 0.0im
-* Data for sector (FermionParity(1),) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1] =
- 1.0 + 0.0im
-* Data for sector (FermionParity(1),) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1] =
- 1.0 + 0.0im
-
-
-
-
-

In other words, when exchanging the two domain vector spaces, the block of the TensorMap -for which both corresponding irreps are odd picks up a minus sign, exactly as we would -expect for fermionic charges.

-
-
-

18.4.2. Constructing the Hamiltonian#

-

We can directly construct the Hamiltonian terms as symmetric TensorMaps using the same -procedure as before starting from their matrix elements in the occupation number basis. -However, in this case we should be a bit more careful about the precise definition of the -basis states in composite systems. Indeed, the tensor product structure of fermionic systems -is inherently tricky to deal with, and should ideally be treated in the context of -super vector spaces. For two sites, we -can define the following basis states on top of the fermionic vacuuum \(\ket{00}\):

-
-\[\begin{split}\begin{align*} -\ket{01} &= c_2^+ \ket{00} \\ -\ket{10} &= c_1^+ \ket{00} \\ -\ket{11} &= c_1^+ c_2^+ \ket{00} \\ -\end{align*}\end{split}\]
-

This definition in combination with the anticommutation relations above give rise to the -nonzero matrix elements

-
-\[\begin{split}\begin{align*} -c_1^+ c_2^- \ket{0, 1} &= \ket{1, 0} \\ -c_1^- c_2^+ \ket{1, 0} &= - \ket{0, 1} \\ -c_1^+ c_2^+ \ket{0, 0} &= \ket{1, 1} \\ -c_1^- c_2^- \ket{1, 1} &= - \ket{0, 0} \\ -N \ket{n} &= n \ket{n}. -\end{align*}\end{split}\]
-

While the signs in these expressions may seem a little unintuitive at first sight, they are -essential to the fermionic nature of the system. Indeed, if we for example work out the -matrix element of \(c_1^- c_2^+\) we find

-
-\[\begin{split}\begin{align*} -c_1^- c_2^+ \ket{1, 0} = c_1^- c_2^+ c_1^+ \ket{0, 0} = - c_2^+ c_1^- c_1^+ \ket{0, 0} = - c_2^+ (\mathbb{1} - c_1^+ c_1^-) \ket{0, 0} = - c_2^+ \ket{0, 0} = - \ket{0, 1}. \\ -\end{align*}\end{split}\]
-

Once we have these matrix elements the hard part is done, and we can naively associate these -to the following \(f\mathbb{Z}_2\) fusion trees with corresponding block values,

-
-../_images/fZ2_fusiontrees.svg -
-

Given this information, we can go through the same procedure again to construct \(c^+ c^-\), -\(c^- c^+\) and \(N\) operators as TensorMaps over \(f\mathbb{Z}_2\)-graded vector spaces.

-
-
-
V = Vect[FermionParity](0 => 1, 1 => 1)
-
-
-
-
-
Vect[FermionParity](0=>1, 1=>1)
-
-
-
-
-
-
-
c⁺c⁻ = TensorMap(zeros, ComplexF64, V  V  V  V)
-odd = FermionParity(1)
-for (s, f) in fusiontrees(c⁺c⁻)
-    if s.uncoupled[1] == odd && f.uncoupled[2] == odd && f.coupled == odd
-        c⁺c⁻[s, f] .= 1
-    end
-end
-c⁺c⁻
-
-
-
-
-
TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-
-
-
c⁻c⁺ = TensorMap(zeros, ComplexF64, V  V  V  V)
-for (s, f) in fusiontrees(c⁻c⁺)
-    if f.uncoupled[1] == odd && s.uncoupled[2] == odd && f.coupled == odd
-        c⁻c⁺[s, f] .= -1
-    end
-end
-c⁻c⁺
-
-
-
-
-
TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-
-
-
c⁺c⁺ = TensorMap(zeros, ComplexF64, V  V  V  V)
-odd = FermionParity(1)
-for (s, f) in fusiontrees(c⁺c⁺)
-    if s.uncoupled[1] == odd && f.uncoupled[1] != odd && f.coupled != odd
-        c⁺c⁺[s, f] .= 1
-    end
-end
-c⁺c⁺
-
-
-
-
-
TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-
-
-
c⁻c⁻ = TensorMap(zeros, ComplexF64, V  V  V  V)
-for (s, f) in fusiontrees(c⁻c⁻)
-    if s.uncoupled[1] != odd && f.uncoupled[2] == odd && f.coupled != odd
-        c⁻c⁻[s, f] .= -1
-    end
-end
-c⁻c⁻
-
-
-
-
-
TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-
-
-
N = TensorMap(zeros, ComplexF64, V  V)
-for (s, f) in fusiontrees(N)
-    N[s, f] .= f.coupled == odd ? 1 : 0
-end
-N
-
-
-
-
-
TensorMap(Vect[FermionParity](0=>1, 1=>1) ← Vect[FermionParity](0=>1, 1=>1)):
-* Data for sector (FermionParity(0),) ← (FermionParity(0),):
- 0.0 + 0.0im
-* Data for sector (FermionParity(1),) ← (FermionParity(1),):
- 1.0 + 0.0im
-
-
-
-
-
-

Note

-

Working with fermionic systems is inherently tricky, as can already be seen from something -as simple as computing matrix elements of fermionic operators. Similarly, while constructing -symmetric tensors that correspond to the symmetric Hamiltonian terms was still quite -straightforward, it is far less clear in this case how to construct these terms as -contractions of local symmetric tensors representing individual creation and annihilation -operators in this case. While such a decomposition can always be in principle obtained using -a (now explicitly fermionic) SVD, manually constructing such tensors as we did in the -bosonic case is far from trivial. Trying this would be a good exercise in working with -fermionic symmetries, but it is not something we will do here.

-
-
-
-
-

18.5. Level 4: Non-Abelian Symmetries and the Quantum Heisenberg Model#

-

We will now move on to systems which have more complicated non-Abelian symmetries. For a -non-Abelian symmetry group \(G\), the fact that its elements do not all commute has a profound -impact on its representation theory. In particular, the irreps of such a group can be higher -dimensional, and the fusion of two irreps can give rise to multiple different irreps. On the -one hand this means that fusion trees of these irreps are no longer completely determined by -the uncoupled charges. Indeed, in this case some of the -internal structure of the FusionTree type we have ignored before will -become relevant (of which we will give an example below). On the other -hand, it follows that fusion trees of irreps now not only label blocks, but also encode a -certain nontrivial symmetry structure. We will make this statement more precise in the -following, but the fact that this is necessary is quite intuitive. If we recall our original -statement that symmetric tensors consist of blocks associated to fusion trees which carry -irrep labels, then for higher-dimensional irreps the corresponding fusion trees must encode -some additional information that implicitly takes into account the internal structure of the -representation spaces. In particular, this means that the conversion of an operator, given -its matrix elements in the irrep basis, to the blocks of the corresponding symmetric -TensorMap is less straightforward since it requires an understanding of exactly what this -implied internal structure is. Therefore, we require some more discussion before we can -actually move on to an example.

-

We’ll start by discussing the general structure of a TensorMap which is symmetric under a -non-Abelian group symmetry. We then given an example based on \(\mathrm{SU}(2)\), where we -construct the Heisenberg Hamiltonian using two different approaches. Finally, we show how -the more intuitive approach can be used to obtain an elegant generalization to the -\(\mathrm{SU}(N)\)-symmetric case.

-
-

18.5.1. Block Sparsity Revisited: The Wigner-Eckart Theorem#

-

Let us recall some basics of representation theory first. Consider a group \(G\) and a -corresponding representation space \(V\), such that every element \(g \in G\) can be realized as -a unitary operator \(U_g : V \to V\). Let \(h\) be a TensorMap whose domain and codomain are -given by the tensor product of two of these representation spaces. Recall that, by -definition, the statement that ‘\(h\) is symmetric under \(G\)’ means that

-
-../_images/symmetric_tensor.svg -
-

for every \(g \in G\). If we label the irreducible representations of \(G\) by \(l\), then any -representation space can be decomposed into a direct sum of irreducible representations, \(V -= \bigoplus_l V^{(l)}\), in such a way that \(U_g\) is block-diagonal where each block is -labeled by a particular irrep \(l\). For each irrep space \(V^{(l)}\) we can define an -orthonormal basis labeled as \(\ket{l, m}\), where the auxiliary label \(m\) can take -\(\text{dim}\left( V^{(l)} \right)\) different values. Since we know that tensors are -multilinear maps over tensor product spaces, it is natural to consider the tensor product of -representation spaces in more detail.

-

From the representation theory of groups, -it is known that the product of two irreps can in turn be decomposed into a direct sum of -irreps, \(V^{(l_1)} \otimes V^{(l_2)} \cong \bigoplus_{k} V^{(k)}\). The precise nature of -this decomposition, also refered to as the Clebsch-Gordan problem, is given by the -so-called Clebsch-Gordan coefficients, which we will denote as \(C^{k}_{l_1,l_2}\). This set -of coefficients, which can be interpreted as a \(\text{dim}\left( V^{(l_1)} \right) \times -\text{dim}\left( V^{(l_2)} \right) \times \text{dim}\left( V^{(l_3)} \right)\) array, that -encodes how a basis state \(\ket{k,n} \in V^{(k)}\) corresponding to some term in the direct -sum can be decomposed into a linear combination of basis vectors \(\ket{l_1,m_1} \otimes -\ket{l_2,m_2}\) of the tensor product space:

-
-\[\ket{k,n} = \sum_{m_1, m_2} \left( C^{l_3}_{l_1,l_2} \right)^{n}_{m_1, m_2} \ket{l_1,m_1} \otimes \ket{l_2,m_2}.\]
-

These recoupling coefficients turn out to be essential to the structure of symmetric -tensors, which can be best understood in the context of the -Wigner-Eckart theorem. This -theorem implies that for any -TensorMap \(h\) that is symmetric under \(G\), its matrix elements in the -tensor product irrep basis are given by the product of Clebsch-Gordan coefficients which -characterize the coupling of the basis states in the domain and codomain, and a so-called -reduced matrix element which only depends on the irrep labels. Concretely, the matrix -element \(\bra{l_1,m_1} \otimes \bra{l_2,m_2} h \ket{l_3,m_3} \otimes \ket{l_4,m_4}\) is given -by

-
-../_images/wignereckart.svg -
-

Here, the sum runs over all possible irreps \(k\) in the fusion product \(l_3 \otimes l_4\) and -over all basis states \(\ket{k,n}\) of \(V^{(k)}\). The reduced matrix elements \(h_{\text{red}}\) -are independent of the basis state labels and only depend on the irrep labels themselves. -Each reduced matrix element should be interpreted as being labeled by an irrep fusion tree,

-
-../_images/anotherfusiontree.svg -
-

The fusion tree itself in turn implies the Clebsch-Gordan coefficients \(C^{k}_{l_1,l_2}\) and -conjugate coefficients \({C^{\dagger}}_{k}^{l_1,l_2}\) encode the splitting (decomposition) of -the coupled basis state \(\ket{k,n}\) to the codomain basis states \(\ket{l_1,m_1} \otimes -\ket{l_2,m_2}\) and the coupling of the domain basis states \(\ket{l_3,m_3} \otimes -\ket{l_4,m_4}\) to the coupled basis state \(\ket{k,n}\) respectively.

-

The Wigner-Eckart theorem dictates that this structure in terms of Clebsch-Gordan -coefficients is necessary to ensure that the corresponding tensor is symmetric. It is -precisely this structure that is inherently encoded into the fusion tree part of a symmetric -TensorMap. In particular, the array block value associated to each fusion tree in a -symmetric tensor is precisely the reduced matrix element in the Clebsch-Gordan -decomposition.

-

As a small demonstration of this fact, we can make a simple \(\mathrm{SU}(2)\)-symmetric -tensor with trivial block values and verify that its implied symmetry structure exactly -corresponds to the expected Clebsch-Gordan coefficient. In TensorKit.jl, a -\(\mathrm{SU}(2)\)-graded vector space is represented as an -SU2Space, -where a given \(\mathrm{SU}(2)\) irrep can be represented as an -SU2Irrep -instance of integer or halfinteger spin as encoded in its j field. If we construct a -TensorMap whose symmetry structure corresponds to the coupling of two spin-\(\frac{1}{2}\) -irreps to a spin-\(1\) irrep, we can then convert it to a plain array and compare it to the -\(\mathrm{SU}(2)\) Clebsch-Gordan coefficients exported by the -WignerSymbols.jl package.

-
-
-
V1 = SU2Space(1 => 1)
-V2 = SU2Space(1//2 => 1)
-t = TensorMap(ones, ComplexF64, V1  V2  V2)
-
-
-
-
-
TensorMap(Rep[SU₂](1=>1) ← (Rep[SU₂](1/2=>1) ⊗ Rep[SU₂](1/2=>1))):
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1,), 1, (false,), ()) ← FusionTree{Irrep[SU₂]}((1/2, 1/2), 1, (false, false), ()):
-[:, :, 1] =
- 1.0 + 0.0im
-
-
-
-
-
-
-
ta = convert(Array, t)
-
-
-
-
-
3×2×2 Array{ComplexF64, 3}:
-[:, :, 1] =
- 1.0+0.0im       0.0+0.0im
- 0.0+0.0im  0.707107+0.0im
- 0.0+0.0im       0.0+0.0im
-
-[:, :, 2] =
-      0.0+0.0im  0.0+0.0im
- 0.707107+0.0im  0.0+0.0im
-      0.0+0.0im  1.0+0.0im
-
-
-
-
-

The conversion gives us a \(3 \times 3 \times 2\) array, which exactly corresponds to the size -of the \(C_{1}^{\frac{1}{2},\frac{1}{2}}\) Clebsch-Gordan array. In order to explicitly -compare whether the entries match we need to know the ordering of basis states assumed by -TensorKit.jl when converting the tensor to its matrix elements in the irrep basis. For -\(\mathrm{SU}(2)\) the irrep basis is ordered in ascending magnetic quantum number \(m\), which -gives us a map \(m = i - (l+1)\) for mapping an array index to a corresponding magnetic -quantum number for the spin-\(l\) irrep.

-
-
-
for i1 in 1:dim(V1), i2 in 1:dim(V2), i3 in 1:dim(V2)
-    # map basis state index to magnetic quantum number
-    m1 = i1 - (1 + 1)
-    m2 = i2 - (1//2 + 1)
-    m3 = i3 - (1//2 + 1)
-    @test ta[i1, i2, i3]  clebschgordan(1//2, m2, 1//2, m3, 1, m1)
-end
-
-
-
-
-

Based on this discussion, we can quantify the aforementioned ‘difficulties’ in the inverse -operation of what we just demonstrated, namely converting a given operator to a symmetric -TensorMap given only its matrix elements in the irrep basis. Indeed, it is now clear that -this precisely requires isolating the reduced matrix elements introduced above. Given the -matrix elements of the operator in the irrep basis, this can in general be done by solving -the system of equations implied by the Clebsch-Gordan decomposition. A -simpler way to achieve the same thing is to make use of the fact that the -Clebsch-Gordan tensors form a complete orthonormal basis -on the coupled space. Indeed, by projecting out the appropriate Clebsch-Gordan coefficients -and using their orthogonality relations, we can construct a diagonal operator on each -coupled irrep space \(V^{(k)}\). Each of these diagonal operators is proportional to the -identity, where the proportionality factor is precisely the reduced matrix element -associated to the corresponding irrep fusion tree.

-
-../_images/none2symm.svg -
-

This procedure works for any group symmetry, and all we need are matrix elements of the -operator in the irrep basis and the Clebsch-Gordan coefficients. In the following we -demonstrate this explicit procedure for the particular example of \(G = \mathrm{SU}(2)\). -However, it should be noted that for general groups the Clebsch-Gordan coefficients may not -be as easy to compute (in general, no closed formulas exist). In addition, the procedure for -manually projecting out the reduced matrix elements requires being particularly careful -about the correspondence between the basis states used to define the original matrix -elements and those implied by the Clebsch-Gordan coefficients. Therefore, it is often easier -to directly construct the symmetric tensor based on some representation theory, as we will -see below.

-
-
-

18.5.2. The ‘Generic’ Approach to the Spin-1 Heisenberg Model: Wigner-Eckart in Action#

-

Consider the spin-1 Heisenberg model with Hamiltonian

-
-\[H = J \sum_{\langle i,j \rangle} \vec{S}_i \cdot \vec{S}_j\]
-

where \(\vec{S} = (S^x, S^y, S^z)\) are the spin operators. The physical Hilbert space at each -site is the three-dimensional spin-1 irrep of \(\mathrm{SU}(2)\). Each two-site exchange -operator \(\vec{S}_i \cdot \vec{S}_j\) in the sum commutes with a global transformation \(g \in -\mathrm{SU}(2)\), so that it satisfies the above symmetry condition. -Therefore, we can represent it as an \(\mathrm{SU}(2)\)-symmetric TensorMap, as long as we -can isolate its reduced matrix elements.

-

In order to apply the above procedure, we first require the matrix elements in the irrep -basis. These can be constructed as a \(3 \times 3 \times 3 \times 3\) array SS using the -familiar representation of the \(\mathrm{SU}(2)\) generators in the spin-1 representation, -with respect to the \(\{\ket{1,-1}, \ket{1,0}, \ket{1,1}\}\) basis.

-
-
-
Sx = 1 / sqrt(2) * ComplexF64[0 1 0; 1 0 1; 0 1 0]
-Sy = 1 / sqrt(2) * ComplexF64[0 1im 0; -1im 0 1im; 0 -1im 0]
-Sz = ComplexF64[-1 0 0; 0 0 0; 0 0 1]
-
-@tensor SS_arr[-1 -2; -3 -4] := Sx[-1; -3] * Sx[-2; -4] + Sy[-1; -3] * Sy[-2; -4] + Sz[-1; -3] * Sz[-2; -4]
-
-
-
-
- - -Hide code cell output - -
-
3×3×3×3 Array{ComplexF64, 4}:
-[:, :, 1, 1] =
- 1.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
-
-[:, :, 2, 1] =
- 0.0+0.0im  1.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
-
-[:, :, 3, 1] =
-  0.0+0.0im  0.0+0.0im  0.0+0.0im
-  0.0+0.0im  1.0+0.0im  0.0+0.0im
- -1.0+0.0im  0.0+0.0im  0.0+0.0im
-
-[:, :, 1, 2] =
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 1.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
-
-[:, :, 2, 2] =
- 0.0+0.0im  0.0+0.0im  1.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 1.0+0.0im  0.0+0.0im  0.0+0.0im
-
-[:, :, 3, 2] =
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  1.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
-
-[:, :, 1, 3] =
- 0.0+0.0im  0.0+0.0im  -1.0+0.0im
- 0.0+0.0im  1.0+0.0im   0.0+0.0im
- 0.0+0.0im  0.0+0.0im   0.0+0.0im
-
-[:, :, 2, 3] =
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  1.0+0.0im  0.0+0.0im
-
-[:, :, 3, 3] =
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  0.0+0.0im
- 0.0+0.0im  0.0+0.0im  1.0+0.0im
-
-
-
-
-
-

The next step is to project out the reduced matrix elements by taking the overlap with the -appropriate Clebsch-Gordan coefficients, according to -the Clebsch-Gordan decomposition given above. In our current case of a spin-1 -physical space we have \(l_1 = l_2 = l_3 = l_4 = 1\), and the coupled irrep \(k\) can therefore -take the values \(0, 1, 2\). The reduced matrix element for a given \(k\) can then be -implemented in the following way:

-
-
-
function get_reduced_element(k)
-    # construct Clebsch-Gordan coefficients for coupling 1 ⊗ 1 to k   
-    CG = zeros(ComplexF64, 3, 3, 2*k + 1)
-    for m1 in -k:k, m2 in -1:1, m3 in -1:1
-        CG[m2 + 2, m3 + 2, m1 + k + 1] = clebschgordan(1, m2, 1, m3, k, m1)
-    end
-
-    # project out diagonal matrix on coupled irrep space
-    @tensor reduced_matrix[-1; -2] := CG[1 2; -1] * SS_arr[1 2; 3 4] * conj(CG[3 4; -2])
-
-    # check that it is proportianal to the identity
-    @assert isapprox(reduced_matrix, reduced_matrix[1, 1] * I; atol=1e-12)
-
-    # return the proportionality factor
-    return reduced_matrix[1, 1]
-end
-
-
-
-
- - -Hide code cell output - -
-
get_reduced_element (generic function with 1 method)
-
-
-
-
-
-

If we use this to compute the reduced matrix elements for \(k = 0, 1, 2\),

-
-
-
get_reduced_element(0)
-
-
-
-
-
-1.9999999999999993 + 0.0im
-
-
-
-
-
-
-
get_reduced_element(1)
-
-
-
-
-
-1.0 + 0.0im
-
-
-
-
-
-
-
get_reduced_element(2)
-
-
-
-
-
1.0 + 0.0im
-
-
-
-
-

we can read off the entries

-
-\[\begin{split}\renewcommand\thickspace{\kern .01ex} -\left[ (\vec{S}_i \cdot \vec{S}_j)_\text{red} \right] \,\,\!\! -\begin{smallmatrix} - 1,1\\ - 0\\ - 1,1 -\end{smallmatrix} = -2, \quad -\left[ (\vec{S}_i \cdot \vec{S}_j)_\text{red} \right] \,\,\!\! -\begin{smallmatrix} - 1,1\\ - 1\\ - 1,1 -\end{smallmatrix} = -1, \quad -\left[ (\vec{S}_i \cdot \vec{S}_j)_\text{red} \right] \,\,\!\! -\begin{smallmatrix} - 1,1\\ - 2\\ - 1,1 -\end{smallmatrix} = 1, \quad\end{split}\]
-

These can then be used to construct the symmetric TensorMap representing the exchange -interaction:

-
-
-
V = SU2Space(1 => 1)
-SS = TensorMap(zeros, ComplexF64, V  V  V  V)
-for (s, f) in fusiontrees(SS)
-    k = Int(f.coupled.j)
-    SS[s, f] .= get_reduced_element(k)
-end
-SS
-
-
-
-
-
TensorMap((Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1)) ← (Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1))):
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()):
-[:, :, 1, 1] =
- -1.9999999999999993 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-
-
-
-
-
-
-

18.5.3. An ‘Elegant’ Approach to the Heisenberg Model#

-

As noted above, the explicit procedure of projecting out the reduced matrix elements from -the action of an operator in the irrep basis can be a bit cumbersome for more complicated -groups. However, using some basic representation theory we can bypass this step altogether -for the Heisenberg model. First, we rewrite the exchange interaction in the following way:

-
-(18.6)#\[\vec{S}_i \cdot \vec{S}_j = \frac{1}{2} \left( \left( \vec{S}_i + \vec{S}_j \right)^2 - \vec{S}_i^2 - \vec{S}_j^2 \right)\]
-

Here, \(\vec{S}_i\) and \(\vec{S}_j\) are spin operators on the physcial irrep, while total spin -operator \(\vec{S}_i + \vec{S}_j\) can be decomposed onto the different coupled irreps \(k\). It -is a well known fact that the quadratic sum of the generators of \(\mathrm{SU}(2)\), often -refered to as the -quadratic Casimir, -commutes with all generators. By -Schur’s lemma, it must then act -proportionally to the identity on every irrep, where the corresponding eigenvalue is -determined by the spin irrep label. In particular, we have for each irrep \(l\)

-
-\[\vec{S}^2 \ket{l,m} = l(l+1) \ket{l,m}.\]
-

It then follows from Eq. (18.6) that the reduced matrix elements of the -exchange interaction are completely determined by the eigenvalue of the quadratic Casimir on -the uncoupled and coupled irreps. Indeed, to each fusion tree we can associate a -well-defined value

-
-../_images/SU2_fusiontrees.svg -
-

This gives us all we need to directly construct the exchange interaction as a symmetric -TensorMap,

-
-
-
V = SU2Space(1 => 1)
-SS = TensorMap(zeros, ComplexF64, V  V  V  V)
-for (s, f) in fusiontrees(SS)
-    l3 = f.uncoupled[1].j
-    l4 = f.uncoupled[2].j
-    k = f.coupled.j
-    SS[s, f] .= (k * (k + 1) - l3 * (l3 + 1) - l4 * (l4 + 1)) / 2
-end
-SS
-
-
-
-
-
TensorMap((Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1)) ← (Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1))):
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()):
-[:, :, 1, 1] =
- -2.0 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-
-
-
-
-

which gives exactly the same result as the previous approach.

-
-

Note

-

This last construction for the exchange interaction immediatly generalizes to any value of -the physical spin. All we need is to fill in the appropriate values for the uncoupled irreps -\(l_1\), \(l_2\), \(l_3\) and \(l_4\).

-
-
-
-

18.5.4. \(\mathrm{SU}(N)\) generalization#

-

We end this subsection with some comments on the generalization of the above discussion to -\(\mathrm{SU}(N)\). As foreshadowed above, the irreps of \(\mathrm{SU}(N)\) in general have an -even more complicated structure. In particular, they can admit so-called fusion -multiplicities, where the fusion of two irreps can have not only multiple distinct -outcomes, but they can even fuse to a given irrep in multiple inequivalent ways. We can -demonstrate this behavior for the adjoint representation of \(\mathrm{SU}(3)\). For this we -can use the the -SUNRepresentations.jl -package which provides an interface for working with irreps of \(\mathrm{SU}(N)\) and their -Clebsch-Gordan coefficients. A particular representation is represented by an SUNIrrep{N} -which can be used with TensorKit.jl. The eight-dimensional adjoint representation of -\(\mathrm{SU}(3)\) is given by

-
-
-
l = SU3Irrep("8")
-
-
-
-
-
Irrep[SU₃]("8")
-
-
-
-
-

If we look at the possible outcomes of fusing two adjoint irreps, we find the by now -familiar non-Abelian fusion behavior,

-
-
-
collect(l  l)
-
-
-
-
-
5-element Vector{SU3Irrep}:
- "1"
- "27"
- "10"
- "8"
- "10⁺"
-
-
-
-
-

However, this particular fusion has multiplicities, since the adjoint irrep can actually -fuse to itself in two distinct ways. The full decomposition of this fusion product is given -by

-
-\[\mathbf{8} \otimes \mathbf{8} = \mathbf{1} \oplus \mathbf{3} \oplus 2 \cdot \mathbf{8} \oplus \mathbf{10} \oplus \mathbf{\overline{10}} \oplus \mathbf{27}\]
-

This fusion multiplicity can be detected by using -Nsymbol -method from TensorKit.jl to inspect the number of times l appears in the fusion product -l l,

-
-
-
Nsymbol(l, l, l)
-
-
-
-
-
2
-
-
-
-
-

When working with irreps with fusion multiplicities, each FusionTree carries additional -vertices labels which label which of the distinct fusion vertices is being referred to. We -will return to this at the end of this section.

-

Given the generators \(T^k\) of \(\mathrm{SU}(N)\), we can define a generalized Heisenberg model -using a similar exchange interaction, giving the Hamiltonian

-
-\[H = J \sum_{\langle i,j \rangle} \vec{T}_i \cdot \vec{T}_j\]
-

For a particular choice of physical irrep, the exchange interaction can again be constructed -as a symmetric TensorMap by first rewriting it as

-
-\[\vec{T}_i \cdot \vec{T}_j = \frac{1}{2} \left( \left( \vec{T}_i + \vec{T}_j \right)^2 - \vec{T}_i^2 - \vec{T}_j^2 \right).\]
-

For any \(N\), the quadratic Casimir

-
-\[C_1 = \sum_k T^k T^k\]
-

commutes with all \(\mathrm{SU}(N)\) generators, meaning it has a well defined eigenvalue in -each irrep. This observation then immediately given the reduced matrix elements of the -exchange interaction as

-
-../_images/SUN_fusiontrees.svg -
-

Using these to directly construct the corresponding symmetric TensorMap is much simpler -than going through the explicit projection procedure using Clebsch-Gordan coefficients.

-

For the particular example of \(\mathrm{SU}(3)\), the generators are given by \(T^k = -\frac{1}{2} \lambda^k\) , where \(\lambda^k\) are the -Gell-Mann matrices. -Each irrep can be labeled as \(l = D(p,q)\) where \(p\) and \(q\) are refered to as the Dynkin -labels. The eigenvalue of the quadratic Casimir for a given irrep is given by -Freudenthal’s formula,

-
-\[C_1(D(p,q)) = \frac{1}{3} (p^2 + q^2 + 3p + 3q + pq).\]
-

Using SUNRepresentations.jl, we can compute the Casimir as

-
-
-
function casimir(l::SU3Irrep)
-    p, q = dynkin_label(l)
-    return (p^2 + q^2 + 3 * p + 3 * q + p * q) / 3
-end
-
-
-
-
- - -Hide code cell output - -
-
casimir (generic function with 1 method)
-
-
-
-
-
-

If we use the adjoint representation of \(\mathrm{SU}(3)\) as physical space, the Heisenberg -exchange interaction can then be constructed as

-
-
-
V = Vect[SUNIrrep{3}](SU3Irrep("8") => 1)
-TT = TensorMap(zeros, ComplexF64, V  V  V  V)
-for (s, f) in fusiontrees(TT)
-    l3 = f.uncoupled[1]
-    l4 = f.uncoupled[2]
-    k = f.coupled
-    TT[s, f] .= (casimir(k) - casimir(l3) - casimir(l4)) / 2
-end
-TT
-
-
-
-
-
TensorMap((Rep[SU₃]("8"=>1) ⊗ Rep[SU₃]("8"=>1)) ← (Rep[SU₃]("8"=>1) ⊗ Rep[SU₃]("8"=>1))):
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "1", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "1", (false, false),(), (1,)):
-[:, :, 1, 1] =
- -3.0 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (2,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (2,)):
-[:, :, 1, 1] =
- -1.5 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (2,)):
-[:, :, 1, 1] =
- -1.5 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (2,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (1,)):
-[:, :, 1, 1] =
- -1.5 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (1,)):
-[:, :, 1, 1] =
- -1.5 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "10⁺", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "10⁺", (false, false),(), (1,)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "10", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "10", (false, false),(), (1,)):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-* Data for fusiontree FusionTree{Irrep[SU₃]}(("8", "8"), "27", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}(("8", "8"), "27", (false, false),(), (1,)):
-[:, :, 1, 1] =
- 1.0 + 0.0im
-
-
-
-
-

Circling back to our earlier remark, we clearly see that the fusion trees of this tensor -indeed have non-trivial vertex labels.

-
-
-
f = collect(fusiontrees(TT))[3][2]
-
-
-
-
-
FusionTree{Irrep[SU₃]}(("8", "8"), "8", (false, false),(), (2,))
-
-
-
-
-
-
-
f.vertices
-
-
-
-
-
(2,)
-
-
-
-
-
-

Note

-

While we have given an explicit example using \(\mathrm{SU}(3)\) with the adoint irrep on the -physical level, the same construction holds for the general \(\mathrm{SU}(N)\) with arbitrary -physical irreps. All we require is the expression for the eigenvalues of the quadratic -Casimir in each irrep.

-
-
-
-
-

18.6. Level 5: Anyonic Symmetries and the Golden Chain#

-

While we have focussed exclusively on group-like symmetries in our discussion so far, the -framework of symmetric tensors actually extends beyond groups to so-called -categorical symmetries. -These are quite exotic symmetries characterized in terms of -the topological data of a unitary fusion category. -While the precise details of all the terms in these statements fall beyond the scope of this -tutorial, we can give a simple example of a Hamiltonian model with a categorical symmetry -called the golden chain.

-

This is a one-dimensional system defined as a spin chain, where each physical ‘spin’ -corresponds to a so-called Fibonacci anyon. There are two -such Fibonacci anyons, which we will denote as \(1\) and \(\tau\). They obey the fusion rules

-
-\[1 \otimes 1 = 1, \quad 1 \otimes \tau = \tau, \quad \tau \otimes \tau = 1 \oplus \tau.\]
-

The Hilbert space of a chain of Fibonacci anyons is not a regular tensor product space, but -rather a constrained Hilbert space where the only allowed basis states are labeled by -valid Fibonacci fusion configurations. In the golden chain model, we define a -nearest-neighbor Hamiltonian on this Hilbert space by imposing an energy penalty when two -neighboring anyons fuse to a \(\tau\) anyon.

-

Even just writing down an explicit expression for this interaction on such a constrained -Hilbert space is not entirely straightforward. However, using the framework of symmetric -tensors it can actually be explicitly constructed in a very straightforward way. Indeed, -TensorKit.jl supports a dedicated -FibonacciAnyon -sector type which can be used to construct precisely such a constrained Fibonacci-graded -vector space. A Hamiltonian

-
-\[H = \sum_{\langle i,j \rangle} h_{ij}\]
-

which favors neighboring anyons fusing to the vacuum can be constructed as a TensorMap on -the product space of two Fibonacci-graded physical spaces

-
-
-
V = Vect[FibonacciAnyon]( => 1)
-
-
-
-
- - -Hide code cell output - -
-
Vect[FibonacciAnyon](:τ=>1)
-
-
-
-
-
-

and assigning the following nonzero block value to the two-site fusion trees

-
-../_images/Fib_fusiontrees.svg -
-

This allows us to define this, at first sight, exotic and complicated Hamiltonian in a few -simple lines of code,

-
-
-
h = TensorMap(ones, V  V  V  V)
-for (s, f) in fusiontrees(h)
-    h[s, f] .= f.coupled == FibonacciAnyon(:I) ? -1 : 0
-end
-h
-
-
-
-
-
TensorMap((Vect[FibonacciAnyon](:τ=>1) ⊗ Vect[FibonacciAnyon](:τ=>1)) ← (Vect[FibonacciAnyon](:τ=>1) ⊗ Vect[FibonacciAnyon](:τ=>1))):
-* Data for fusiontree FusionTree{FibonacciAnyon}((:τ, :τ), :I, (false, false), ()) ← FusionTree{FibonacciAnyon}((:τ, :τ), :I, (false, false), ()):
-[:, :, 1, 1] =
- -1.0 + 0.0im
-* Data for fusiontree FusionTree{FibonacciAnyon}((:τ, :τ), :τ, (false, false), ()) ← FusionTree{FibonacciAnyon}((:τ, :τ), :τ, (false, false), ()):
-[:, :, 1, 1] =
- 0.0 + 0.0im
-
-
-
-
-
-

Note

-

In the previous section we have stressed the role of Clebsch-Gordan coefficients in the -structure of symmetric tensors, and how they can be used to map between the representation -of an operator in the irrep basis and its symmetric tensor representation. However, for -categorical symmetries such as the Fibonacci anyons, there are no Clebsch-Gordan -coefficients. Therefore, the ‘matrix elements of the operator in the irrep basis’ are not -well-defined, meaning that a Fibonacci-symmetric tensor cannot actually be converted to a -plain array in a meaningful way.

-
-
-
-

18.7. To Be Added#

-
    -
  • Add section on product symmetries and how to work with them.

    -
      -
    • Discuss the Hubbard model with \(f\mathbb{Z}_2 \boxtimes \mathrm{U}(1) \boxtimes \mathrm{SU}(2)\) as an example.

    • -
    -
  • -
  • Add a section on classical \(O(N)\) models to illustrate the (‘Fourier’) transformation from the group element to the irrep basis for continuous symmetries.

  • -
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/References.html b/pr-preview/pr-27/References.html deleted file mode 100644 index 54d18944..00000000 --- a/pr-preview/pr-27/References.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - - - - - - - - - 20. References — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

References

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

20. References#

-
-
-
BC17
-

Jacob C Bridgeman and Christopher T Chubb. Hand-waving and interpretive dance: an introductory course on tensor networks. Journal of Physics A: Mathematical and Theoretical, 50(22):223001, 2017. arXiv:1603.03039, doi:10.1088/1751-8121/aa6dc3.

-
-
CC05
-

Pasquale Calabrese and John Cardy. Evolution of entanglement entropy in one-dimensional systems. Journal of Statistical Mechanics: Theory and Experiment, 2005(04):P04010, 2005. arXiv:cond-mat/0503393, doi:10.1088/1742-5468/2005/04/p04010.

-
-
DHMV23
-

Maarten Van Damme, Jutho Haegeman, Ian McCulloch, and Laurens Vanderstraeten. Efficient higher-order matrix product operators for time evolution. 2023. arXiv:2302.14181.

-
-
EY36
-

Carl Eckart and Gale Young. The approximation of one matrix by another of lower rank. Psychometrika, 1(3):211–218, Sep 1936. doi:10.1007/BF02288367.

-
-
FTL+07
-

Adrian Feiguin, Simon Trebst, Andreas WW Ludwig, Matthias Troyer, Alexei Kitaev, Zhenghan Wang, and Michael H Freedman. Interacting anyons in topological quantum liquids: the golden chain. Physical Review Letters, 98(16):160409, 2007. arXiv:cond-mat/0612341, doi:10.1103/PhysRevLett.98.160409.

-
-
HCO+11
-

Jutho Haegeman, J Ignacio Cirac, Tobias J Osborne, Iztok Pižorn, Henri Verschelde, and Frank Verstraete. Time-dependent variational principle for quantum lattices. Physical Review Letters, 107(7):070601, 2011. arXiv:1103.0936, doi:10.1103/PhysRevLett.107.070601.

-
-
HLO+16
-

Jutho Haegeman, Christian Lubich, Ivan Oseledets, Bart Vandereycken, and Frank Verstraete. Unifying time evolution and optimization with matrix product states. Physical Review B, 94:165116, 2016. arXiv:1408.5056, doi:10.1103/PhysRevB.94.165116.

-
-
HS05
-

Naomichi Hatano and Masuo Suzuki. Finding Exponential Product Formulas of Higher Orders. In Quantum Annealing and Other Optimization Methods, volume 679, pages 37–68. 2005. arXiv:math-ph/0506007, doi:10.1007/11526216_2.

-
-
HMSchollwock17
-

C. Hubig, I. P. McCulloch, and U. Schollwöck. Generic construction of efficient matrix product operators. Phys. Rev. B, 95:035129, Jan 2017. URL: https://link.aps.org/doi/10.1103/PhysRevB.95.035129, doi:10.1103/PhysRevB.95.035129.

-
-
JWX08
-

H. C. Jiang, Z. Y. Weng, and T. Xiang. Accurate determination of tensor network state of quantum lattice models in two dimensions. Physical Review Letters, 101(9):090603, 2008. arXiv:0806.3719, doi:10.1103/PhysRevLett.101.090603.

-
-
JOrusV+08
-

J. Jordan, R. Orús, G. Vidal, F. Verstraete, and J. I. Cirac. Classical Simulation of Infinite-Size Quantum Lattice Systems in Two Spatial Dimensions. Physical Review Letters, 101(25):250602, 2008. arXiv:cond-mat/0703788, doi:10.1103/PhysRevLett.101.250602.

-
-
Lan37
-

L. D. Landau. On the theory of phase transitions. Journal of Experimental and Theoretical Physics, 7:19–32, 1937. doi:10.1016/B978-0-08-010586-4.50034-1.

-
-
LOV15
-

Christian Lubich, Ivan V. Oseledets, and Bart Vandereycken. Time integration of tensor trains. SIAM Journal on Numerical Analysis, 53(2):917–941, 2015. arXiv:1407.2042, doi:10.1137/140976546.

-
-
Ons44
-

Lars Onsager. Crystal statistics. i. a two-dimensional model with an order-disorder transition. Physical Review, 65:117–149, 1944. doi:10.1103/PhysRev.65.117.

-
-
PHV14
-

Robert N. C. Pfeifer, Jutho Haegeman, and Frank Verstraete. Faster identification of optimal contraction sequences for tensor networks. Physical Review E, 90:033315, 2014. arXiv:1304.6112, doi:10.1103/PhysRevE.90.033315.

-
-
RCC18
-

Marek M. Rams, Piotr Czarnik, and Lukasz Cincio. Precise extrapolation of the correlation function asymptotics in uniform tensor network states with application to the Bose-Hubbard and XXZ models. Physical Review X, 8(4):041033, 2018. arXiv:1801.08554, doi:10.1103/PhysRevX.8.041033.

-
-
VHV19
-

Laurens Vanderstraeten, Jutho Haegeman, and Frank Verstraete. Tangent-space methods for uniform matrix product states. SciPost Physics Lecture Notes, pages 007, 2019. arXiv:1810.07006, doi:10.21468/SciPostPhysLectNotes.7.

-
-
VGarciaRC04
-

F. Verstraete, J. J. Garc\'ıa-Ripoll, and J. I. Cirac. Matrix product density operators: simulation of finite-temperature and dissipative systems. Physical Review Letters, 93:207204, 2004. arXiv:cond-mat/0406426, doi:10.1103/PhysRevLett.93.207204.

-
-
ZaunerStauberVF+18
-

V. Zauner-Stauber, L. Vanderstraeten, M. T. Fishman, F. Verstraete, and J. Haegeman. Variational optimization algorithms for uniform matrix product states. Physical Review B, 97(4):045145, 2018. arXiv:1701.07035, doi:10.1103/PhysRevB.97.045145.

-
-
-
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/_images/AncillaMPS.svg b/pr-preview/pr-27/_images/AncillaMPS.svg deleted file mode 100644 index c013f239..00000000 --- a/pr-preview/pr-27/_images/AncillaMPS.svg +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/DensityMatrix.svg b/pr-preview/pr-27/_images/DensityMatrix.svg deleted file mode 100644 index c73a9dff..00000000 --- a/pr-preview/pr-27/_images/DensityMatrix.svg +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/Fib_fusiontrees.svg b/pr-preview/pr-27/_images/Fib_fusiontrees.svg deleted file mode 100644 index 222240a5..00000000 --- a/pr-preview/pr-27/_images/Fib_fusiontrees.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/FirstOrderTrick.svg b/pr-preview/pr-27/_images/FirstOrderTrick.svg deleted file mode 100644 index ce5a029a..00000000 --- a/pr-preview/pr-27/_images/FirstOrderTrick.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/pr-preview/pr-27/_images/H_AC.svg b/pr-preview/pr-27/_images/H_AC.svg deleted file mode 100644 index 9181d0b6..00000000 --- a/pr-preview/pr-27/_images/H_AC.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/H_C.svg b/pr-preview/pr-27/_images/H_C.svg deleted file mode 100644 index 26ddaaf2..00000000 --- a/pr-preview/pr-27/_images/H_C.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/Heffs.svg b/pr-preview/pr-27/_images/Heffs.svg deleted file mode 100644 index e8e2ce48..00000000 --- a/pr-preview/pr-27/_images/Heffs.svg +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/ImagTimeEvolution.svg b/pr-preview/pr-27/_images/ImagTimeEvolution.svg deleted file mode 100644 index 207c2ffc..00000000 --- a/pr-preview/pr-27/_images/ImagTimeEvolution.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/MPOHam.svg b/pr-preview/pr-27/_images/MPOHam.svg deleted file mode 100644 index 881042d5..00000000 --- a/pr-preview/pr-27/_images/MPOHam.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/Mconstraint.svg b/pr-preview/pr-27/_images/Mconstraint.svg deleted file mode 100644 index 09f0661e..00000000 --- a/pr-preview/pr-27/_images/Mconstraint.svg +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/R-tensor.svg b/pr-preview/pr-27/_images/R-tensor.svg deleted file mode 100644 index e9167e2f..00000000 --- a/pr-preview/pr-27/_images/R-tensor.svg +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/SU2_fusiontrees.svg b/pr-preview/pr-27/_images/SU2_fusiontrees.svg deleted file mode 100644 index 098c5745..00000000 --- a/pr-preview/pr-27/_images/SU2_fusiontrees.svg +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/SUN_fusiontrees.svg b/pr-preview/pr-27/_images/SUN_fusiontrees.svg deleted file mode 100644 index 68831c26..00000000 --- a/pr-preview/pr-27/_images/SUN_fusiontrees.svg +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/TDVPProjector.svg b/pr-preview/pr-27/_images/TDVPProjector.svg deleted file mode 100644 index a1af1a4c..00000000 --- a/pr-preview/pr-27/_images/TDVPProjector.svg +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/TimeEvolution.svg b/pr-preview/pr-27/_images/TimeEvolution.svg deleted file mode 100644 index f5805700..00000000 --- a/pr-preview/pr-27/_images/TimeEvolution.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/TimeMPO_1stOrder.svg b/pr-preview/pr-27/_images/TimeMPO_1stOrder.svg deleted file mode 100644 index a792d4f9..00000000 --- a/pr-preview/pr-27/_images/TimeMPO_1stOrder.svg +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/U1_fusiontrees.svg b/pr-preview/pr-27/_images/U1_fusiontrees.svg deleted file mode 100644 index 565d1f14..00000000 --- a/pr-preview/pr-27/_images/U1_fusiontrees.svg +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/Z2_fusiontrees.svg b/pr-preview/pr-27/_images/Z2_fusiontrees.svg deleted file mode 100644 index 3ed78f66..00000000 --- a/pr-preview/pr-27/_images/Z2_fusiontrees.svg +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/ZZX_symm.svg b/pr-preview/pr-27/_images/ZZX_symm.svg deleted file mode 100644 index 5b8a2e54..00000000 --- a/pr-preview/pr-27/_images/ZZX_symm.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/anotherfusiontree.svg b/pr-preview/pr-27/_images/anotherfusiontree.svg deleted file mode 100644 index b09fc18e..00000000 --- a/pr-preview/pr-27/_images/anotherfusiontree.svg +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/boltzmann.svg b/pr-preview/pr-27/_images/boltzmann.svg deleted file mode 100644 index 662a4861..00000000 --- a/pr-preview/pr-27/_images/boltzmann.svg +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/boltzmann_mpo.svg b/pr-preview/pr-27/_images/boltzmann_mpo.svg deleted file mode 100644 index f22d2771..00000000 --- a/pr-preview/pr-27/_images/boltzmann_mpo.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/bosonham.svg b/pr-preview/pr-27/_images/bosonham.svg deleted file mode 100644 index 140bc7e2..00000000 --- a/pr-preview/pr-27/_images/bosonham.svg +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/bosonops.svg b/pr-preview/pr-27/_images/bosonops.svg deleted file mode 100644 index 0e85fb71..00000000 --- a/pr-preview/pr-27/_images/bosonops.svg +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/boundary_mps.svg b/pr-preview/pr-27/_images/boundary_mps.svg deleted file mode 100644 index 37c9dfca..00000000 --- a/pr-preview/pr-27/_images/boundary_mps.svg +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/contraction.svg b/pr-preview/pr-27/_images/contraction.svg deleted file mode 100644 index 2a03ffca..00000000 --- a/pr-preview/pr-27/_images/contraction.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/corrFunc.svg b/pr-preview/pr-27/_images/corrFunc.svg deleted file mode 100644 index f7297dc0..00000000 --- a/pr-preview/pr-27/_images/corrFunc.svg +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/corrFunc1.svg b/pr-preview/pr-27/_images/corrFunc1.svg deleted file mode 100644 index e9d4a19c..00000000 --- a/pr-preview/pr-27/_images/corrFunc1.svg +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/corrFunc2.svg b/pr-preview/pr-27/_images/corrFunc2.svg deleted file mode 100644 index b8e33480..00000000 --- a/pr-preview/pr-27/_images/corrFunc2.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/diagC.svg b/pr-preview/pr-27/_images/diagC.svg deleted file mode 100644 index 22a28305..00000000 --- a/pr-preview/pr-27/_images/diagC.svg +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/effHam.svg b/pr-preview/pr-27/_images/effHam.svg deleted file mode 100644 index 6cb0c773..00000000 --- a/pr-preview/pr-27/_images/effHam.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/eig.svg b/pr-preview/pr-27/_images/eig.svg deleted file mode 100644 index 916fd63b..00000000 --- a/pr-preview/pr-27/_images/eig.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/energyOpt.svg b/pr-preview/pr-27/_images/energyOpt.svg deleted file mode 100644 index 07c9992c..00000000 --- a/pr-preview/pr-27/_images/energyOpt.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/env.svg b/pr-preview/pr-27/_images/env.svg deleted file mode 100644 index 12a650d2..00000000 --- a/pr-preview/pr-27/_images/env.svg +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/envNorm.svg b/pr-preview/pr-27/_images/envNorm.svg deleted file mode 100644 index f96ec4cf..00000000 --- a/pr-preview/pr-27/_images/envNorm.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/expVal.svg b/pr-preview/pr-27/_images/expVal.svg deleted file mode 100644 index d034abea..00000000 --- a/pr-preview/pr-27/_images/expVal.svg +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/expVal2.svg b/pr-preview/pr-27/_images/expVal2.svg deleted file mode 100644 index d83c5afc..00000000 --- a/pr-preview/pr-27/_images/expVal2.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/expVal3.svg b/pr-preview/pr-27/_images/expVal3.svg deleted file mode 100644 index c6eb10ba..00000000 --- a/pr-preview/pr-27/_images/expVal3.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/expectation_value.svg b/pr-preview/pr-27/_images/expectation_value.svg deleted file mode 100644 index 33c71f63..00000000 --- a/pr-preview/pr-27/_images/expectation_value.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/expectation_value2.svg b/pr-preview/pr-27/_images/expectation_value2.svg deleted file mode 100644 index a0cde61b..00000000 --- a/pr-preview/pr-27/_images/expectation_value2.svg +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/fZ2_fusiontrees.svg b/pr-preview/pr-27/_images/fZ2_fusiontrees.svg deleted file mode 100644 index 6f52ad01..00000000 --- a/pr-preview/pr-27/_images/fZ2_fusiontrees.svg +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/fixedPoints.svg b/pr-preview/pr-27/_images/fixedPoints.svg deleted file mode 100644 index db3a38c7..00000000 --- a/pr-preview/pr-27/_images/fixedPoints.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/fixedpoint.svg b/pr-preview/pr-27/_images/fixedpoint.svg deleted file mode 100644 index a82febf8..00000000 --- a/pr-preview/pr-27/_images/fixedpoint.svg +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/fmps.svg b/pr-preview/pr-27/_images/fmps.svg deleted file mode 100644 index f6ef1828..00000000 --- a/pr-preview/pr-27/_images/fmps.svg +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/full_state.svg b/pr-preview/pr-27/_images/full_state.svg deleted file mode 100644 index 46d8b304..00000000 --- a/pr-preview/pr-27/_images/full_state.svg +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/fusiontree.svg b/pr-preview/pr-27/_images/fusiontree.svg deleted file mode 100644 index 06ec13f3..00000000 --- a/pr-preview/pr-27/_images/fusiontree.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/gauge.svg b/pr-preview/pr-27/_images/gauge.svg deleted file mode 100644 index 2924290d..00000000 --- a/pr-preview/pr-27/_images/gauge.svg +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/gaugeTransform.svg b/pr-preview/pr-27/_images/gaugeTransform.svg deleted file mode 100644 index 67a622d3..00000000 --- a/pr-preview/pr-27/_images/gaugeTransform.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/grouping.svg b/pr-preview/pr-27/_images/grouping.svg deleted file mode 100644 index d0a0d2a5..00000000 --- a/pr-preview/pr-27/_images/grouping.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/indexing.svg b/pr-preview/pr-27/_images/indexing.svg deleted file mode 100644 index 3dea74c6..00000000 --- a/pr-preview/pr-27/_images/indexing.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/kronecker.svg b/pr-preview/pr-27/_images/kronecker.svg deleted file mode 100644 index 60e78524..00000000 --- a/pr-preview/pr-27/_images/kronecker.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/ladder1.svg b/pr-preview/pr-27/_images/ladder1.svg deleted file mode 100644 index c67f46e8..00000000 --- a/pr-preview/pr-27/_images/ladder1.svg +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/ladder2.svg b/pr-preview/pr-27/_images/ladder2.svg deleted file mode 100644 index 2cb6ebc7..00000000 --- a/pr-preview/pr-27/_images/ladder2.svg +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/leftGauge.svg b/pr-preview/pr-27/_images/leftGauge.svg deleted file mode 100644 index 53c5e9a6..00000000 --- a/pr-preview/pr-27/_images/leftGauge.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/leftOrth.svg b/pr-preview/pr-27/_images/leftOrth.svg deleted file mode 100644 index 1b1908ed..00000000 --- a/pr-preview/pr-27/_images/leftOrth.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/leftOrth1.svg b/pr-preview/pr-27/_images/leftOrth1.svg deleted file mode 100644 index aaad8693..00000000 --- a/pr-preview/pr-27/_images/leftOrth1.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/leftOrth2.svg b/pr-preview/pr-27/_images/leftOrth2.svg deleted file mode 100644 index d68b8991..00000000 --- a/pr-preview/pr-27/_images/leftOrth2.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/localUpdate.svg b/pr-preview/pr-27/_images/localUpdate.svg deleted file mode 100644 index 90f6b41b..00000000 --- a/pr-preview/pr-27/_images/localUpdate.svg +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/localUpdate2.svg b/pr-preview/pr-27/_images/localUpdate2.svg deleted file mode 100644 index 2c15cb92..00000000 --- a/pr-preview/pr-27/_images/localUpdate2.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/matmat.svg b/pr-preview/pr-27/_images/matmat.svg deleted file mode 100644 index ae6b7b7e..00000000 --- a/pr-preview/pr-27/_images/matmat.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/matvec.svg b/pr-preview/pr-27/_images/matvec.svg deleted file mode 100644 index 6170d736..00000000 --- a/pr-preview/pr-27/_images/matvec.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/mixedGauge.svg b/pr-preview/pr-27/_images/mixedGauge.svg deleted file mode 100644 index 99643eaa..00000000 --- a/pr-preview/pr-27/_images/mixedGauge.svg +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/mixedGauge2.svg b/pr-preview/pr-27/_images/mixedGauge2.svg deleted file mode 100644 index 4a0749ec..00000000 --- a/pr-preview/pr-27/_images/mixedGauge2.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/mpo.svg b/pr-preview/pr-27/_images/mpo.svg deleted file mode 100644 index 37cc73ad..00000000 --- a/pr-preview/pr-27/_images/mpo.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/mpoHam.svg b/pr-preview/pr-27/_images/mpoHam.svg deleted file mode 100644 index 4583013a..00000000 --- a/pr-preview/pr-27/_images/mpoHam.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/mpsNorm.svg b/pr-preview/pr-27/_images/mpsNorm.svg deleted file mode 100644 index 84b73cd6..00000000 --- a/pr-preview/pr-27/_images/mpsNorm.svg +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/network.svg b/pr-preview/pr-27/_images/network.svg deleted file mode 100644 index 04645538..00000000 --- a/pr-preview/pr-27/_images/network.svg +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/none2symm.svg b/pr-preview/pr-27/_images/none2symm.svg deleted file mode 100644 index 5fcd78e7..00000000 --- a/pr-preview/pr-27/_images/none2symm.svg +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/normAC.svg b/pr-preview/pr-27/_images/normAC.svg deleted file mode 100644 index 24b2a635..00000000 --- a/pr-preview/pr-27/_images/normAC.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/outer-product.svg b/pr-preview/pr-27/_images/outer-product.svg deleted file mode 100644 index dca3b94a..00000000 --- a/pr-preview/pr-27/_images/outer-product.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/partition_function.svg b/pr-preview/pr-27/_images/partition_function.svg deleted file mode 100644 index 432d185e..00000000 --- a/pr-preview/pr-27/_images/partition_function.svg +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/partition_function_1.svg b/pr-preview/pr-27/_images/partition_function_1.svg deleted file mode 100644 index 9f7289ef..00000000 --- a/pr-preview/pr-27/_images/partition_function_1.svg +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/peps.svg b/pr-preview/pr-27/_images/peps.svg deleted file mode 100644 index 419b0947..00000000 --- a/pr-preview/pr-27/_images/peps.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/peps1.svg b/pr-preview/pr-27/_images/peps1.svg deleted file mode 100644 index f1d8e434..00000000 --- a/pr-preview/pr-27/_images/peps1.svg +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/pfmps.svg b/pr-preview/pr-27/_images/pfmps.svg deleted file mode 100644 index dfb5e42c..00000000 --- a/pr-preview/pr-27/_images/pfmps.svg +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/polar.svg b/pr-preview/pr-27/_images/polar.svg deleted file mode 100644 index 58615820..00000000 --- a/pr-preview/pr-27/_images/polar.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/qr.svg b/pr-preview/pr-27/_images/qr.svg deleted file mode 100644 index 490b8dc6..00000000 --- a/pr-preview/pr-27/_images/qr.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/qrConv.svg b/pr-preview/pr-27/_images/qrConv.svg deleted file mode 100644 index 90201efa..00000000 --- a/pr-preview/pr-27/_images/qrConv.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/qrStep.svg b/pr-preview/pr-27/_images/qrStep.svg deleted file mode 100644 index 2a6775d2..00000000 --- a/pr-preview/pr-27/_images/qrStep.svg +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/rightGauge.svg b/pr-preview/pr-27/_images/rightGauge.svg deleted file mode 100644 index 3346982e..00000000 --- a/pr-preview/pr-27/_images/rightGauge.svg +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/rightOrth.svg b/pr-preview/pr-27/_images/rightOrth.svg deleted file mode 100644 index 7beca237..00000000 --- a/pr-preview/pr-27/_images/rightOrth.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/simple_update.svg b/pr-preview/pr-27/_images/simple_update.svg deleted file mode 100644 index 3e8768d5..00000000 --- a/pr-preview/pr-27/_images/simple_update.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/svd.svg b/pr-preview/pr-27/_images/svd.svg deleted file mode 100644 index 560a1d95..00000000 --- a/pr-preview/pr-27/_images/svd.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/svd1.svg b/pr-preview/pr-27/_images/svd1.svg deleted file mode 100644 index 675b705b..00000000 --- a/pr-preview/pr-27/_images/svd1.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/svd2.svg b/pr-preview/pr-27/_images/svd2.svg deleted file mode 100644 index 57cc8e78..00000000 --- a/pr-preview/pr-27/_images/svd2.svg +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/symmetric_tensor.svg b/pr-preview/pr-27/_images/symmetric_tensor.svg deleted file mode 100644 index a9490062..00000000 --- a/pr-preview/pr-27/_images/symmetric_tensor.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/symmtens.svg b/pr-preview/pr-27/_images/symmtens.svg deleted file mode 100644 index eea9e734..00000000 --- a/pr-preview/pr-27/_images/symmtens.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tebd_mps.svg b/pr-preview/pr-27/_images/tebd_mps.svg deleted file mode 100644 index a9f6fdc1..00000000 --- a/pr-preview/pr-27/_images/tebd_mps.svg +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tebd_trunc.svg b/pr-preview/pr-27/_images/tebd_trunc.svg deleted file mode 100644 index e4f88c49..00000000 --- a/pr-preview/pr-27/_images/tebd_trunc.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tensor_network.svg b/pr-preview/pr-27/_images/tensor_network.svg deleted file mode 100644 index 0308da40..00000000 --- a/pr-preview/pr-27/_images/tensor_network.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tm.svg b/pr-preview/pr-27/_images/tm.svg deleted file mode 100644 index a56823ee..00000000 --- a/pr-preview/pr-27/_images/tm.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tmLimit.svg b/pr-preview/pr-27/_images/tmLimit.svg deleted file mode 100644 index 4883049e..00000000 --- a/pr-preview/pr-27/_images/tmLimit.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tmPower.svg b/pr-preview/pr-27/_images/tmPower.svg deleted file mode 100644 index c92058b0..00000000 --- a/pr-preview/pr-27/_images/tmPower.svg +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tn_state.svg b/pr-preview/pr-27/_images/tn_state.svg deleted file mode 100644 index 16e53425..00000000 --- a/pr-preview/pr-27/_images/tn_state.svg +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/tr.svg b/pr-preview/pr-27/_images/tr.svg deleted file mode 100644 index 68a55fd7..00000000 --- a/pr-preview/pr-27/_images/tr.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/trace-cyclic.svg b/pr-preview/pr-27/_images/trace-cyclic.svg deleted file mode 100644 index 241d3830..00000000 --- a/pr-preview/pr-27/_images/trace-cyclic.svg +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/trace.svg b/pr-preview/pr-27/_images/trace.svg deleted file mode 100644 index f881bb6b..00000000 --- a/pr-preview/pr-27/_images/trace.svg +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/traceNorm.svg b/pr-preview/pr-27/_images/traceNorm.svg deleted file mode 100644 index 3dfdc3dd..00000000 --- a/pr-preview/pr-27/_images/traceNorm.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/transfer.svg b/pr-preview/pr-27/_images/transfer.svg deleted file mode 100644 index 9edeba5b..00000000 --- a/pr-preview/pr-27/_images/transfer.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/transfer1.svg b/pr-preview/pr-27/_images/transfer1.svg deleted file mode 100644 index 8495020c..00000000 --- a/pr-preview/pr-27/_images/transfer1.svg +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/truncMPS.svg b/pr-preview/pr-27/_images/truncMPS.svg deleted file mode 100644 index 55dee528..00000000 --- a/pr-preview/pr-27/_images/truncMPS.svg +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/umps.svg b/pr-preview/pr-27/_images/umps.svg deleted file mode 100644 index e397a964..00000000 --- a/pr-preview/pr-27/_images/umps.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/umps3.svg b/pr-preview/pr-27/_images/umps3.svg deleted file mode 100644 index 4105b464..00000000 --- a/pr-preview/pr-27/_images/umps3.svg +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/unitary.svg b/pr-preview/pr-27/_images/unitary.svg deleted file mode 100644 index 62d28306..00000000 --- a/pr-preview/pr-27/_images/unitary.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/unitaryGauge.svg b/pr-preview/pr-27/_images/unitaryGauge.svg deleted file mode 100644 index 0392f3ee..00000000 --- a/pr-preview/pr-27/_images/unitaryGauge.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/vecvec.svg b/pr-preview/pr-27/_images/vecvec.svg deleted file mode 100644 index eef1b7ce..00000000 --- a/pr-preview/pr-27/_images/vecvec.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_images/wignereckart.svg b/pr-preview/pr-27/_images/wignereckart.svg deleted file mode 100644 index ded5ba28..00000000 --- a/pr-preview/pr-27/_images/wignereckart.svg +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_rediraffe_redirected.json b/pr-preview/pr-27/_rediraffe_redirected.json deleted file mode 100644 index 7316bcc2..00000000 --- a/pr-preview/pr-27/_rediraffe_redirected.json +++ /dev/null @@ -1 +0,0 @@ -{"index_toc.md": "intro.md"} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/0-Preliminaries/Resources.md b/pr-preview/pr-27/_sources/0-Preliminaries/Resources.md deleted file mode 100644 index b628e790..00000000 --- a/pr-preview/pr-27/_sources/0-Preliminaries/Resources.md +++ /dev/null @@ -1,6 +0,0 @@ -# Useful Resources - -Other useful resources for learning about tensor networks include (but are certainly not limited to): - -- [tensornetwork.org](http://tensornetwork.org/) -- [tensors.net](https://www.tensors.net/) \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/0-Preliminaries/Software.ipynb b/pr-preview/pr-27/_sources/0-Preliminaries/Software.ipynb deleted file mode 100644 index 301ac9b3..00000000 --- a/pr-preview/pr-27/_sources/0-Preliminaries/Software.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "a97b38bd", - "metadata": {}, - "source": [ - "# Getting Started with Numerics\n", - "\n", - "On this page, there are some links with relevant information for getting started with\n", - "numerical computing. We point to some references for the Julia programming language, as well\n", - "as some resources for learning about version control software.\n", - "\n", - "## Version Control\n", - "\n", - "Version control software is a tool used in software development (and sometimes in other\n", - "fields) to manage and track changes made to a project's source code, documents, or any other\n", - "set of files. It allows multiple contributors to work collaboratively on a project, keeping\n", - "a history of changes, and facilitating the organization and synchronization of different\n", - "versions of the project. The most popular version control system is\n", - "[git](https://git-scm.com/), which is a free tool developed by Linus Torvalds in 2005, and\n", - "has become the de facto standard in the software development industry.\n", - "\n", - "Again, multiple resources are available for learning about git. From the official website,\n", - "the book [Pro Git](https://git-scm.com/book/en/v2) is a good place to start. For a more\n", - "dynamic approach, you can learn git through\n", - "[this interactive tutorial](https://learngitbranching.js.org/).\n", - "\n", - "## Julia\n", - "\n", - "In order to get started with Julia, there are many resources already available. The\n", - "[official documentation](https://docs.julialang.org/en/v1/) is a good place to start, and a\n", - "full _getting started_ exposition can be found for example\n", - "[here](https://julia.quantecon.org/intro.html). There is also a\n", - "[learning page](https://julialang.org/learning/) that has tutorials on different topics, a\n", - "list of books, and much more.\n", - "\n", - "Additionally, there is an active [forum](https://discourse.julialang.org/) for asking\n", - "questions, as well as a [slack channel](https://julialang.org/slack/) and a stack overflow\n", - "page.\n", - "\n", - "## Julia Packages\n", - "\n", - "Julia has a very active open-source community, and many packages are available for different\n", - "purposes. These typically have their own documentation, and are hosted on GitHub. An\n", - "(incomplete) list of packages that are relevant for this course are given below:\n", - "\n", - "- [TensorKit.jl](https://github.com/Jutho/TensorKit.jl)\n", - "- [TensorOperations.jl](https://github.com/Jutho/TensorOperations.jl)\n", - "- [KrylovKit.jl](https://github.com/Jutho/KrylovKit.jl)\n", - "- [OptimKit.jl](https://github.com/Jutho/OptimKit.jl)\n", - "- [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl)\n", - "- [PEPSKit.jl](https://github.com/quantumghent/PEPSKit.jl)\n", - "\n", - "Also check out the [GitHub page for our organization](https://github.com/quantumghent),\n", - "which hosts and/or links many of the relevant software repositories.\n", - "\n", - "## Noteworthy Tensor Network Software\n", - "\n", - "There are many additional software libraries available for tensor network computations, or\n", - "more generally for quantum physics research. Below you can find an incomplete list of some\n", - "of these.\n", - "\n", - "- [ITensor](https://itensor.org/) Julia/C++ library for tensor network calculations\n", - "- [TenPy](https://tenpy.readthedocs.io/en/latest/) Python library for tensor network calculations\n", - "- [QUIMB](https://quimb.readthedocs.io/en/latest/) Python library for quantum information many-body calculations" - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/0-Preliminaries/Software.md b/pr-preview/pr-27/_sources/0-Preliminaries/Software.md deleted file mode 100644 index bc1a8dd0..00000000 --- a/pr-preview/pr-27/_sources/0-Preliminaries/Software.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -# Getting Started with Numerics - -On this page, there are some links with relevant information for getting started with -numerical computing. We point to some references for the Julia programming language, as well -as some resources for learning about version control software. - -## Version Control - -Version control software is a tool used in software development (and sometimes in other -fields) to manage and track changes made to a project's source code, documents, or any other -set of files. It allows multiple contributors to work collaboratively on a project, keeping -a history of changes, and facilitating the organization and synchronization of different -versions of the project. The most popular version control system is -[git](https://git-scm.com/), which is a free tool developed by Linus Torvalds in 2005, and -has become the de facto standard in the software development industry. - -Again, multiple resources are available for learning about git. From the official website, -the book [Pro Git](https://git-scm.com/book/en/v2) is a good place to start. For a more -dynamic approach, you can learn git through -[this interactive tutorial](https://learngitbranching.js.org/). - -## Julia - -In order to get started with Julia, there are many resources already available. The -[official documentation](https://docs.julialang.org/en/v1/) is a good place to start, and a -full _getting started_ exposition can be found for example -[here](https://julia.quantecon.org/intro.html). There is also a -[learning page](https://julialang.org/learning/) that has tutorials on different topics, a -list of books, and much more. - -Additionally, there is an active [forum](https://discourse.julialang.org/) for asking -questions, as well as a [slack channel](https://julialang.org/slack/) and a stack overflow -page. - -## Julia Packages - -Julia has a very active open-source community, and many packages are available for different -purposes. These typically have their own documentation, and are hosted on GitHub. An -(incomplete) list of packages that are relevant for this course are given below: - -- [TensorKit.jl](https://github.com/Jutho/TensorKit.jl) -- [TensorOperations.jl](https://github.com/Jutho/TensorOperations.jl) -- [KrylovKit.jl](https://github.com/Jutho/KrylovKit.jl) -- [OptimKit.jl](https://github.com/Jutho/OptimKit.jl) -- [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) -- [PEPSKit.jl](https://github.com/quantumghent/PEPSKit.jl) - -Also check out the [GitHub page for our organization](https://github.com/quantumghent), -which hosts and/or links many of the relevant software repositories. - -## Noteworthy Tensor Network Software - -There are many additional software libraries available for tensor network computations, or -more generally for quantum physics research. Below you can find an incomplete list of some -of these. - -- [ITensor](https://itensor.org/) Julia/C++ library for tensor network calculations -- [TenPy](https://tenpy.readthedocs.io/en/latest/) Python library for tensor network calculations -- [QUIMB](https://quimb.readthedocs.io/en/latest/) Python library for quantum information many-body calculations diff --git a/pr-preview/pr-27/_sources/1-Introduction/FockSpace.ipynb b/pr-preview/pr-27/_sources/1-Introduction/FockSpace.ipynb deleted file mode 100644 index d012edbf..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/FockSpace.ipynb +++ /dev/null @@ -1,266 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "661d0fb7", - "metadata": {}, - "source": [ - "(fock_space)=\n", - "# Fock Space and Second Quantisation\n", - "\n", - "When working with basis vectors using the occuppation number representation, we might\n", - "consider dropping the overall constraint $\\sum_{j=1}^L n_j = N$. This amounts to working in\n", - "a larger Hilbert space, which is known as the Fock space, and consists of the direct sum of\n", - "all physical (symmetrised or antisymmetrised) Hilbert spaces $\\mathbb{H}^{(N)}$ for\n", - "different particle numbers $N$, going all the way from $N=0$:\n", - "\n", - "```{math}\n", - "\\mathbb{H} = \\bigoplus_{N=0}^{+\\infty} \\mathbb{H}^{(N)}\n", - "```\n", - "\n", - "In the case of fermions and with a finite-dimensional single-particle Hilbert space\n", - "$\\mathbb{H}^{(1)} \\cong \\mathbb{C}^L$, the upper limit in the direct sum is $N=L$, i.e.\n", - "there are no states with $N > L$ and so the associated Hilbert spaces are zero-dimensional.\n", - "This direct sum furthermore also contains the case $N=0$, which we have not discussed\n", - "before. In the previous subsection we started the construction of $\\mathbb{H}^{(N)}$ from a\n", - "given single particle Hilbert space $\\mathbb{H}^{(1)}$. When there are no particles in the\n", - "system, there is only a single state in which it can be, corresponding to having all\n", - "occupation numbers $n_j = 0$ for all $j$. Hence, for $N=0$ particles, the Hilbert space\n", - "$\\mathbb{H}^{(0)}$ is spanned by a single state, which we typically denote as\n", - "$\\ket{\\Omega}=\\ket{0,0,\\dots,0}$ and refer to as the *vacuum state*. Note that this vacuum\n", - "state is normalised, and is thus very different from an actual zero vector of the vector\n", - "space, which has norm zero.\n", - "\n", - "The Fock space becomes a Hilbert space simply by incorporating the inner product from each\n", - "of its summands. States within the different summands of this direct sum are defined to be\n", - "orthogonal, i.e. $\\braket{\\varphi^{(M)} \\vert \\psi^{(N)}}=0$ for all $M$-particle states\n", - "$\\ket{\\varphi^{(M)}}$ and $N$-particle states $\\ket{\\psi^{(N)}}$ with $M \\neq N$.\n", - "\n", - "The main benefits of using the formalism of second quantisation are not about losing the\n", - "overall particle number constraint, but for working with operators, in particular to\n", - "describe (interacting) Hamiltonians. In first quantisation, we need to specify a Hamiltonian\n", - "given a particular number of particles, i.e.\\ the number of particles is an external\n", - "parameter of the system. Using the Fock space, we can now define operators in such a way\n", - "that their action is immediately defined for states with an arbitrary number of particles,\n", - "including even states which are superpositions over different particle numbers.\n", - "\n", - "Hereto, we first introduce operators that enable us to connect the different particle number\n", - "sectors, by creating (adding) or annihilating (removing) particles in the system. In\n", - "particular, we denote with $\\hat{a}_j^+$ the operator that adds a new particle in the mode\n", - "$j$ in the system and with $\\hat{a}_j^-$ the operator that removes a particle that is in\n", - "mode $j$ from the system. As it turns out that both operators are related via the adjoint,\n", - "i.e. $\\braket{\\Phi| \\hat{a}_j^+ \\Psi} = \\braket{\\hat{a}_j^- \\Phi | \\Psi}$, we use the\n", - "simpler notation $\\hat{a}_j$ for the *annihilation operator* and $\\hat{a}_j^\\dagger$ for the\n", - "*creation operator*. To construct these operators in a mathematically precise and\n", - "constructive way is actually somewhat tedious (but see\n", - "[Wikipedia](https://en.wikipedia.org/wiki/Second_quantization#Creation_and_annihilation_operators)).\n", - "We just summarize their main properties. In particular, we want to have the property that\n", - "the (anti)symmetrized states satisfy\n", - "\n", - "```{math}\n", - "\\ket{j_1,j_2, \\ldots, j_N} = \\hat{a}_{j_1}^\\dagger \\hat{a}_{j_2}^\\dagger \\cdots\n", - "\\hat{a}_{j_N}^\\dagger\\ket{\\Omega}.\n", - "```\n", - "\n", - "It is immediately clear that, because of the (anti)symmetry, this requires that\n", - "\n", - "```{math}\n", - "[\\hat{a}_i^\\dagger, \\hat{a}_j^\\dagger] = 0\\ (\\text{bosons})\\quad\\text{or}\\quad\n", - "\\{\\hat{a}_i^\\dagger,\\hat{a}_j^\\dagger\\} = 0\\ (\\text{fermions}).\n", - "```\n", - "\n", - "From the normalisation of these states, it also follows that\n", - "\n", - "```{math}\n", - "[\\hat{a}_i, \\hat{a}_j^\\dagger] = \\delta_{i,j}\\ (\\text{bosons})\\quad\\text{or}\\quad\n", - "\\{\\hat{a}_i,\\hat{a}_j^\\dagger\\} = \\delta_{i,j}\\ (\\text{fermions}).\n", - "```\n", - "\n", - "With respect to the normalized basis vectors, using the occupation representation, we have\n", - "\n", - "```{math}\n", - "\\ket{n_1, n_2, \\ldots, n_L} = \\frac{1}{\\sqrt{n_1! n_2! \\cdots n_L!}}\n", - "(\\hat{a}_1^\\dagger)^{n_1} (\\hat{a}_2^\\dagger)^{n_2} \\cdots (\\hat{a}_L^\\dagger)^{n_L}\n", - "\\ket{\\Omega}\n", - "```\n", - "\n", - "which can be summarized using\n", - "\n", - "```{math}\n", - "\\hat{a}_j \\ket{n_1, n_2, \\ldots, n_j, \\ldots, n_L} &= (\\pm 1)^{n_1 + n_2 + \\ldots + n_{j-1}} \\sqrt{n_j} \\ket{n_1, n_2, \\ldots, n_j - 1, \\ldots, n_L},\\\\\n", - "\\hat{a}_j^\\dagger \\ket{n_1, n_2, \\ldots, n_j, \\ldots, n_L} &= (\\pm 1)^{n_1 + n_2 + \\ldots + n_{j-1}} \\sqrt{n_j+1} \\ket{n_1, n_2, \\ldots, n_j + 1, \\ldots, n_L}.\n", - "```\n", - "\n", - "It then follows easily that the operator $\\hat{n}_j = \\hat{a}_j^\\dagger \\hat{a}_j$ satisfies\n", - "\n", - "```{math}\n", - "\\hat{n}_j \\ket{n_1, n_2, \\ldots, n_j, \\ldots, n_L} = n_j \\ket{n_1, n_2, \\ldots, n_j, \\ldots, n_L}\n", - "```\n", - "\n", - "and thus measures the number of particles in mode $j$. The operators $\\hat{n}_j$ are\n", - "referred to as *number operators*. The total number of particles can then be measured using\n", - "\n", - "```{math}\n", - "\\hat{N} = \\sum_{j=1}^{L} \\hat{n}_j\n", - "```\n", - "\n", - "but the Fock space does of course contain states which are superpositions over different\n", - "particle numbers (and which are thus not eigenstates of $\\hat{N}$).\n", - "\n", - "Furthermore, by studying how single particle states $\\ket{j} \\equiv \\hat{a}_j^\\dagger\n", - "\\ket{\\Omega}$ change under a change of single particle basis, or thus, a transformation to a\n", - "new set of modes, we can deduce how the associated creation and annihilation operators\n", - "transform. Suppose we have a different single-particle basis, which for clarity we label\n", - "with greek letters $\\kappa = 1,\\ldots,L$. We then find\n", - "\n", - "```{math}\n", - "\\ket{\\kappa} = \\hat{a}_\\kappa^\\dagger \\ket{\\Omega} = \\sum_{j} \\ket{j} \\braket{j\\vert\\kappa}\n", - "= \\sum_{j} \\braket{j\\vert \\kappa} \\hat{a}_j^\\dagger \\ket{\\Omega}\n", - "```\n", - "\n", - "from which we obtain\n", - "\n", - "```{math}\n", - "\\hat{a}_\\kappa^\\dagger = \\sum_{j} \\braket{j\\vert \\kappa} \\hat{a}_j^\\dagger,\n", - "\\qquad\\hat{a}_\\kappa = \\sum_{j} \\braket{\\kappa\\vert j} \\hat{a}_j.\n", - "```\n", - "\n", - "Note that the transformation matrix $\\braket{j \\vert \\kappa}$ between two orthonormal bases\n", - "correspond to a unitary matrix. These transformation rules will be employed often, for\n", - "example, to switch between a position and momentum space representation.\n", - "\n", - "````{note}\n", - "The bosonic creation and annihilation operators are of course reminiscent from the operators\n", - "introduced for diagonalising the single particle harmonic oscillator model. Indeed, out of\n", - "the bosonic creation and annihilation operator associated to every mode $j$ we can build two\n", - "Hermitian operators\n", - "\n", - "```{math}\n", - "\\hat{X}_j = \\frac{1}{\\sqrt{2}}(\\hat{a}_j + \\hat{a}_j^\\dagger),\\quad \\hat{P}_j =\n", - "\\frac{-\\mathrm{i}}{\\sqrt{2}}(\\hat{a}_j - \\hat{a}_j^\\dagger)\n", - "```\n", - "\n", - "which than satisfy the well known commutation relations $\\left[\\hat{X}_j, \\hat{P}_k\\right] =\n", - "\\mathrm{i} \\delta_{j,k}$. In second quantisation, the Fock space of bosons built from a\n", - "single particle system with $L$ modes can equivalently be thought of as a regular tensor\n", - "product space of $L$ distinguishable quantum particles moving on the real line, or\n", - "technically, as $\\left(L^2(\\mathbb{R})\\right)^{\\otimes L}$.\n", - "````\n", - "````{note}\n", - "For fermions, we can also construct Hermitian operators out of the creation and annihilation\n", - "operators, which we denote as\n", - "\n", - "```{math}\n", - "\\hat{\\eta}^{(1)}_j = \\frac{1}{\\sqrt{2}}(\\hat{a}_j + \\hat{a}_j^\\dagger),\\quad\n", - "\\hat{\\eta}^{(2)}_j = \\frac{-\\mathrm{i}}{\\sqrt{2}}(\\hat{a}_j - \\hat{a}_j^\\dagger).\n", - "```\n", - "\n", - "In this case, we find that they satisfy the anticommutation relation\n", - "\n", - "```{math}\n", - "\\{ \\hat{\\eta}^{(\\alpha)}_j, \\hat{\\eta}^{(\\beta)}_k \\} = \\delta_{\\alpha,\\beta} \\delta_{j,k}\n", - "```\n", - "\n", - "so that the $\\hat{\\eta}^{(1)}$ type operators and $\\hat{\\eta}^{(2)}$ type operators behave\n", - "similarly. In that case, one often uses a different notation by setting\n", - "\n", - "```{math}\n", - "\\hat{\\chi}_{2j-1} = \\hat{\\eta}^{(1)}_j = \\frac{1}{\\sqrt{2}}(\\hat{a}_j +\n", - "\\hat{a}_j^\\dagger),\\quad \\hat{\\chi}_{2j} = \\hat{\\eta}^{(2)}_j =\n", - "\\frac{-\\mathrm{i}}{\\sqrt{2}}(\\hat{a}_j - \\hat{a}_j^\\dagger)\n", - "```\n", - "\n", - "and thus $\\{\\hat{\\chi}_k, \\hat{\\chi}_l\\} = \\delta_{k,l}$ for all $k, l = 1,\\ldots, 2L$.\n", - "These Hermitian fermionic operators are referred to as **Majorana operators**.\n", - "\n", - "Note furthermore that the Fock space of fermions built from a single particle system with\n", - "$L$ modes looks remarkably like a system of $L$ qubits, i.e. the tensor product\n", - "$(\\mathbb{C}^2)^{\\otimes L}$. While this is true for how the occupation number basis vectors\n", - "are labelled, one important fact is that the operators $\\hat{a}_j$ and $\\hat{a}_j^\\dagger$\n", - "should not be thought of as local operators that act nontrivially on the single site $j$,\n", - "and as the identity elsewhere, since they do not mutually commute, but rather anticommute.\n", - "It is possible to map these fermionic creation and annihilation operators to 'nonlocal'\n", - "qubit operators using the\n", - "[Jordan-Wigner transformation](https://en.wikipedia.org/wiki/Jordan–Wigner_transformation).\n", - "````\n", - "\n", - "With these creation and annihilation operators, we can now represent general operators in a\n", - "way that does not depend on the precise number of particles in the system. The simplest case\n", - "are 'single-particle' operators, i.e. operators that were defined with respect to the\n", - "single-particle Hilbert space $\\mathbb{H}^{(1)}$. The easiest case are operators which are\n", - "are diagonal with respect to the chosen single-particle basis. In that case, every particle\n", - "one of the eigenmodes of the single-particle operator will give a contribution that equals\n", - "the associated eigenvalue. Hence, the many-body representation of such an operator is given\n", - "by\n", - "\n", - "```{math}\n", - "\\hat{O}^{(1)} = \\sum_{j} \\lambda_j \\ket{j}\\bra{j} \\quad \\rightarrow \\quad \\hat{O} = \\sum_{j}\n", - "\\lambda_j \\hat{a}_j^\\dagger \\hat{a}_j.\n", - "```\n", - "\n", - "However, we can easily transform away from the basis of eigenmodes to a general set of\n", - "modes, and then find\n", - "\n", - "```{math}\n", - "\\hat{O}^{(1)} = \\sum_{j,k} O_{j,k} \\ket{j}\\bra{k} \\quad \\rightarrow \\quad \\hat{O} =\n", - "\\sum_{j,k} O_{j,k} \\hat{a}_j^\\dagger \\hat{a}_k.\n", - "```\n", - "\n", - "Vice versa, if you are given an operator that only contains terms where every term contains\n", - "exactly one creation and one annilation operator, then it is especially easy to diagonalise\n", - "this operator, since one only needs to diagonalise the corresponding single-particle version\n", - "of the operator. When the Hamiltonian of the many-body system is of this form, the system is\n", - "said to be *free* or noninteracting.\n", - "\n", - "```{note}\n", - "There is a larger class of operators that can easily be diagonalised, namely operators where\n", - "every term is quadratic in the creation and annihilation operators. This means that every\n", - "term contains either a creation and an annilation operator, or two creation operators, or\n", - "two annihilation operators. Such Hamiltonians are said to be quadratic or Gaussian, and can\n", - "be diagonalised using a\n", - "[Bogoliubov transformation](https://en.wikipedia.org/wiki/Bogoliubov_transformation).\n", - "```\n", - "\n", - "Similarly, there exist two-particle operators, in particular, typical interaction terms in\n", - "the Hamiltonian such as the Coulomb interaction between electrons. Such operators take the\n", - "form\n", - "\n", - "```{math}\n", - "\\hat{O}^{(2)} = \\sum_{j,k,l,m} O_{j,k; l,m} \\ket{j,k} \\bra{l,m}\n", - "```\n", - "\n", - "and can be translated to act on the full Fock space as\n", - "\n", - "```{math}\n", - "\\hat{O} = \\sum_{j\\leq k; l\\leq m} O_{(j,k); (l,m)} \\hat{a}_{j}^\\dagger \\hat{a}_k^\\dagger\n", - "\\hat{a}_m \\hat{a}_l = \\frac{1}{4} \\sum_{j, k; l, m} O_{(j,k); (l,m)} \\hat{a}_{j}^\\dagger\n", - "\\hat{a}_k^\\dagger \\hat{a}_m \\hat{a}_l.\n", - "```\n", - "\n", - "As soon as such type of operators are present in the Hamiltonian (which thus contain more\n", - "than two creation of annihilation operators), it becomes impossible to diagonalise the\n", - "Hamiltonian based on a simple calculation in the single-particle Hilbert space, and the\n", - "exponentially large many-body Hilbert space need to be considered." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/1-Introduction/FockSpace.md b/pr-preview/pr-27/_sources/1-Introduction/FockSpace.md deleted file mode 100644 index 6869cb58..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/FockSpace.md +++ /dev/null @@ -1,248 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(fock_space)= -# Fock Space and Second Quantisation - -When working with basis vectors using the occuppation number representation, we might -consider dropping the overall constraint $\sum_{j=1}^L n_j = N$. This amounts to working in -a larger Hilbert space, which is known as the Fock space, and consists of the direct sum of -all physical (symmetrised or antisymmetrised) Hilbert spaces $\mathbb{H}^{(N)}$ for -different particle numbers $N$, going all the way from $N=0$: - -```{math} -\mathbb{H} = \bigoplus_{N=0}^{+\infty} \mathbb{H}^{(N)} -``` - -In the case of fermions and with a finite-dimensional single-particle Hilbert space -$\mathbb{H}^{(1)} \cong \mathbb{C}^L$, the upper limit in the direct sum is $N=L$, i.e. -there are no states with $N > L$ and so the associated Hilbert spaces are zero-dimensional. -This direct sum furthermore also contains the case $N=0$, which we have not discussed -before. In the previous subsection we started the construction of $\mathbb{H}^{(N)}$ from a -given single particle Hilbert space $\mathbb{H}^{(1)}$. When there are no particles in the -system, there is only a single state in which it can be, corresponding to having all -occupation numbers $n_j = 0$ for all $j$. Hence, for $N=0$ particles, the Hilbert space -$\mathbb{H}^{(0)}$ is spanned by a single state, which we typically denote as -$\ket{\Omega}=\ket{0,0,\dots,0}$ and refer to as the *vacuum state*. Note that this vacuum -state is normalised, and is thus very different from an actual zero vector of the vector -space, which has norm zero. - -The Fock space becomes a Hilbert space simply by incorporating the inner product from each -of its summands. States within the different summands of this direct sum are defined to be -orthogonal, i.e. $\braket{\varphi^{(M)} \vert \psi^{(N)}}=0$ for all $M$-particle states -$\ket{\varphi^{(M)}}$ and $N$-particle states $\ket{\psi^{(N)}}$ with $M \neq N$. - -The main benefits of using the formalism of second quantisation are not about losing the -overall particle number constraint, but for working with operators, in particular to -describe (interacting) Hamiltonians. In first quantisation, we need to specify a Hamiltonian -given a particular number of particles, i.e.\ the number of particles is an external -parameter of the system. Using the Fock space, we can now define operators in such a way -that their action is immediately defined for states with an arbitrary number of particles, -including even states which are superpositions over different particle numbers. - -Hereto, we first introduce operators that enable us to connect the different particle number -sectors, by creating (adding) or annihilating (removing) particles in the system. In -particular, we denote with $\hat{a}_j^+$ the operator that adds a new particle in the mode -$j$ in the system and with $\hat{a}_j^-$ the operator that removes a particle that is in -mode $j$ from the system. As it turns out that both operators are related via the adjoint, -i.e. $\braket{\Phi| \hat{a}_j^+ \Psi} = \braket{\hat{a}_j^- \Phi | \Psi}$, we use the -simpler notation $\hat{a}_j$ for the *annihilation operator* and $\hat{a}_j^\dagger$ for the -*creation operator*. To construct these operators in a mathematically precise and -constructive way is actually somewhat tedious (but see -[Wikipedia](https://en.wikipedia.org/wiki/Second_quantization#Creation_and_annihilation_operators)). -We just summarize their main properties. In particular, we want to have the property that -the (anti)symmetrized states satisfy - -```{math} -\ket{j_1,j_2, \ldots, j_N} = \hat{a}_{j_1}^\dagger \hat{a}_{j_2}^\dagger \cdots -\hat{a}_{j_N}^\dagger\ket{\Omega}. -``` - -It is immediately clear that, because of the (anti)symmetry, this requires that - -```{math} -[\hat{a}_i^\dagger, \hat{a}_j^\dagger] = 0\ (\text{bosons})\quad\text{or}\quad -\{\hat{a}_i^\dagger,\hat{a}_j^\dagger\} = 0\ (\text{fermions}). -``` - -From the normalisation of these states, it also follows that - -```{math} -[\hat{a}_i, \hat{a}_j^\dagger] = \delta_{i,j}\ (\text{bosons})\quad\text{or}\quad -\{\hat{a}_i,\hat{a}_j^\dagger\} = \delta_{i,j}\ (\text{fermions}). -``` - -With respect to the normalized basis vectors, using the occupation representation, we have - -```{math} -\ket{n_1, n_2, \ldots, n_L} = \frac{1}{\sqrt{n_1! n_2! \cdots n_L!}} -(\hat{a}_1^\dagger)^{n_1} (\hat{a}_2^\dagger)^{n_2} \cdots (\hat{a}_L^\dagger)^{n_L} -\ket{\Omega} -``` - -which can be summarized using - -```{math} -\hat{a}_j \ket{n_1, n_2, \ldots, n_j, \ldots, n_L} &= (\pm 1)^{n_1 + n_2 + \ldots + n_{j-1}} \sqrt{n_j} \ket{n_1, n_2, \ldots, n_j - 1, \ldots, n_L},\\ -\hat{a}_j^\dagger \ket{n_1, n_2, \ldots, n_j, \ldots, n_L} &= (\pm 1)^{n_1 + n_2 + \ldots + n_{j-1}} \sqrt{n_j+1} \ket{n_1, n_2, \ldots, n_j + 1, \ldots, n_L}. -``` - -It then follows easily that the operator $\hat{n}_j = \hat{a}_j^\dagger \hat{a}_j$ satisfies - -```{math} -\hat{n}_j \ket{n_1, n_2, \ldots, n_j, \ldots, n_L} = n_j \ket{n_1, n_2, \ldots, n_j, \ldots, n_L} -``` - -and thus measures the number of particles in mode $j$. The operators $\hat{n}_j$ are -referred to as *number operators*. The total number of particles can then be measured using - -```{math} -\hat{N} = \sum_{j=1}^{L} \hat{n}_j -``` - -but the Fock space does of course contain states which are superpositions over different -particle numbers (and which are thus not eigenstates of $\hat{N}$). - -Furthermore, by studying how single particle states $\ket{j} \equiv \hat{a}_j^\dagger -\ket{\Omega}$ change under a change of single particle basis, or thus, a transformation to a -new set of modes, we can deduce how the associated creation and annihilation operators -transform. Suppose we have a different single-particle basis, which for clarity we label -with greek letters $\kappa = 1,\ldots,L$. We then find - -```{math} -\ket{\kappa} = \hat{a}_\kappa^\dagger \ket{\Omega} = \sum_{j} \ket{j} \braket{j\vert\kappa} -= \sum_{j} \braket{j\vert \kappa} \hat{a}_j^\dagger \ket{\Omega} -``` - -from which we obtain - -```{math} -\hat{a}_\kappa^\dagger = \sum_{j} \braket{j\vert \kappa} \hat{a}_j^\dagger, -\qquad\hat{a}_\kappa = \sum_{j} \braket{\kappa\vert j} \hat{a}_j. -``` - -Note that the transformation matrix $\braket{j \vert \kappa}$ between two orthonormal bases -correspond to a unitary matrix. These transformation rules will be employed often, for -example, to switch between a position and momentum space representation. - -````{note} -The bosonic creation and annihilation operators are of course reminiscent from the operators -introduced for diagonalising the single particle harmonic oscillator model. Indeed, out of -the bosonic creation and annihilation operator associated to every mode $j$ we can build two -Hermitian operators - -```{math} -\hat{X}_j = \frac{1}{\sqrt{2}}(\hat{a}_j + \hat{a}_j^\dagger),\quad \hat{P}_j = -\frac{-\mathrm{i}}{\sqrt{2}}(\hat{a}_j - \hat{a}_j^\dagger) -``` - -which than satisfy the well known commutation relations $\left[\hat{X}_j, \hat{P}_k\right] = -\mathrm{i} \delta_{j,k}$. In second quantisation, the Fock space of bosons built from a -single particle system with $L$ modes can equivalently be thought of as a regular tensor -product space of $L$ distinguishable quantum particles moving on the real line, or -technically, as $\left(L^2(\mathbb{R})\right)^{\otimes L}$. -```` -````{note} -For fermions, we can also construct Hermitian operators out of the creation and annihilation -operators, which we denote as - -```{math} -\hat{\eta}^{(1)}_j = \frac{1}{\sqrt{2}}(\hat{a}_j + \hat{a}_j^\dagger),\quad -\hat{\eta}^{(2)}_j = \frac{-\mathrm{i}}{\sqrt{2}}(\hat{a}_j - \hat{a}_j^\dagger). -``` - -In this case, we find that they satisfy the anticommutation relation - -```{math} -\{ \hat{\eta}^{(\alpha)}_j, \hat{\eta}^{(\beta)}_k \} = \delta_{\alpha,\beta} \delta_{j,k} -``` - -so that the $\hat{\eta}^{(1)}$ type operators and $\hat{\eta}^{(2)}$ type operators behave -similarly. In that case, one often uses a different notation by setting - -```{math} -\hat{\chi}_{2j-1} = \hat{\eta}^{(1)}_j = \frac{1}{\sqrt{2}}(\hat{a}_j + -\hat{a}_j^\dagger),\quad \hat{\chi}_{2j} = \hat{\eta}^{(2)}_j = -\frac{-\mathrm{i}}{\sqrt{2}}(\hat{a}_j - \hat{a}_j^\dagger) -``` - -and thus $\{\hat{\chi}_k, \hat{\chi}_l\} = \delta_{k,l}$ for all $k, l = 1,\ldots, 2L$. -These Hermitian fermionic operators are referred to as **Majorana operators**. - -Note furthermore that the Fock space of fermions built from a single particle system with -$L$ modes looks remarkably like a system of $L$ qubits, i.e. the tensor product -$(\mathbb{C}^2)^{\otimes L}$. While this is true for how the occupation number basis vectors -are labelled, one important fact is that the operators $\hat{a}_j$ and $\hat{a}_j^\dagger$ -should not be thought of as local operators that act nontrivially on the single site $j$, -and as the identity elsewhere, since they do not mutually commute, but rather anticommute. -It is possible to map these fermionic creation and annihilation operators to 'nonlocal' -qubit operators using the -[Jordan-Wigner transformation](https://en.wikipedia.org/wiki/Jordan–Wigner_transformation). -```` - -With these creation and annihilation operators, we can now represent general operators in a -way that does not depend on the precise number of particles in the system. The simplest case -are 'single-particle' operators, i.e. operators that were defined with respect to the -single-particle Hilbert space $\mathbb{H}^{(1)}$. The easiest case are operators which are -are diagonal with respect to the chosen single-particle basis. In that case, every particle -one of the eigenmodes of the single-particle operator will give a contribution that equals -the associated eigenvalue. Hence, the many-body representation of such an operator is given -by - -```{math} -\hat{O}^{(1)} = \sum_{j} \lambda_j \ket{j}\bra{j} \quad \rightarrow \quad \hat{O} = \sum_{j} -\lambda_j \hat{a}_j^\dagger \hat{a}_j. -``` - -However, we can easily transform away from the basis of eigenmodes to a general set of -modes, and then find - -```{math} -\hat{O}^{(1)} = \sum_{j,k} O_{j,k} \ket{j}\bra{k} \quad \rightarrow \quad \hat{O} = -\sum_{j,k} O_{j,k} \hat{a}_j^\dagger \hat{a}_k. -``` - -Vice versa, if you are given an operator that only contains terms where every term contains -exactly one creation and one annilation operator, then it is especially easy to diagonalise -this operator, since one only needs to diagonalise the corresponding single-particle version -of the operator. When the Hamiltonian of the many-body system is of this form, the system is -said to be *free* or noninteracting. - -```{note} -There is a larger class of operators that can easily be diagonalised, namely operators where -every term is quadratic in the creation and annihilation operators. This means that every -term contains either a creation and an annilation operator, or two creation operators, or -two annihilation operators. Such Hamiltonians are said to be quadratic or Gaussian, and can -be diagonalised using a -[Bogoliubov transformation](https://en.wikipedia.org/wiki/Bogoliubov_transformation). -``` - -Similarly, there exist two-particle operators, in particular, typical interaction terms in -the Hamiltonian such as the Coulomb interaction between electrons. Such operators take the -form - -```{math} -\hat{O}^{(2)} = \sum_{j,k,l,m} O_{j,k; l,m} \ket{j,k} \bra{l,m} -``` - -and can be translated to act on the full Fock space as - -```{math} -\hat{O} = \sum_{j\leq k; l\leq m} O_{(j,k); (l,m)} \hat{a}_{j}^\dagger \hat{a}_k^\dagger -\hat{a}_m \hat{a}_l = \frac{1}{4} \sum_{j, k; l, m} O_{(j,k); (l,m)} \hat{a}_{j}^\dagger -\hat{a}_k^\dagger \hat{a}_m \hat{a}_l. -``` - -As soon as such type of operators are present in the Hamiltonian (which thus contain more -than two creation of annihilation operators), it becomes impossible to diagonalise the -Hamiltonian based on a simple calculation in the single-particle Hilbert space, and the -exponentially large many-body Hilbert space need to be considered. diff --git a/pr-preview/pr-27/_sources/1-Introduction/ManyBody.ipynb b/pr-preview/pr-27/_sources/1-Introduction/ManyBody.ipynb deleted file mode 100644 index 19a2a091..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/ManyBody.ipynb +++ /dev/null @@ -1,395 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "8bb3255e", - "metadata": {}, - "source": [ - "(many_body)=\n", - "# The Hilbert Space of Many-Body Physics\n", - "\n", - "All of the previous axioms remain valid for a composite system consisting of several quantum\n", - "degrees of freedom. However, we need to know how to describe the state of the system, and \n", - "thus more specifically, how to define the Hilbert space associated to such a system. It\n", - "turns out that quantum mechanics forces us to distinguish two cases.\n", - "\n", - "## Distinguisable Particles and Tensor Products\n", - "\n", - "Consider a quantum system composed out of two subsystems, which we call $A$ and $B$,\n", - "sometimes referred to as Alice and Bob in quantum information contexts. These can themselves\n", - "already be many-body systems. Suppose we know the Hilbert space $\\mathbb{H}^A$ in which to\n", - "describe states of subsystem $A$ when considered as an isolated system on itself, and\n", - "analoguously for $\\mathbb{H}^B$. Now consider both systems together, but where they do not\n", - "interact, so that we can still treat them independently. In particular, we can prepare\n", - "subsystem $A$ in a state $\\ket{\\psi^A}$ and subsystem $B$ in a state $\\ket{\\psi^B}$. We\n", - "should also be able to describe these two independent subsystems jointly, so that there must\n", - "exist a map from the two arguments $(\\ket{\\psi^A}, \\ket{\\varphi^B}) \\in \\mathbb{H}^A \\times\n", - "\\mathbb{H}^B$ to a single state which we denote as $\\ket{ \\psi^A} \\otimes \\ket{\\varphi^B}$\n", - "and that lives in a joint Hilbert space $\\mathbb{H}^{AB}$ that we have yet to determine.\n", - "\n", - "Now, it makes sense that, if we build superpositions in one of the two subsystems, while\n", - "keeping the other fixed, this also correspond to a superposition in the joint description of\n", - "both systems together. This leads to\n", - "\n", - "```{math}\n", - "\\left (a_1 \\ket{\\psi^A_1} + a_2 \\ket{\\psi^A_2}\\right) \\otimes \\ket{\\varphi^B} = a_1\n", - "\\ket{\\psi^A_1 }\\otimes \\ket{\\varphi^B} + a_2 \\ket{\\psi^A_1 }\\otimes \\ket{\\varphi^B}\n", - "```\n", - "\n", - "and similarly\n", - "\n", - "```{math}\n", - "\\ket{\\psi^A} \\otimes \\left(b_1 \\ket{\\varphi^B_1} + b_2 \\ket{\\varphi^A_2}\\right) = b_1\n", - "\\ket{\\psi^A }\\otimes \\ket{\\varphi^B_1} + b_2 \\ket{\\psi^A }\\otimes \\ket{\\varphi^B_2}.\n", - "```\n", - "\n", - "Hence, the Hilbert space $\\mathbb{H}^{AB}$ that we are trying to construct must contain all\n", - "states $\\ket{\\psi^A} \\otimes \\ket{\\varphi^B}$ for all $\\ket{\\psi^A} \\in \\mathbb{H}^A$ and\n", - "all $\\ket{\\varphi^B} \\in \\mathbb{H}^B$, all possible linear combinations thereof (in order\n", - "to be a vector space), but in such a way that the above equalities hold. This construction,\n", - "which can be made mathematically precise, is known as the tensor product of vector spaces\n", - "$\\mathbb{H}^{AB} = \\mathbb{H}^A \\otimes \\mathbb{H}^B$.\n", - "\n", - "We have also denoted the output of the map from two states $(\\ket{\\psi^A}, \\ket{\\varphi^B})\n", - "\\in \\mathbb{H}^A \\times \\mathbb{H}^B$ to $\\mathbb{H}^A \\otimes \\mathbb{H}^B$ using the same\n", - "tensor product symbol, and refer to such a state as a (tensor) product state $\\ket{ \\psi^A}\n", - "\\otimes \\ket{\\varphi^B}$. Importantly, however, the tensor product space $\\mathbb{H}^A\n", - "\\otimes \\mathbb{H}^B$ certainly contains vectors which are not product states, such as\n", - "\n", - "```{math}\n", - "a_1 \\ket{ \\psi_1^A} \\otimes \\ket{\\varphi_1^B} + a_2 \\ket{ \\psi_2^A} \\otimes\n", - "\\ket{\\varphi_2^B}.\n", - "```\n", - "\n", - "This forms the basis for quantum correlations and the concept of (quantum) entanglement,\n", - "which will be a fundamental property of quantum many-body systems. That the Hilbert space of\n", - "a composite system is given by the tensor product of the individual Hilbert spaces is often\n", - "introduced as a separate axiom. The deductive (but informal) argument just given can however\n", - "be turned into a proof that depends only on the axioms given above (in fact only on the\n", - "first two).\n", - "\n", - "As expected (and required), it can be shown that the tensor product of two Hilbert spaces is\n", - "again a Hilbert space, if we define its inner product in the following way. We first define\n", - "the inner product for product states as\n", - "\n", - "```{math}\n", - "\\braket{\\psi_1^A \\otimes \\varphi_1^B | \\psi_2^A \\otimes \\varphi_2^B } = \\braket{\\psi_1^A |\n", - "\\psi_2^A} \\braket{\\varphi_1^B | \\varphi_2^B}\n", - "```\n", - "\n", - "and then extend this definition by linearity (in the second argument and antilinearity in\n", - "the first argument).\n", - "\n", - "In practice, given two finite-dimensional Hilbert spaces $\\mathbb{H}^A \\cong\n", - "\\mathbb{C}^{d^A}$ and $\\mathbb{H}^B \\cong \\mathbb{C}^{d^B}$ with a basis $\\{ \\ket{j},\n", - "j=1,\\dots, d^A\\}$ and $\\{\\ket{k}, k=1,\\dots, d^B\\}$, the tensor product space is spanned by\n", - "a basis composed of all products\n", - "\n", - "```{math}\n", - "\\{ \\ket{j,k} = \\ket{j} \\otimes \\ket{k}, j=1,\\dots, d^A, k=1,\\dots, d^B\\}\n", - "```\n", - "\n", - "and thus has dimension $d^A \\cdot d^B$. A general state $\\ket{\\Psi} \\in\n", - "\\mathbb{H}^{A}\\otimes \\mathbb{H}^B$ can then be expanded as\n", - "\n", - "```{math}\n", - "\\ket{\\Psi} = \\sum_{j=1}^{d^A }\\sum_{k=1}^{d^B} \\Psi_{jk} \\ket{j,k}\n", - "```\n", - "\n", - "The expansion coefficients $\\Psi_{jk}$ thus have two indices, and it is often useful to\n", - "think of them as a matrix. Note that we will almost always use this product basis, also\n", - "referred to as the *computational basis*, for working with tensor product spaces. However,\n", - "one can certainly also use more complicated basis choices, where the basis vectors are not\n", - "simple product states. One well known choice that you might remember from your quantum\n", - "mechanics course is in the case of two spin-1/2 systems. If we denote the basis for a single\n", - "spin-1/2 system as $\\{\\ket{\\uparrow},\\ket{\\downarrow}\\}$, then the product basis for a\n", - "system consisting of two spin-1/2 systems is given by $\\{\\ket{\\uparrow,\\uparrow},\n", - "\\ket{\\downarrow,\\uparrow}, \\ket{\\uparrow,\\downarrow}, \\ket{\\downarrow,\\downarrow}, \\}$.\n", - "However, in the context of spin coupling (see Section on Symmetries), one also uses the\n", - "coupled basis\n", - "\n", - "```{math}\n", - "\\ket{0,0} &= \\frac{1}{\\sqrt{2}} \\left(\\ket{\\uparrow,\\downarrow} - \\ket{\\downarrow,\\uparrow}\\right)\\\\\n", - "\\ket{1,+1} &= \\ket{\\uparrow,\\uparrow}\\\\\n", - "\\ket{1,0} &= \\frac{1}{\\sqrt{2}} \\left(\\ket{\\uparrow,\\downarrow} + \\ket{\\downarrow,\\uparrow}\\right)\\\\\n", - "\\ket{1,-1} &= \\ket{\\downarrow,\\downarrow}\n", - "```\n", - "\n", - "Note that we also use the same tensor product notation as an operation to map operators from\n", - "the subsystems into operators acting on the full tensor product Hilbert space. In\n", - "particular, the process of measuring operator $\\hat{A}$ in subsystem $A$ and simultaneously\n", - "operator $\\hat{B}$ in subsystem $B$ is associated with an operator $\\hat{A}\\otimes \\hat{B}$\n", - "acting on $\\mathbb{H}^A \\otimes \\mathbb{H}^B$, the action of which is first defined on the\n", - "product states as\n", - "\n", - "```{math}\n", - "\\left(\\hat{A} \\otimes \\hat{B}\\right) \\left(\\ket{\\psi^A}\\otimes \\ket{\\varphi^B}\\right) = \\left(\\hat{A}\\ket{\\psi^A}\\right) \\otimes \\left(\\hat{B}\\ket{\\varphi^B}\\right)\n", - "```\n", - "\n", - "and then extended by linearity. It furthermore holds that\n", - "\n", - "```{math}\n", - "(\\hat{A}_1 \\otimes \\hat{B}_1) (\\hat{A}_2 \\otimes \\hat{B}_2) = (\\hat{A}_1 \\hat{A}_2) \\otimes (\\hat{B}_1 \\hat{B}_2).\n", - "```\n", - "\n", - "With respect to a product basis, the matrix representation of $\\left(\\hat{A} \\otimes\n", - "\\hat{B}\\right)$ is given by the\n", - "[Kronecker product](https://en.wikipedia.org/wiki/Kronecker_product).\n", - "\n", - "When we are only interested in an operator $\\hat{O}$ acting on subsystem $A$ without doing\n", - "anything on subsystem $B$, we should create the operator $\\hat{O} \\otimes \\hat{1}_B$, with\n", - "$\\hat{1}_B$ the identity operator of the Hilbert space $\\mathbb{H}^B$. Often, we will omit\n", - "this explicit tensor product with the identity operator, and simply use some notation which\n", - "indicates that an operator acts on a certain subsystem, such as $\\hat{O}^{(A)} = \\hat{O}\n", - "\\otimes \\hat{1}_B$. This also makes it explicit that operators defined on different\n", - "subsystems, when lifted to act on the full Hilbert space, commute, i.e.\n", - "\n", - "```{math}\n", - "\\left[\\hat{O}_1^{(A)} , \\hat{O}_2^{(B)}\\right] =\n", - "\\left[ \\hat{O}_1 \\otimes \\hat{1}_B, \\hat{1}_A \\otimes \\hat{O}_2\\right] = 0.\n", - "```\n", - "\n", - "The tensor product construction extends readily to systems with multiple subsystems.\n", - "Consider for example a system consisting of qubits, where every individual qubit has an\n", - "associated Hilbert space $\\mathbb{C}^2$ with basis denoted as $\\{\\ket{0},\\ket{1}\\}$. The\n", - "Hilbert space $\\mathbb{H}^N$ of $N$ qubits is then spanned by a computational basis which we\n", - "can denote as\n", - "\n", - "```{math}\n", - "\\{\\ket{s_1, s_2, \\ldots, s_N} = \\ket{s_1} \\otimes \\ket{s_2} \\otimes \\cdots \\otimes\n", - "\\ket{s_N}; s_1 =0,1; s_2 =0,1; \\ldots; s_n =0,1\\}.\n", - "```\n", - "\n", - "Hence, the Hilbert space thus has dimension $2^N$, and a general state $\\ket{\\Psi}$ has\n", - "expansion coefficients\n", - "\n", - "```{math}\n", - "\\Psi_{s_1,s_2, \\ldots, s_N}\n", - "```\n", - "\n", - "which can be interpreted as a single vector of length $2^N$, or as a $N$-dimensional tensor,\n", - "where every tensor index ranges over the two values 0 and 1. This exponential increase of\n", - "the Hilbert space dimension with the number of particles is exactly why the quantum\n", - "many-body problem is so difficult, but also essential for providing a quantum computer with\n", - "its speed-up. It is exactly these type of quantum states living in a many-body Hilbert\n", - "space, which is thus composed of many tensor product factors, that we will represent as a\n", - "tensor network.\n", - "\n", - "Finally, we also have to specify the Hamiltonian of a many-body system. It typically takes\n", - "the form of a sum of terms, where every individual term acts nontrivially on only a few\n", - "subsystems. One important example that will reappear throughout these tutorials is the\n", - "\"Quantum Ising Model with transverse magnetic field\", which acts on a system composed of\n", - "qubits or spin-1/2 particles, and is defined as\n", - "\n", - "```{math}\n", - "\\hat{H} = - J \\sum_{\\langle i, j \\rangle} \\sigma^z_i \\otimes \\sigma^z_j - h \\sum_i\n", - "\\sigma^x_i\n", - "```\n", - "\n", - "Here, the summation variables $i$ and $j$ correspond to the sites of a lattice. The notation\n", - "$\\sum_{\\langle i,j \\rangle}$ denotes a sum over pairs of neighbouring lattice sites $i$ and\n", - "$j$. The second sum contains terms $\\sigma^x_i$ which act nontrivially only on the site $i$,\n", - "and as the identity operator elsewhere. If, for example, we enumerate the sites from $1$ to\n", - "$N$, it would act as\n", - "\n", - "```{math}\n", - "\\sigma^x_i = \\underbrace{1 \\otimes 1 \\otimes \\ldots \\otimes 1}_{\\text{$i-1$ factors}} \\otimes \\sigma^x \\otimes \\underbrace{1 \\otimes \\ldots \\otimes 1}_{\\text{$N-i-1$ factors}}\n", - "```\n", - "\n", - "with $\\sigma^x = \\begin{bmatrix} 0 & 1 \\\\ 1 & 0 \\end{bmatrix}$ the Pauli x matrix, and $1$\n", - "the $2 x 2$ unit matrix. The first set of terms in $\\hat{H}$ acts nontrivially on two sites,\n", - "and is defined analoguously, using the Pauli z matrices $\\sigma^z = \\begin{bmatrix} 1 & 0 \\\\\n", - "0 & -1 \\end{bmatrix}$.\n", - "\n", - "## Identical Particles and Pauli's Exclusion Principle\n", - "\n", - "The tensor product construction needs to be revised when discussing the Hilbert space of a\n", - "system composed of identical particles. Consider for example a system made out of $N$\n", - "identical particles. To every individual particle we can associate a particular Hilbert\n", - "space, which we denote as $\\mathbb{H}^{(1)}$, for example $\\mathbb{H}^{(1)} =\n", - "L^2(\\mathbb{R})$ for a particle moving on the real line, or $\\mathbb{H}^{(1)} =\n", - "\\mathbb{C}^L$ for a particle living on the sites of a chain of length $L$.\n", - "\n", - "If we temporarily assign each of the $N$ particles a label $n=1, \\dots, N$, then the Hilbert\n", - "space of the composite system would be given by the $N$-fold tensor product\n", - "$\\widetilde{\\mathbb{H}}^{(N)} = \\left(\\mathbb{H}^{(1)}\\right)^{\\otimes N}$. However, for\n", - "identical particles, our labeling is completely arbitrary. For the case of $N=2$ particles\n", - "on a chain of $L$ sites, we cannot distinguish between the state $\\ket{j_1, j_2}$ where\n", - "particle $1$ is on site $j_1$ and particle $2$ is on site $j_2$ versus the state $\\ket{j_2,\n", - "j_1}$ where site $j_1$ is occupied by the particle that we gave label $2$ and site $j_2$ is\n", - "occupied by the particle with label $1$. A general redefinition of the particle labels\n", - "amounts to a permutation, and we have to require that no physical measurement can\n", - "distinguish between such permutations. Hence, this permutation invariance does not behave\n", - "like a regular symmetry (like e.g. rotation symmetry, one can still construct observables\n", - "along preferred directions such that they can detect rotations).\n", - "\n", - "We are forced to restrict our tensor product Hilbert space\n", - "$\\left(\\mathbb{H}^{(1)}\\right)^{\\otimes N}$ to the subspace $\\mathbb{H}^{(N)}$ of physical\n", - "states which are not affected by acting with such permutations. Note that, due to the fact\n", - "that quantum states actually correspond to rays of vectors, it is still allowed that the\n", - "vectors in $\\mathbb{H}^{(N)}$ pick up a phase factor when applying certain permutations. It\n", - "is a result in the representation theory of the permutation group that there are only two\n", - "possibilities. Either the phase factor is always absent (or thus 1), or the phase factor is\n", - "(-1) for odd permutations and (+1) for even permutations, i.e. the phase factor equals the\n", - "sign(ature) of the permutation. Identical particles for which the phase factor is always one\n", - "are known as *bosons*, whereas those with the nontrival phase factor choice correspond to\n", - "*fermions*. Indeed, the nontrivial phase factor automatically gives rise to *Pauli's\n", - "exclusion principle*: two fermions cannot be in the same quantum state, since $P_{12}\n", - "\\ket{j_1,j_2} = \\ket{j_2,j_1} = -\\ket{j_1,j_2}$ and for $j_1=j_2$ we would thus find\n", - "$\\ket{j,j} = -\\ket{j,j}$.\n", - "\n", - "Bosons are thus described by states which are symmetric under permutations, whereas fermions\n", - "are described by states which are called antisymmetric. We can define an operator on\n", - "$\\tilde{\\mathbb{H}}^{(N)} = \\left(\\mathbb{H}^{(1)}\\right)^{\\otimes N}$ that maps any given\n", - "state onto such a (anti)symmeric state, namely by first defining its action on product\n", - "states as\n", - "\n", - "```{math}\n", - "\\hat{S}^{\\pm} \\ket{\\psi_1} \\otimes \\ket{\\psi_2} \\otimes \\cdots \\otimes \\ket{\\psi_N} =\n", - "\\frac{1}{\\sqrt{N!}} \\sum_{\\sigma \\in S_N} \\epsilon_\\sigma \\ket{\\psi_{\\sigma(1)}} \\otimes\n", - "\\ket{\\psi_{\\sigma(2)}} \\otimes \\cdots \\otimes \\ket{\\psi_{\\sigma(N)}}\n", - "```\n", - "\n", - "and then extending it by linearity. Here, $S_N$ is the symmetric group containing all\n", - "permutations $\\sigma$ of $N$ elements, where the permutation $\\sigma$ is a bijective map\n", - "from integers $j \\in \\{1,\\dots,N\\}$ to a new number $\\sigma(j) \\in \\{1,\\dots,N\\}$. The\n", - "sign(ature) $\\epsilon_\\sigma$ of the permutation takes the value $+1$ or $-1$, depending on\n", - "whether the permutation $\\sigma$ can be obtained by composing an even or odd number of\n", - "elementary transpositions. An elementary transposition $\\tau_{i,j}$ is a permutation which\n", - "only interchanges the two numbers $i$ and $j \\neq i$:\n", - "\n", - "```{math}\n", - "\\tau_{i,j}(i) =j, \\tau_{i,j}(j) = i, \\tau_{i,j}(k) =k, \\forall k\\neq i \\land k \\neq j\n", - "```\n", - "\n", - "Note that $\\hat{S}^{\\pm}$ does not necessarily yield a normalised state, and can indeed even\n", - "map a state to zero, in order to give rise to Pauli's exclusion principle:\n", - "$\\hat{S}^-\\ket{j,j} = 0$. The image of $\\hat{S}^{\\pm}$ contains all states with the proper\n", - "behaviour under relabeling permutations, and thus correspond to the physical Hilbert space\n", - "for bosons or fermions:\n", - "\n", - "```{math}\n", - "\\mathbb{H}^{(N)} = \\hat{S}^{\\pm} \\widetilde{\\mathbb{H}}^{(N)} = \\hat{S}^{\\pm} \\left(\\mathbb{H}^{(1)}\\right)^{\\otimes N}\n", - "```\n", - "\n", - "Note that in this case, the physical Hilbert space is not a tensor product. However, we can\n", - "think of it as a subspace of an auxiliary Hilbert space, $ \\widetilde{\\mathbb{H}}^{(N)}$,\n", - "which is a tensor product. The restriction to this subspace can thus be thought of as a\n", - "constraint, and the same scenario happens in other constrained quantum systems. The most\n", - "notable example is that of quantum gauge theories, where there is an extensive set of\n", - "constraints, namely that physical quantum states need to be gauge invariant.\n", - "\n", - "Now consider a single particle Hilbert space $\\mathbb{H}^{(1)}$ with an orthonormal basis\n", - "$\\{\\ket{j}, j=1,\\ldots,L\\}$, for example where $\\ket{j}$ corresponds to the particle being\n", - "positioned on site $j$ of a lattice with $L$ sites. We also refer to these single particle\n", - "states as modes. To construct a basis for $\\mathbb{H}^{(N)}$, we can start from the tensor\n", - "product basis of $\\widetilde{\\mathbb{H}}^{(N)}$ and apply $\\hat{S}^{\\pm}$ to each of its\n", - "$L^N$ elements. Let us henceforth denote these states as\n", - "\n", - "```{math}\n", - "\\ket{j_1,j_2,\\ldots ,j_N} = \\hat{S}^{\\pm} \\left(\\ket{j_1} \\otimes \\ket{j_2} \\otimes \\cdots\n", - "\\otimes \\ket{j_N}\\right)\n", - "```\n", - "\n", - "The application of $\\hat{S}^{\\pm}$ will create certain linear dependences. In particular,\n", - "states $ \\ket{j_1,j_2, \\ldots, j_N}$ that contain the same set of modes $j_k$, i.e. for\n", - "which the $j_k$'s are related by a permutation, are equal (up to a sign in the case of\n", - "$\\hat{S}^-$). We can thus select a single state by ordering the $j_k$ arguments.\n", - "Furthermore, in the case of $\\hat{S}^{-}$, the state is mapped to zero as soon as two $j_k$\n", - "values coincide, so we can eliminate such states. If we thus restrict the set to states\n", - "$\\ket{j_1,j_2,\\ldots ,j_N}$ which are such that the modes are ordered as $j_1 < j_2 < \\ldots\n", - "< j_N$ (for fermions) or $j_1 \\leq j_2 \\leq \\ldots \\leq j_N$ (for bosons), then we have a\n", - "linearly independent set of states. For fermions, this implies in particular that we need to\n", - "have $N \\leq L$, there cannot be more fermions in the system then there are linearly\n", - "independent modes (single particle states).\n", - "\n", - "Finally, one can wonder about the normalisation of these states. For fermions, the\n", - "superposition created by $\\hat{S}^-$ contains $N!$ terms, which are mutually orthogonal, so\n", - "that the resulting state is normalised, because of the $1/\\sqrt{N!}$ prefactor in the\n", - "definition of $\\hat{S}^{-}$. More generally, one then finds\n", - "\n", - "```{math}\n", - "\\braket{i_1 < i_2 < \\ldots < i_N | j_1 < j_2 < \\ldots < j_N} = \\delta_{i_1,j_1}\n", - "\\delta_{i_2,j_2} \\cdots \\delta_{i_N,j_N}\n", - "```\n", - "\n", - "For bosons, the situation is more complicated in the case that some $j_k$ values coincide.\n", - "Some of the $N!$ terms created by $\\hat{S}^+$ are then equal and contribute differently to\n", - "the norm. If we denote with $n_1, n_2, \\ldots, n_L$ the number of $j$ values that equal the\n", - "value $1, 2, \\ldots, L$, i.e. the number of particles in mode $1, 2, \\ldots, L$, then we\n", - "find\n", - "\n", - "```{math}\n", - "\\braket{i_1 \\leq i_2 \\leq \\ldots \\leq i_N | j_1 \\leq j_2 \\leq \\ldots \\leq j_N} = (n_1! n_2!\n", - "\\cdots n_L!) \\delta_{i_1,j_1} \\delta_{i_2,j_2} \\cdots \\delta_{i_N,j_N}\n", - "```\n", - "\n", - "This more general exprression is also valid for fermions, where every $n_j$ is restricted to\n", - "be zero or one. In fact, the values $n_j$ for $j=1,\\ldots,L$ completely characterise the\n", - "state, and can thus be used to relabel the basis. Instead of specifying the mode $j_k$ that\n", - "each particle $k=1,\\ldots,N$ occupies (where the labeling of the particles is arbitrary\n", - "because they are identical), we can move to a mode-based description and thus specify the\n", - "number of particles in each mode, also known as the mode occupation number. We can then\n", - "refer to the basis vectors as\n", - "\n", - "```{math}\n", - "\\ket{n_1, n_2, \\ldots, n_L}\n", - "```\n", - "\n", - "where $n_j = 0, 1$ (fermions) or $n_j = 0,1,2, \\ldots $ (bosons) and furthermore\n", - "$\\sum_{j=1}^{L} n_j = N$. Furthermore, we define these states to be normalised to 1, i.e. we\n", - "absorb a suitable normalisation factor when defining $\\ket{n_1, n_2, \\ldots, n_L}$ in terms\n", - "of the construction above.\n", - "\n", - "This way of labelling the basis states now is again reminiscent of a tensor product\n", - "structure, i.e. we could think of $\\ket{n_1, n_2, \\ldots, n_L}$ as the tensor product of\n", - "states $\\ket{n_j}$ associated to every mode, and where the Hilbert space associated with\n", - "such a mode is two-dimensional in the case of fermions, or infinite-dimensional in the case\n", - "of bosons. However, there is still a global constraint $\\sum_{j=1}^{L} n_j = N$ so that we\n", - "cannot let the different $n_j$ values vary completely independently from each other.\n", - "Furthermore, some caution is now needed as to what it means to have operators acting on\n", - "these different \"mode Hilbert spaces\". The correct formalism is that of second quantisation,\n", - "which we introduce next.\n", - "\n", - "```{note}\n", - "In many applications, people do still work with the framework of first quantisation, and\n", - "consider $N$-particle states constructed by symmetrising or antisymmetrising the tensor\n", - "product of $N$ single-particle states, in a so-called independent particle model or\n", - "approximation. Such states are quite cumbersome to work with. As can already be seen, the\n", - "antisymmetric case is slightly easier and is known as a Slater determinant. Indeed, the\n", - "antisymmetrisation formula is reminiscent of the Leibniz formula of a determinant, and for\n", - "example the inner product between two Slater determinants constructed from\n", - "$\\{\\ket{\\psi_n},n=1,\\ldots,N\\}$ and $\\{\\ket{\\varphi_n},n=1,\\ldots,N\\}$ is given by the\n", - "determinant of the matrix containing all overlaps $\\braket{\\varphi_m \\vert \\psi_n}$. Slater\n", - "determinants form the basis of Hartree-Fock theory for approximating the state of electrons\n", - "in an atom or molecule.\n", - "\n", - "The bosonic version occurs in the context of Bose-Einstein condensation and cold atom\n", - "systems more generally. In that case, the inner product between two such states gives rise\n", - "to a determinant-like formula, but without the minus signs. This construction is known as\n", - "the permenant, but unlike the determinant it is very hard to compute in general and really\n", - "requires to explicitly sum up all $N!$ terms.\n", - "```" - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/1-Introduction/ManyBody.md b/pr-preview/pr-27/_sources/1-Introduction/ManyBody.md deleted file mode 100644 index 85455b2a..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/ManyBody.md +++ /dev/null @@ -1,377 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(many_body)= -# The Hilbert Space of Many-Body Physics - -All of the previous axioms remain valid for a composite system consisting of several quantum -degrees of freedom. However, we need to know how to describe the state of the system, and -thus more specifically, how to define the Hilbert space associated to such a system. It -turns out that quantum mechanics forces us to distinguish two cases. - -## Distinguisable Particles and Tensor Products - -Consider a quantum system composed out of two subsystems, which we call $A$ and $B$, -sometimes referred to as Alice and Bob in quantum information contexts. These can themselves -already be many-body systems. Suppose we know the Hilbert space $\mathbb{H}^A$ in which to -describe states of subsystem $A$ when considered as an isolated system on itself, and -analoguously for $\mathbb{H}^B$. Now consider both systems together, but where they do not -interact, so that we can still treat them independently. In particular, we can prepare -subsystem $A$ in a state $\ket{\psi^A}$ and subsystem $B$ in a state $\ket{\psi^B}$. We -should also be able to describe these two independent subsystems jointly, so that there must -exist a map from the two arguments $(\ket{\psi^A}, \ket{\varphi^B}) \in \mathbb{H}^A \times -\mathbb{H}^B$ to a single state which we denote as $\ket{ \psi^A} \otimes \ket{\varphi^B}$ -and that lives in a joint Hilbert space $\mathbb{H}^{AB}$ that we have yet to determine. - -Now, it makes sense that, if we build superpositions in one of the two subsystems, while -keeping the other fixed, this also correspond to a superposition in the joint description of -both systems together. This leads to - -```{math} -\left (a_1 \ket{\psi^A_1} + a_2 \ket{\psi^A_2}\right) \otimes \ket{\varphi^B} = a_1 -\ket{\psi^A_1 }\otimes \ket{\varphi^B} + a_2 \ket{\psi^A_1 }\otimes \ket{\varphi^B} -``` - -and similarly - -```{math} -\ket{\psi^A} \otimes \left(b_1 \ket{\varphi^B_1} + b_2 \ket{\varphi^A_2}\right) = b_1 -\ket{\psi^A }\otimes \ket{\varphi^B_1} + b_2 \ket{\psi^A }\otimes \ket{\varphi^B_2}. -``` - -Hence, the Hilbert space $\mathbb{H}^{AB}$ that we are trying to construct must contain all -states $\ket{\psi^A} \otimes \ket{\varphi^B}$ for all $\ket{\psi^A} \in \mathbb{H}^A$ and -all $\ket{\varphi^B} \in \mathbb{H}^B$, all possible linear combinations thereof (in order -to be a vector space), but in such a way that the above equalities hold. This construction, -which can be made mathematically precise, is known as the tensor product of vector spaces -$\mathbb{H}^{AB} = \mathbb{H}^A \otimes \mathbb{H}^B$. - -We have also denoted the output of the map from two states $(\ket{\psi^A}, \ket{\varphi^B}) -\in \mathbb{H}^A \times \mathbb{H}^B$ to $\mathbb{H}^A \otimes \mathbb{H}^B$ using the same -tensor product symbol, and refer to such a state as a (tensor) product state $\ket{ \psi^A} -\otimes \ket{\varphi^B}$. Importantly, however, the tensor product space $\mathbb{H}^A -\otimes \mathbb{H}^B$ certainly contains vectors which are not product states, such as - -```{math} -a_1 \ket{ \psi_1^A} \otimes \ket{\varphi_1^B} + a_2 \ket{ \psi_2^A} \otimes -\ket{\varphi_2^B}. -``` - -This forms the basis for quantum correlations and the concept of (quantum) entanglement, -which will be a fundamental property of quantum many-body systems. That the Hilbert space of -a composite system is given by the tensor product of the individual Hilbert spaces is often -introduced as a separate axiom. The deductive (but informal) argument just given can however -be turned into a proof that depends only on the axioms given above (in fact only on the -first two). - -As expected (and required), it can be shown that the tensor product of two Hilbert spaces is -again a Hilbert space, if we define its inner product in the following way. We first define -the inner product for product states as - -```{math} -\braket{\psi_1^A \otimes \varphi_1^B | \psi_2^A \otimes \varphi_2^B } = \braket{\psi_1^A | -\psi_2^A} \braket{\varphi_1^B | \varphi_2^B} -``` - -and then extend this definition by linearity (in the second argument and antilinearity in -the first argument). - -In practice, given two finite-dimensional Hilbert spaces $\mathbb{H}^A \cong -\mathbb{C}^{d^A}$ and $\mathbb{H}^B \cong \mathbb{C}^{d^B}$ with a basis $\{ \ket{j}, -j=1,\dots, d^A\}$ and $\{\ket{k}, k=1,\dots, d^B\}$, the tensor product space is spanned by -a basis composed of all products - -```{math} -\{ \ket{j,k} = \ket{j} \otimes \ket{k}, j=1,\dots, d^A, k=1,\dots, d^B\} -``` - -and thus has dimension $d^A \cdot d^B$. A general state $\ket{\Psi} \in -\mathbb{H}^{A}\otimes \mathbb{H}^B$ can then be expanded as - -```{math} -\ket{\Psi} = \sum_{j=1}^{d^A }\sum_{k=1}^{d^B} \Psi_{jk} \ket{j,k} -``` - -The expansion coefficients $\Psi_{jk}$ thus have two indices, and it is often useful to -think of them as a matrix. Note that we will almost always use this product basis, also -referred to as the *computational basis*, for working with tensor product spaces. However, -one can certainly also use more complicated basis choices, where the basis vectors are not -simple product states. One well known choice that you might remember from your quantum -mechanics course is in the case of two spin-1/2 systems. If we denote the basis for a single -spin-1/2 system as $\{\ket{\uparrow},\ket{\downarrow}\}$, then the product basis for a -system consisting of two spin-1/2 systems is given by $\{\ket{\uparrow,\uparrow}, -\ket{\downarrow,\uparrow}, \ket{\uparrow,\downarrow}, \ket{\downarrow,\downarrow}, \}$. -However, in the context of spin coupling (see Section on Symmetries), one also uses the -coupled basis - -```{math} -\ket{0,0} &= \frac{1}{\sqrt{2}} \left(\ket{\uparrow,\downarrow} - \ket{\downarrow,\uparrow}\right)\\ -\ket{1,+1} &= \ket{\uparrow,\uparrow}\\ -\ket{1,0} &= \frac{1}{\sqrt{2}} \left(\ket{\uparrow,\downarrow} + \ket{\downarrow,\uparrow}\right)\\ -\ket{1,-1} &= \ket{\downarrow,\downarrow} -``` - -Note that we also use the same tensor product notation as an operation to map operators from -the subsystems into operators acting on the full tensor product Hilbert space. In -particular, the process of measuring operator $\hat{A}$ in subsystem $A$ and simultaneously -operator $\hat{B}$ in subsystem $B$ is associated with an operator $\hat{A}\otimes \hat{B}$ -acting on $\mathbb{H}^A \otimes \mathbb{H}^B$, the action of which is first defined on the -product states as - -```{math} -\left(\hat{A} \otimes \hat{B}\right) \left(\ket{\psi^A}\otimes \ket{\varphi^B}\right) = \left(\hat{A}\ket{\psi^A}\right) \otimes \left(\hat{B}\ket{\varphi^B}\right) -``` - -and then extended by linearity. It furthermore holds that - -```{math} -(\hat{A}_1 \otimes \hat{B}_1) (\hat{A}_2 \otimes \hat{B}_2) = (\hat{A}_1 \hat{A}_2) \otimes (\hat{B}_1 \hat{B}_2). -``` - -With respect to a product basis, the matrix representation of $\left(\hat{A} \otimes -\hat{B}\right)$ is given by the -[Kronecker product](https://en.wikipedia.org/wiki/Kronecker_product). - -When we are only interested in an operator $\hat{O}$ acting on subsystem $A$ without doing -anything on subsystem $B$, we should create the operator $\hat{O} \otimes \hat{1}_B$, with -$\hat{1}_B$ the identity operator of the Hilbert space $\mathbb{H}^B$. Often, we will omit -this explicit tensor product with the identity operator, and simply use some notation which -indicates that an operator acts on a certain subsystem, such as $\hat{O}^{(A)} = \hat{O} -\otimes \hat{1}_B$. This also makes it explicit that operators defined on different -subsystems, when lifted to act on the full Hilbert space, commute, i.e. - -```{math} -\left[\hat{O}_1^{(A)} , \hat{O}_2^{(B)}\right] = -\left[ \hat{O}_1 \otimes \hat{1}_B, \hat{1}_A \otimes \hat{O}_2\right] = 0. -``` - -The tensor product construction extends readily to systems with multiple subsystems. -Consider for example a system consisting of qubits, where every individual qubit has an -associated Hilbert space $\mathbb{C}^2$ with basis denoted as $\{\ket{0},\ket{1}\}$. The -Hilbert space $\mathbb{H}^N$ of $N$ qubits is then spanned by a computational basis which we -can denote as - -```{math} -\{\ket{s_1, s_2, \ldots, s_N} = \ket{s_1} \otimes \ket{s_2} \otimes \cdots \otimes -\ket{s_N}; s_1 =0,1; s_2 =0,1; \ldots; s_n =0,1\}. -``` - -Hence, the Hilbert space thus has dimension $2^N$, and a general state $\ket{\Psi}$ has -expansion coefficients - -```{math} -\Psi_{s_1,s_2, \ldots, s_N} -``` - -which can be interpreted as a single vector of length $2^N$, or as a $N$-dimensional tensor, -where every tensor index ranges over the two values 0 and 1. This exponential increase of -the Hilbert space dimension with the number of particles is exactly why the quantum -many-body problem is so difficult, but also essential for providing a quantum computer with -its speed-up. It is exactly these type of quantum states living in a many-body Hilbert -space, which is thus composed of many tensor product factors, that we will represent as a -tensor network. - -Finally, we also have to specify the Hamiltonian of a many-body system. It typically takes -the form of a sum of terms, where every individual term acts nontrivially on only a few -subsystems. One important example that will reappear throughout these tutorials is the -"Quantum Ising Model with transverse magnetic field", which acts on a system composed of -qubits or spin-1/2 particles, and is defined as - -```{math} -\hat{H} = - J \sum_{\langle i, j \rangle} \sigma^z_i \otimes \sigma^z_j - h \sum_i -\sigma^x_i -``` - -Here, the summation variables $i$ and $j$ correspond to the sites of a lattice. The notation -$\sum_{\langle i,j \rangle}$ denotes a sum over pairs of neighbouring lattice sites $i$ and -$j$. The second sum contains terms $\sigma^x_i$ which act nontrivially only on the site $i$, -and as the identity operator elsewhere. If, for example, we enumerate the sites from $1$ to -$N$, it would act as - -```{math} -\sigma^x_i = \underbrace{1 \otimes 1 \otimes \ldots \otimes 1}_{\text{$i-1$ factors}} \otimes \sigma^x \otimes \underbrace{1 \otimes \ldots \otimes 1}_{\text{$N-i-1$ factors}} -``` - -with $\sigma^x = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$ the Pauli x matrix, and $1$ -the $2 x 2$ unit matrix. The first set of terms in $\hat{H}$ acts nontrivially on two sites, -and is defined analoguously, using the Pauli z matrices $\sigma^z = \begin{bmatrix} 1 & 0 \\ -0 & -1 \end{bmatrix}$. - -## Identical Particles and Pauli's Exclusion Principle - -The tensor product construction needs to be revised when discussing the Hilbert space of a -system composed of identical particles. Consider for example a system made out of $N$ -identical particles. To every individual particle we can associate a particular Hilbert -space, which we denote as $\mathbb{H}^{(1)}$, for example $\mathbb{H}^{(1)} = -L^2(\mathbb{R})$ for a particle moving on the real line, or $\mathbb{H}^{(1)} = -\mathbb{C}^L$ for a particle living on the sites of a chain of length $L$. - -If we temporarily assign each of the $N$ particles a label $n=1, \dots, N$, then the Hilbert -space of the composite system would be given by the $N$-fold tensor product -$\widetilde{\mathbb{H}}^{(N)} = \left(\mathbb{H}^{(1)}\right)^{\otimes N}$. However, for -identical particles, our labeling is completely arbitrary. For the case of $N=2$ particles -on a chain of $L$ sites, we cannot distinguish between the state $\ket{j_1, j_2}$ where -particle $1$ is on site $j_1$ and particle $2$ is on site $j_2$ versus the state $\ket{j_2, -j_1}$ where site $j_1$ is occupied by the particle that we gave label $2$ and site $j_2$ is -occupied by the particle with label $1$. A general redefinition of the particle labels -amounts to a permutation, and we have to require that no physical measurement can -distinguish between such permutations. Hence, this permutation invariance does not behave -like a regular symmetry (like e.g. rotation symmetry, one can still construct observables -along preferred directions such that they can detect rotations). - -We are forced to restrict our tensor product Hilbert space -$\left(\mathbb{H}^{(1)}\right)^{\otimes N}$ to the subspace $\mathbb{H}^{(N)}$ of physical -states which are not affected by acting with such permutations. Note that, due to the fact -that quantum states actually correspond to rays of vectors, it is still allowed that the -vectors in $\mathbb{H}^{(N)}$ pick up a phase factor when applying certain permutations. It -is a result in the representation theory of the permutation group that there are only two -possibilities. Either the phase factor is always absent (or thus 1), or the phase factor is -(-1) for odd permutations and (+1) for even permutations, i.e. the phase factor equals the -sign(ature) of the permutation. Identical particles for which the phase factor is always one -are known as *bosons*, whereas those with the nontrival phase factor choice correspond to -*fermions*. Indeed, the nontrivial phase factor automatically gives rise to *Pauli's -exclusion principle*: two fermions cannot be in the same quantum state, since $P_{12} -\ket{j_1,j_2} = \ket{j_2,j_1} = -\ket{j_1,j_2}$ and for $j_1=j_2$ we would thus find -$\ket{j,j} = -\ket{j,j}$. - -Bosons are thus described by states which are symmetric under permutations, whereas fermions -are described by states which are called antisymmetric. We can define an operator on -$\tilde{\mathbb{H}}^{(N)} = \left(\mathbb{H}^{(1)}\right)^{\otimes N}$ that maps any given -state onto such a (anti)symmeric state, namely by first defining its action on product -states as - -```{math} -\hat{S}^{\pm} \ket{\psi_1} \otimes \ket{\psi_2} \otimes \cdots \otimes \ket{\psi_N} = -\frac{1}{\sqrt{N!}} \sum_{\sigma \in S_N} \epsilon_\sigma \ket{\psi_{\sigma(1)}} \otimes -\ket{\psi_{\sigma(2)}} \otimes \cdots \otimes \ket{\psi_{\sigma(N)}} -``` - -and then extending it by linearity. Here, $S_N$ is the symmetric group containing all -permutations $\sigma$ of $N$ elements, where the permutation $\sigma$ is a bijective map -from integers $j \in \{1,\dots,N\}$ to a new number $\sigma(j) \in \{1,\dots,N\}$. The -sign(ature) $\epsilon_\sigma$ of the permutation takes the value $+1$ or $-1$, depending on -whether the permutation $\sigma$ can be obtained by composing an even or odd number of -elementary transpositions. An elementary transposition $\tau_{i,j}$ is a permutation which -only interchanges the two numbers $i$ and $j \neq i$: - -```{math} -\tau_{i,j}(i) =j, \tau_{i,j}(j) = i, \tau_{i,j}(k) =k, \forall k\neq i \land k \neq j -``` - -Note that $\hat{S}^{\pm}$ does not necessarily yield a normalised state, and can indeed even -map a state to zero, in order to give rise to Pauli's exclusion principle: -$\hat{S}^-\ket{j,j} = 0$. The image of $\hat{S}^{\pm}$ contains all states with the proper -behaviour under relabeling permutations, and thus correspond to the physical Hilbert space -for bosons or fermions: - -```{math} -\mathbb{H}^{(N)} = \hat{S}^{\pm} \widetilde{\mathbb{H}}^{(N)} = \hat{S}^{\pm} \left(\mathbb{H}^{(1)}\right)^{\otimes N} -``` - -Note that in this case, the physical Hilbert space is not a tensor product. However, we can -think of it as a subspace of an auxiliary Hilbert space, $ \widetilde{\mathbb{H}}^{(N)}$, -which is a tensor product. The restriction to this subspace can thus be thought of as a -constraint, and the same scenario happens in other constrained quantum systems. The most -notable example is that of quantum gauge theories, where there is an extensive set of -constraints, namely that physical quantum states need to be gauge invariant. - -Now consider a single particle Hilbert space $\mathbb{H}^{(1)}$ with an orthonormal basis -$\{\ket{j}, j=1,\ldots,L\}$, for example where $\ket{j}$ corresponds to the particle being -positioned on site $j$ of a lattice with $L$ sites. We also refer to these single particle -states as modes. To construct a basis for $\mathbb{H}^{(N)}$, we can start from the tensor -product basis of $\widetilde{\mathbb{H}}^{(N)}$ and apply $\hat{S}^{\pm}$ to each of its -$L^N$ elements. Let us henceforth denote these states as - -```{math} -\ket{j_1,j_2,\ldots ,j_N} = \hat{S}^{\pm} \left(\ket{j_1} \otimes \ket{j_2} \otimes \cdots -\otimes \ket{j_N}\right) -``` - -The application of $\hat{S}^{\pm}$ will create certain linear dependences. In particular, -states $ \ket{j_1,j_2, \ldots, j_N}$ that contain the same set of modes $j_k$, i.e. for -which the $j_k$'s are related by a permutation, are equal (up to a sign in the case of -$\hat{S}^-$). We can thus select a single state by ordering the $j_k$ arguments. -Furthermore, in the case of $\hat{S}^{-}$, the state is mapped to zero as soon as two $j_k$ -values coincide, so we can eliminate such states. If we thus restrict the set to states -$\ket{j_1,j_2,\ldots ,j_N}$ which are such that the modes are ordered as $j_1 < j_2 < \ldots -< j_N$ (for fermions) or $j_1 \leq j_2 \leq \ldots \leq j_N$ (for bosons), then we have a -linearly independent set of states. For fermions, this implies in particular that we need to -have $N \leq L$, there cannot be more fermions in the system then there are linearly -independent modes (single particle states). - -Finally, one can wonder about the normalisation of these states. For fermions, the -superposition created by $\hat{S}^-$ contains $N!$ terms, which are mutually orthogonal, so -that the resulting state is normalised, because of the $1/\sqrt{N!}$ prefactor in the -definition of $\hat{S}^{-}$. More generally, one then finds - -```{math} -\braket{i_1 < i_2 < \ldots < i_N | j_1 < j_2 < \ldots < j_N} = \delta_{i_1,j_1} -\delta_{i_2,j_2} \cdots \delta_{i_N,j_N} -``` - -For bosons, the situation is more complicated in the case that some $j_k$ values coincide. -Some of the $N!$ terms created by $\hat{S}^+$ are then equal and contribute differently to -the norm. If we denote with $n_1, n_2, \ldots, n_L$ the number of $j$ values that equal the -value $1, 2, \ldots, L$, i.e. the number of particles in mode $1, 2, \ldots, L$, then we -find - -```{math} -\braket{i_1 \leq i_2 \leq \ldots \leq i_N | j_1 \leq j_2 \leq \ldots \leq j_N} = (n_1! n_2! -\cdots n_L!) \delta_{i_1,j_1} \delta_{i_2,j_2} \cdots \delta_{i_N,j_N} -``` - -This more general exprression is also valid for fermions, where every $n_j$ is restricted to -be zero or one. In fact, the values $n_j$ for $j=1,\ldots,L$ completely characterise the -state, and can thus be used to relabel the basis. Instead of specifying the mode $j_k$ that -each particle $k=1,\ldots,N$ occupies (where the labeling of the particles is arbitrary -because they are identical), we can move to a mode-based description and thus specify the -number of particles in each mode, also known as the mode occupation number. We can then -refer to the basis vectors as - -```{math} -\ket{n_1, n_2, \ldots, n_L} -``` - -where $n_j = 0, 1$ (fermions) or $n_j = 0,1,2, \ldots $ (bosons) and furthermore -$\sum_{j=1}^{L} n_j = N$. Furthermore, we define these states to be normalised to 1, i.e. we -absorb a suitable normalisation factor when defining $\ket{n_1, n_2, \ldots, n_L}$ in terms -of the construction above. - -This way of labelling the basis states now is again reminiscent of a tensor product -structure, i.e. we could think of $\ket{n_1, n_2, \ldots, n_L}$ as the tensor product of -states $\ket{n_j}$ associated to every mode, and where the Hilbert space associated with -such a mode is two-dimensional in the case of fermions, or infinite-dimensional in the case -of bosons. However, there is still a global constraint $\sum_{j=1}^{L} n_j = N$ so that we -cannot let the different $n_j$ values vary completely independently from each other. -Furthermore, some caution is now needed as to what it means to have operators acting on -these different "mode Hilbert spaces". The correct formalism is that of second quantisation, -which we introduce next. - -```{note} -In many applications, people do still work with the framework of first quantisation, and -consider $N$-particle states constructed by symmetrising or antisymmetrising the tensor -product of $N$ single-particle states, in a so-called independent particle model or -approximation. Such states are quite cumbersome to work with. As can already be seen, the -antisymmetric case is slightly easier and is known as a Slater determinant. Indeed, the -antisymmetrisation formula is reminiscent of the Leibniz formula of a determinant, and for -example the inner product between two Slater determinants constructed from -$\{\ket{\psi_n},n=1,\ldots,N\}$ and $\{\ket{\varphi_n},n=1,\ldots,N\}$ is given by the -determinant of the matrix containing all overlaps $\braket{\varphi_m \vert \psi_n}$. Slater -determinants form the basis of Hartree-Fock theory for approximating the state of electrons -in an atom or molecule. - -The bosonic version occurs in the context of Bose-Einstein condensation and cold atom -systems more generally. In that case, the inner product between two such states gives rise -to a determinant-like formula, but without the minus signs. This construction is known as -the permenant, but unlike the determinant it is very hard to compute in general and really -requires to explicitly sum up all $N!$ terms. -``` diff --git a/pr-preview/pr-27/_sources/1-Introduction/Observables.ipynb b/pr-preview/pr-27/_sources/1-Introduction/Observables.ipynb deleted file mode 100644 index e77c50c0..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/Observables.ipynb +++ /dev/null @@ -1,618 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "9b2681e5", - "metadata": {}, - "source": [ - "(observables)=\n", - "# Interesting States and Observables in Quantum Many-Body Physics\n", - "\n", - "Having introduced the Hilbert space and Hamiltonian of quantum many-body systems, we still\n", - "need to define which states we are actually interested in, and which type of observables we\n", - "want to compute for such states. So far, we have only mentioned that isolated systems have a\n", - "quantum state which corresponds to a vector (or rather a ray of vectors) in its Hilbert\n", - "space $\\mathbb{H}$. Before answering this question, we first need to generalize our concept\n", - "of a quantum state.\n", - "\n", - "## Quantum States Revisited\n", - "\n", - "More abstractly and generally, the quantum state of a system can be introduced as a map from\n", - "observables (operators) to numbers (expectation values). This is typically denoted as $\\rho:\n", - "\\mathrm{End}(\\mathbb{H}) \\mapsto \\mathbb{C}:\\hat{A} \\to \\hat{A}$. Here,\n", - "$\\mathrm{End}(\\mathbb{H})$ is the set of linear operators (a.k.a endomorphisms) on\n", - "$\\mathbb{H}$. This set is itself a vector space, as we can consider linear combinations of\n", - "linear operators. Furthermore, as we can compose two linear operators and obtain a new\n", - "linear operator, we have a product operation, which makes $\\mathrm{End}(\\mathbb{H})$ into an\n", - "algebra. Finally, we have defined the concept of the adjoint of an operator, which in\n", - "mathematics terminology gives $\\mathrm{End}(\\mathbb{H})$ the structure of a\n", - "$C^\\ast$-algebra.\n", - "\n", - "The map $\\rho$ that represents a quantum state should have a number of properties, that\n", - "generalise those of the case we have encountered so far, where $\\rho(\\hat{A}) =\n", - "\\frac{\\braket{\\Psi\\vert \\hat{A} \\vert \\Psi}}{\\braket{\\Psi | \\Psi}}$. In particular, this map\n", - "is linear with respect to linear combinations of operators. This implies that it can be\n", - "written as $\\rho(\\hat{A}) = \\mathrm{Tr}\\left[\\hat{\\rho}\\hat{A}\\right]$, where $\\hat{\\rho}$\n", - "is now itself an element of $\\mathrm{End}(\\mathbb{H})$ (technically, $\\rho$ is an element\n", - "from the dual space of $\\mathrm{End}(\\mathbb{H})$). Furthermore, we must have that our state\n", - "gives rise to nonnegative and normalised probabilities, which implies that\n", - "\n", - "* $\\rho(\\hat{1}) = \\mathrm{Tr}\\left[\\hat{\\rho}\\right] = 1$\n", - "* $\\rho(\\hat{P}) \\geq 0$ for any projector, and more generally, for any positive definite\n", - " operator $\\hat{P}$. This implies that the associated operator $\\hat{\\rho}$, known as the\n", - " **density operator** or density matrix (when expressed with respect to a chosen basis),\n", - " is itself a positive (and thus self-adjoint) operator, which is furthermore normalised\n", - " to have trace one.\n", - "\n", - "The particular case where the state of the system was given by a vector\n", - "$\\ket{\\Psi}\\in\\mathbb{H}$ corresponds to\n", - "$\\hat{\\rho}=\\frac{\\ket{\\Psi}\\bra{\\Psi}}{\\braket{\\Psi\\vert \\Psi}}$ and thus satisfies\n", - "$\\hat{\\rho}^2=\\hat{\\rho}$, i.e. $\\hat{\\rho}$ is itself a projector. Such states are called\n", - "*pure states*. All density operators which do not have this property are called *mixed\n", - "states*.\n", - "\n", - "Being positive definite operators, any density operator admits a spectral decomposition of\n", - "the form\n", - "\n", - "```{math}\n", - "\\hat{\\rho} = \\sum_{n} p_n \\ket{\\Phi_n}\\bra{\\Phi_n}\n", - "```\n", - "\n", - "where the states $\\{\\ket{\\Phi_n}\\}$ form an orthonormal set and the eigenvalues $p_n$\n", - "satisfy $\\sum_{n} p_n =1 $ and $p_n \\geq 0$ (which together also yields $p_n < 1$).\n", - "\n", - "Mixed states arise in the quantum world in two scenarios:\n", - "\n", - "1.\tIf the system is not isolated, but is rather a subsystem of a larger system and\n", - " interacting with its complement therein. This is discussed in the next section.\n", - "\n", - "2. Even for an isolated system, it can happen that the state is not exactly known and one\n", - " must deal with classical uncertaintity and probability. Indeed, a mixed state can be\n", - " interpreted as a statistical ensemble. If the system can be prepared into different (not\n", - " necessarily orthogonal) states $\\{\\ket{\\Psi_1}, \\ket{\\Psi_2}, \\ldots\\}$ with\n", - " probabilities $p_1, p_2, \\ldots$ that sum up to one, then the state of the system is\n", - " given by\n", - "\t\n", - " ```{math}\n", - " \\hat{\\rho} = p_1 \\ket{\\Psi_1}\\bra{\\Psi_1} + p_2 \\ket{\\Psi_2}\\bra{\\Psi_2} +\n", - " \\ldots\n", - " ```\n", - "\n", - "Note that this does not necessarily correspond to the spectral decomposition of\n", - "$\\hat{\\rho}$, as the states $\\ket{\\Psi_i}$ are not necessarily orthogonal. It is nonetheless\n", - "a valid density operator. More generally, given two density operator $\\hat{\\rho}_1$ and\n", - "$\\hat{\\rho}_2$, aany convex combination $\\hat{\\rho} = p \\hat{\\rho}_1 + (1-p) \\hat{\\rho}_2$\n", - "with thus $0 \\leq p \\leq 1$ is a valid density operator.\n", - "\n", - "To a mixed state, we can associate the Von Neumann entropy\n", - "\n", - "```{math}\n", - "S(\\hat{\\rho}) = - \\mathrm{Tr}\\left[\\hat{\\rho}\\log \\hat{\\rho}\\right] = - \\sum_{n} p_n \\log(p_n)\n", - "```\n", - "\n", - "with $p_n$ the eigenvalues of $\\hat{\\rho}$. For a pure state, the Von Neumann entropy\n", - "evaluates to zero (using $\\lim_{x\\to 0} x \\log x = 0$). The maximal value of the Von Neumann\n", - "entropy is obtained when all values $p_n$ are equal so that $\\hat{\\rho} \\sim \\hat{1}$.\n", - "Because of normalisation, we then have $p_n = 1/d$ with $d$ the Hilbert space dimension and\n", - "thus obtain\n", - "\n", - "```{math}\n", - "0 \\leq S(\\hat{\\rho}) \\leq \\log d.\n", - "```\n", - "\n", - "In a many-body system, the Hilbert space dimension scales exponentially with the number of\n", - "sites or number of degrees of freedom in the system. If we call this quantity the \"volume\"\n", - "of the system, than we can conclude that the maximal value of the Von Neumann entropy is\n", - "thus proportional to the volume of the system. \n", - "\n", - "Depending on the context, the interpretation and meaning of the Von Neumann entropy can\n", - "differ, as we discuss below.\n", - "\n", - "(entanglement)=\n", - "## From Tensor Products to Mixed States and Entanglement\n", - "\n", - "Consider a bipartite system composed of two subsystems $A$ and $B$, with thus $\\mathbb{H} =\n", - "\\mathbb{H}^{(A)} \\otimes \\mathbb{H}^{(B)}$. Now suppose that we are only interested in\n", - "measuring observables that act non-trivially on subsystem $A$. This might be the case if\n", - "subsystem $A$ is the actual quantum system that we want to model, but it is not isolated and\n", - "instead interacting with an environment, corresponding to subsystem $B$. With the axioms so\n", - "far, we are forced to include the environment into our discussion. Only the combined system\n", - "+ environment can be assigned a pure state $\\ket{\\Psi}$. However, this seems complete\n", - "overkill, as the environment might extend the whole universe and so it will be impossible to\n", - "know the complete state $\\ket{\\Psi}$. Since we are only interested in observables that act\n", - "nontrivially on the system $A$, i.e. all observables that we want to measure take the form\n", - "$\\hat{O}^A = \\hat{O} \\otimes \\hat{1}_B$, and thus we expect that a reduced and simplified\n", - "description must exist.\n", - "\n", - "Let us now assume that the Hilbert space of subsystem $A$ is spanned by a basis\n", - "$\\{\\ket{\\psi_k}, k=1,\\dots, d^A\\}$ and the Hilbert space of subsystem $B$ is spanned by a\n", - "basis $\\{\\ket{\\varphi_l}, l=1,\\ldots, d^B\\}$. A reduced description for the system $A$ can\n", - "be obtained by observing that we can write\n", - "\n", - "```{math}\n", - "\\braket{\\Psi \\vert \\hat{O}^A \\vert \\Psi} &= \\mathrm{Tr}\\left[\\hat{O} \\otimes \\hat{1}_B \\ket{\\Psi} \\bra{\\Psi}\\right]\\\\\n", - "&= \\sum_{k = 1}^{d^A}\\sum_{l = 1}^{d^B} \\left(\\bra{\\psi_k} \\otimes \\bra{\\varphi_l}\\right) \\left(\\hat{O} \\otimes \\hat{1}_B\\right) \\ket{\\Psi}\\bra{\\Psi}\\left(\\ket{\\psi_k} \\otimes \\ket{\\varphi_l}\\right)\\\\\n", - "&= \\sum_{k = 1}^{d^A}] \\bra{\\psi_k} \\hat{O} \\left[ \\sum_{l=1}^{d^B} \\bra{\\varphi_l} \\ket{\\Psi} \\bra{\\Psi} \\ket{\\varphi_l}\\right] \\ket{\\psi_k}\\\\\n", - "&= \\mathrm{Tr}_A \\left[\\hat{O} \\mathrm{Tr}_B\\left(\\ket{\\Psi}\\bra{\\Psi} \\right)\\right]\\\\\n", - "&= \\mathrm{Tr}\\left[\\hat{O} \\hat{\\rho}^{(A)}\\right]\n", - "```\n", - "\n", - "Hence, subsystem $A$ an be described in terms of a mixed state that is obtained as\n", - "\n", - "```{math}\n", - "\\hat{\\rho}^A = \\mathrm{Tr}_B \\ket{\\Psi}\\bra{\\Psi} = \\sum_{l=1}^{d^B} \\bra{\\varphi_l}\n", - "\\ket{\\Psi} \\bra{\\Psi} \\ket{\\varphi_l}\n", - "```\n", - "\n", - "This construction is known as a *partial trace* and the resulting mixed state of subsystem\n", - "$A$ as the *reduced density operator*. It is based on the fact that by using a tensor\n", - "product basis for the joint Hilbert space $\\mathbb{H} = \\mathbb{H}^{(A)} \\otimes\n", - "\\mathbb{H}^{(B)}$, a trace operation leads to a double sum, namely one over all basis\n", - "vectors for $\\mathbb{H}^A$ and one over all basis vectors for $\\mathbb{H}^B$. Hence, the\n", - "complete trace can be interpreted as the composition of two partial traces, one over\n", - "subsystem $A$ and one over subsystem $B$. If all relevant operators act trivially on $B$,\n", - "the partial trace over $B$ can be performed directly on the state $\\hat{\\rho}^{(AB)} =\n", - "\\ket{\\Psi}\\bra{\\Psi}$ and gives rise to the reduced density matrix $\\hat{\\rho}^{(A)}$. Some\n", - "notes are in order.\n", - "* While we made reference to a specific tensor product basis to define this construction,\n", - " the concepts of reduced density operator and partial trace do not depend on the specific\n", - " choice of basis for $\\mathbb{H}^{(A)}$ and $\\mathbb{H}^{(B)}$. The construction only\n", - " requires a tensor product basis to expose the tensor product structure of $\\mathbb{H}$.\n", - "* While we have assumed that the total system is described by a pure state\n", - " $\\hat{\\rho}^{(AB)} = \\ket{\\Psi}\\bra{\\Psi}$. However, for the construction of the reduced\n", - " density opeator as $\\hat{\\rho}^{(A)} = \\mathrm{Tr}_B \\hat{\\rho}^{(AB)}$ this is not\n", - " necessary.\n", - "* With can expand the whole construction with respect to an explicitly chosen basis. If\n", - " $\\ket{\\Psi} = \\sum_{k=1}^{d^A} \\sum_{l=1}^{d^B} \\Psi_{k,l} \\ket{k}\\otimes \\ket{l}$, we\n", - " find\n", - " \n", - " ```{math}\n", - " \\hat{\\rho}^{(AB)} = \\sum_{k,k'=1}^{d^A} \\sum_{l,l'=1}^{d^B} \\Psi_{k,l} \\Psi_{k',l'}^\\ast\n", - " \\left(\\ket{k}\\otimes \\ket{l}\\right) \\left(\\bra{k'}\\otimes \\bra{l'}\\right)\n", - " ```\n", - " \n", - " and\n", - " \n", - " ```{math}\n", - " \\hat{\\rho}^{(A)} = \\sum_{k,k'=1}^{d^A} \\sum_{l=1}^{d^B} \\Psi_{k,l} \\Psi_{k',l}^\\ast\n", - " \\ket{k}\\bra{k'}\n", - " ```\n", - "\n", - "If the reduced density operator $\\hat{\\rho}^A$ is pure, this indicates that the state\n", - "$\\ket{\\Psi}$ was itself a tensor product. In all other cases, the subsystems $A$ and $B$ are\n", - "said to be entangled. This entanglement can be quantified by computing the Von Neumann\n", - "entropy $S(\\hat{\\rho}^A)$, which is then called the **entanglement entropy** of the combined\n", - "system $A$ and $B$. Indeed, that this entropy is a property of how both subsystems are\n", - "entangled follows from the fact that $S(\\hat{\\rho}^A) = S(\\hat{\\rho}^B)$, i.e.\\ it doesn't\n", - "matter whether the Von Neumann entropy of the reduced density operator of subsystem $A$ or\n", - "of subsystem $B$ is computed. This is only true if the total system is in a pure state\n", - "$\\ket{\\Psi}$. When also the total system is in a mixed state, because of classical\n", - "randomness, then it is harder to differentiate between true quantum entanglement and\n", - "classical probability.\n", - "\n", - "To conclude, we analyze the case where the combined system is in a pure state a bit more.\n", - "If we again expand $\\ket{\\Psi}$ with respect to the tensor product basis as \n", - "\n", - "```{math}\n", - "\\ket{\\Psi} = \\sum_{k=1}^{d^A} \\sum_{l=1}^{d^B} \\Psi_{k,l} \\ket{k}\\otimes \\ket{l}\n", - "```\n", - "\n", - "and interpret its expansion coefficients $\\Psi_{k,l}$ as the entries of a $d^A \\times d^B$\n", - "matrix $C$. The reduced density operators can now be written as\n", - "\n", - "```{math}\n", - "\\hat{\\rho}^A = \\sum_{k,k'=1}^{d^A} [C C^\\dagger]_{k,k'} \\ket{k}\\bra{k'}\\quad\n", - "\\text{and}\\quad\\hat{\\rho}^A = \\sum_{k,k'=1}^{d^A} [C^\\dagger C]_{l,l'} \\ket{l}\\bra{l'}\n", - "```\n", - "\n", - "Hence, the reduced density matrices for subsystems $A$ and $B$ are related by the fact that\n", - "they correspond to the two different ways in which we can multiply the matrix $C$ with its\n", - "Hermitian conjugate $C^\\dagger$. It is a well-known result from linear algebra that for two\n", - "matrices $A \\in \\mathbb{C}^{d_1 \\times d_2}$ and $B \\in \\mathbb{C}^{d_2 \\times d_1}$, the\n", - "square matrices $A B \\in \\mathbb{C}^{d_1 \\times d_1}$ and $BA \\in \\mathbb{C}^{d_2 \\times\n", - "d_2}$ have the same set of nonzero eigenvalues, counted with degeneracy. If $d_1 \\neq d_2$,\n", - "the larger of the two matrices will have additional eigenvalues zero. This result already\n", - "proofs the equality $S(\\hat{\\rho}^{(A)}) = S(\\hat{\\rho}^{(B)})$.\n", - "\n", - "However, we can even make this more explicit. We can decompose the matrix $C \\in\n", - "\\mathbb{C}^{d^A \\times d^B}$ as $C = U S V^\\dagger$ with $U$ and $V$ unitary matrices (of\n", - "size $d^A \\times d^A$ and $d^B \\times d^B$ respectively), and $S$ a $d^A \\times d^B$ matrix\n", - "which only has nonzero entries on the diagonal. Furthermore, the nonzero entries of $S$ can\n", - "be chosen positive in descending order. This decomposition is known as the **singular value\n", - "decomposition**. For further reference, we denote the diagonal elements of $S$ as $s_i =\n", - "S_{i,i}$ for $i=1,\\ldots, \\mathrm{min}(d^A,d^B)$.\n", - "\n", - "The unitary matrices $U$ and $V$ can be interpreted as basis transforms in the subsystems\n", - "$A$ and $B$ respectively, i.e. they define a new basis (which is thus specific to the chosen\n", - "state $\\ket{\\Psi}$), which we denote as $\\{\\ket{\\psi^{(A)}_k}, k= 1,\\ldots, d^A\\}$ and\n", - "$\\{\\ket{\\psi^{(B)}_l}, l= 1,\\ldots, d^B\\}$. We can then write\n", - "\n", - "```{math}\n", - "\\ket{\\Psi} &= \\sum_{i=1}^{\\min(d^A,d^B)} s_i \\ket{\\psi^A_i} \\otimes \\ket{\\psi^B_i}\\\\\n", - "\\hat{\\rho}^{(A)} &= \\sum_{i=1}^{d^A} (s_i)^2 \\ket{\\psi^A_i} \\bra{\\psi^A_i}\\\\\n", - "\\hat{\\rho}^{(B)} &= \\sum_{i=1}^{d^b} (s_i)^2 \\ket{\\psi^B_i} \\bra{\\psi^B_i}\n", - "```\n", - "\n", - "This particular way of writing the bipartite state $\\ket{\\Psi}$ is known as the Schmidt decomposition.\n", - "As a result, the reduced matrices appear immidiately in diagonalised form. The singular values\n", - "$s_i$, or rather their squares $p_i = (s_i)^2$ are referred to as **Schmidt coefficients**, and\n", - "together make up the **entanglement spectrum**. The entanglement entropy is then given by\n", - "\n", - "```{math}\n", - ":label: entanglement_entropy\n", - "S = - \\sum_{i} p_i \\log(p_i)\n", - "```\n", - "\n", - "In all of this, it is clear that subsystems $A$ and $B$ were treated on equal footing, and\n", - "it does in fact not matter which of the two is chosen to probe the entanglement structure of\n", - "the state.\n", - "\n", - "If the entanglement entropy evaluates to zero, the two subsystems $A$ and $B$ are said to be\n", - "unentangled, and the state $\\ket{\\Psi}$ actually factorises as a tensor product\n", - "$\\ket{\\psi^A} \\otimes \\ket{\\psi^B}$. As soon as the entanglement entropy is nonzero, the two\n", - "subsystems are entangled. As stated above, the entropy is upper bounded, in this case by the\n", - "logarithm of the smallest of the two Hilbert space dimensions $d^A$ or $d^B$. Thus, if $d^A\n", - "\\leq d^B$, we find that the entanglement entropy satisfies\n", - "\n", - "```{math}\n", - "0 \\leq S \\leq \\log(d^A).\n", - "```\n", - "\n", - "It turns out that states that are randomly selected from the Hilbert space typically have\n", - "an entanglement entropy that is close to maximal.\n", - "\n", - "## Quantum Many-Body Physics at Finite Temperature\n", - "\n", - "With the concept of mixed states and quantum entanglement at hand, we can now discuss\n", - "physically interesting states. Firstly, when considering a system that is in contact with a\n", - "large environment that acts as a heat bath at temperature $T$, it will equilibrate. The\n", - "state of the system at equilibrium is then given by the so-called Gibbs state\n", - "\n", - "```{math}\n", - "\\hat{\\rho} = \\frac{1}{Z(\\beta)} \\mathrm{e}^{-\\beta \\hat{H}}\n", - "```\n", - "\n", - "where the normalization factor\n", - "\n", - "```{math}\n", - "Z(\\beta) = \\mathrm{Tr}\\left[\\mathrm{e}^{-\\beta \\hat{H}}\\right]\n", - "```\n", - "\n", - "is typically referred to as the **partition function**. Here, $\\beta = \\frac{1}{k_B T}$ with\n", - "$T$ de temperature and $k_B$ Boltzmann's constant. Henceforth, we simply refer to $\\beta$ as\n", - "*inverse temperature*.\n", - "\n", - "The Von Neumann entropy of the Gibbs state corresponds to the thermodynamical notion of\n", - "entropy. In a many-body system, the thermal entropy at finite temperature will be extensive\n", - "and thus scale with the volume of the system, just like the energy expectation value, so\n", - "that together the free energy $E - T S$ is minimised.\n", - "\n", - "At infinite temperature ($\\beta=0$), we obtain $\\hat{\\rho} \\sim \\hat{1}$ and the Von Neumann\n", - "entropy reaches its upper bound. At zero temperature ($\\beta \\to +\\infty$), we obtain\n", - "$\\hat{\\rho} \\sim \\hat{P}_0$, with $\\hat{P}_0$ the projector onto the eigenspace of lowest\n", - "energy. Hence, in that case the Von Neumann entropy is given by $\\log(d_0)$, with $d_0$ the\n", - "lowest energy eigenvalue, i.e. the dimension of the ground state subspace. Most quantum\n", - "lattice systems have a single or at least a small number of linearly indepenent ground\n", - "states, so that $d_0$ is a small number independent of the system size. However, there are\n", - "also cases where the number of ground states scales exponentially with the system size, and\n", - "the thermal entropy remains extensive at zero temperature. This then constitutes a violation\n", - "of the infamous third law of thermodynamics.\n", - "\n", - "While the heat bath or environment with which the system interacts is in practice typically\n", - "much \"larger\" (in terms of number of degrees of freedom and thus Hilbert space dimension),\n", - "we can use a property that any mixed state can be obtained as the reduced density operator\n", - "from a pure state in a Hilbert space that is the tensor product of two copies of the\n", - "system's Hilbert space, or thus, where the environment is just exactly as large as the\n", - "system. Writing a mixed state $\\hat{\\rho}$ as the reduced density operator of a pure state\n", - "$\\ket{\\Psi}$ in a Hilbert space $\\mathbb{H} = \\mathbb{H}^S \\otimes \\mathbb{H}^E$ is known as\n", - "a *purification*. With respect to the purification, all expectation values can be obtained\n", - "as\n", - "\n", - "```{math}\n", - "\\mathrm{Tr}\\left[\\hat{O} \\hat{\\rho}\\right] = \\braket{\\Psi \\vert \\hat{O} \\otimes \\hat{1}_E \\vert \\Psi}\n", - "```\n", - "\n", - "which can be an advantage if one has an efficient (mathematical, computational, …) formalism\n", - "for working with pure states. We can thus always construct such a purification by just\n", - "taking the environment to be a copy of the system. Note that the environment in this\n", - "construction is merely an auxiliary tool, and has no physical meaning or relation to the\n", - "actual environment. If the Hilbert space of the system is described by a basis $\\{\\ket{j},\n", - "j=1,\\dots, d\\}$, then we can first build a purification if the infinite temperature state as\n", - "\n", - "```{math}\n", - "\\ket{\\Psi_0} = \\sum_{j} \\ket{j}_S \\otimes \\ket{j}_E\n", - "```\n", - "\n", - "In particular, if the system is a many-body system and $\\ket{j}$ is itself already a tensor\n", - "product basis state $\\ket{j_1} \\otimes \\ket{j_2} \\otimes \\ldots$, we can organise the\n", - "environment so that matching tensor product factors between system and environment are taken\n", - "together. This has the advantage that the infinite temperature state can be written as\n", - "\n", - "```{math}\n", - "\\ket{\\Psi_0} = \\left(\\sum_{j_1} \\ket{j_1}_S \\otimes \\ket{j_1}_E\\right) \\otimes \\left(\\sum_{j_2} \\ket{j_2}_S \\otimes \\ket{j_2}_E\\right) \\otimes \\ldots\n", - "```\n", - "\n", - "and still has an overall tensor product structure. A purification of the finite temperature\n", - "state can then be obtained as\n", - "\n", - "```{math}\n", - "\\ket{\\Psi_\\beta} &= \\frac{1}{\\sqrt{Z(\\beta)}} \\sum_{j=1}^{d} \\left(\\mathrm{e}^{-\\frac{\\beta}{2} \\hat{H}} \\ket{j}_S \\right)\\otimes \\ket{j}_E \\\\\n", - "&= \\frac{1}{\\sqrt{Z(\\beta)}} \\exp\\left(-\\frac{\\beta}{2} \\hat{H} \\otimes \\hat{1}_E \\right) \\ket{\\Psi_0}\n", - "```\n", - "\n", - "This expression now looks remarkibly similar to how to compute a time-evolved state, by\n", - "replacing $-\\mathrm{i} t \\mapsto -\\beta/2$. Hence, methods that solve Schrödinger's equation\n", - "and are sufficiently general to also work with imaginary values of the time coordinate can\n", - "be used to prepare thermal states.\n", - "\n", - "```{note}\n", - "Purifications of thermal states are also referred to as *thermofield double states*,\n", - "especially in the high energy physics literature, i.e. in the context of quantum field\n", - "theory, holography and quantum gravity.\n", - "```\n", - "\n", - "(zero_temp)=\n", - "## Quantum Many-Body Physics at Zero Temperature\n", - "\n", - "As quantum effects are most pronounced at zero temperature, we typically assume to be\n", - "operating in this regime. It then follows that we are mostly interested in the lowest energy\n", - "states of the Hamiltonian, and in particular in the ground state(s).\n", - "\n", - "A trivial but nonetheless important property of ground states is that they can easily be\n", - "characterised as states that minimise the expectation value $\\braket{\\Psi \\vert \\hat{H} |\n", - "\\Psi}$. Indeed, this forms the basis for the variational principle. If we have a set of\n", - "trial states, in which there are a number of free parameters, than we can construct an\n", - "approximation to the ground state by 'simply' minimising the energy expectation value of the\n", - "Hamiltonian with respect to these free parameters. How good this approximation is in\n", - "practice depends on the properties of both the Hamiltonian and the trial states. However,\n", - "one way to quantify the quality of the ground state approximation is by computing the energy\n", - "variance\n", - "\n", - "```{math}\n", - "\\braket{\\Psi \\vert (\\hat{H} - \\braket{\\Psi \\vert \\hat{H} \\vert \\Psi})^2 \\vert \\Psi} =\n", - "\\braket{\\Psi \\vert \\hat{H}^2 \\vert \\Psi} - \\braket{\\Psi \\vert \\hat{H} \\vert \\Psi}^2.\n", - "```\n", - "\n", - "The Hamiltonians for quantum lattice systems that we are interested in, will typically\n", - "contain a sum of terms where every individual term acts nontrivially only in a small patch\n", - "of the lattice. For such Hamiltonians, the low-energy states have a special property.\n", - "Hereto, we consider arbitrary bipartitions of the system, where one subsystem corresponds to\n", - "a (connected) region of sites, whereas the complement, i.e.\\ the remaining sites in the\n", - "lattice, make up the second subsystem. The ground state will in general not factorize into a\n", - "tensor product, as it contains correlations and entanglement between these two (arbitrarily\n", - "chosen) subsystems. As pointed out above, the maximal value of entanglement entropy is given\n", - "by the logarithm of the smallest of the two Hilbert space dimensions. Assuming that our\n", - "chosen region of sites is smaller than its complement, its Hilbert space will itself scale\n", - "exponentially with the number of sites in that region, i.e.\\ with its volume. Hence, the\n", - "entanglement entropy computed for such a bipartition has an upper bound that is proportional\n", - "to the volume of the subsystem. As was also stated above, random states typically satisfy\n", - "this upper bound. However, the special property of low-energy states of locally interacting\n", - "Hamiltonians is exactly that they have much less entanglement. They typically have an\n", - "entanglement entropy that only scales with the common area between the subsystem and its\n", - "complement. This scaling behavior is referred to as the **area law of entanglement entropy**\n", - "and provides the key motivation for approximating such low energy states using a tensor\n", - "network decomposition. It indicates that the most important quantum correlations are short\n", - "range (just like the interactions that generate them), and are thus situated across the\n", - "boundary connecting the subsystem and its complement. However, this does not exclude that\n", - "there is also a small amount of nontrivial long-range correlations in the system.\n", - "\n", - "Aside from the ground state, one might also be interested in the first excited states, as\n", - "these will be important for understanding how the system at zero temperature reacts to\n", - "external perturbations. In a macroscopically large many-body system, one should not expect\n", - "that the energy spectrum consists of a number of discrete levels with gaps in between. The\n", - "lowest-energy excited states in a quantum lattice system can typically be given a\n", - "particle-like interpretation, as is well known from quantum field theory. They correspond to\n", - "small bumps of energy, i.e. they can be thought of as perturbations of the ground state in a\n", - "small region and thus have an anergy cost that does not scale with the system size. However,\n", - "because of kinetic energy-like terms, actual eigenstates will not correspond to having this\n", - "energy bump in a localized region, but will rather be in a superposition where the\n", - "\"particle\" is delocalized. In particular, in the case of a translation invariant system, the\n", - "eigenstates will also be momentum eigenstates, and thus describe a particle that is in a\n", - "momentum superposition across the lattice. The energy (surplus) of such a particle like\n", - "excitation will thus be a number $\\epsilon(k)$ that is of order $1$ independent of the\n", - "system size, and that depends on the specific momentum. If $\\epsilon(k)$ is everywhere lower\n", - "bounded by some value $\\Delta$ (again indepenent of system size), then the system is said to\n", - "be gapped. However, in some systems, $\\epsilon(k)$ can become zero for particular values of\n", - "$k$. Such systems are called gapless, and they often correspond to phase transition points,\n", - "where the nature of the ground state radically changes if the parameters in the Hamiltonian\n", - "are varied.\n", - "\n", - "The energy spectrum of a quantum lattice system will then consist of one or a few ground\n", - "states, the energy of which is an extensive number that is most easily expressed as some\n", - "energy density per site. To study the excited states, it is then convenient to shift the\n", - "energy scale such that the ground state energy is zero. The lowest excited states will then\n", - "correspond to particles which can be created at a certain momentum. In an energy-momentum\n", - "diagram, their dispersion relation $\\epsilon(k)$ will apear as an isolated band. Note that a\n", - "system can have different types of such particle-like excitations, each with their own\n", - "dispersion relation. Higher up in the energy spectrum we start to obtain regions\n", - "corresponding to states with two- or more particles, that are travelling independent from\n", - "each other. For such states, the energy can be obtained simply as the sum of the indivual\n", - "particles in the state, and since the relative momentum of the particles can change while\n", - "keeping the total momentum fixed, the energy in such states can also vary continuously (at\n", - "least in the thermodynamic limit).\n", - "\n", - "## Quantum Dynamics and Quenches\n", - "\n", - "Aside from low-energy eigenstates of the Hamiltonian, we are often also interested in states\n", - "that have a non-trivial time depence. One particular use case is where one starts from the\n", - "ground state $\\ket{\\Psi_0}$ of a certain Hamiltonian $\\hat{H}_0$, and then some parameters\n", - "in the Hamiltonian are suddenly changed, so that the Hamiltonian now corresponds to a new\n", - "operator $\\hat{H}_1$. This sudden change is reminiscent of quenching a system, and such a\n", - "setup is called a global quench. We then want to compute\n", - "\n", - "```{math}\n", - "\\ket{\\Psi(t)} = \\exp(-\\mathrm{i} t \\hat{H}_1) \\ket{\\Psi_0}.\n", - "```\n", - "\n", - "With respect to $\\hat{H}_1$, the state $\\ket{\\Psi_0}$ will no longer be a ground state and\n", - "most likely not even be an eigenstate. However, it will have a certain (extensive)\n", - "energy expectation value that is preserved throughout the evolution.\n", - "\n", - "In terms of entanglement and correlations, even when $\\ket{\\Psi_0}$ is a state with an area\n", - "law entanglement scaling (because it is a low-energy state of another local Hamiltonian,\n", - "namely $\\hat{H}_0$), the entanglement in the state will grow rapidly with time. Indeed, the\n", - "bipartite entanglement entropy for will tend to grow linearly with time. From the\n", - "perspective of a given subsystem, its entropy will grow from an initial value proportional\n", - "to the area of the subsystem, until it saturates at a value that is propertional to the\n", - "volume of the subsystem. This process is known as thermalisation, as it turns out that at\n", - "that point, the subsystem is locally indistinguishable from a Gibbs state with a temperature\n", - "set by the energy density of the initial state. The subsystem has thermalized with respect\n", - "to its complement behaving as an environment or heat bath. The larger the subsystem, the\n", - "longer it will take before thermalisation is complete, and the overall state of the global\n", - "system remains a pure state, albeit a highly entangled one.\n", - "\n", - "## Observables and Static and Dynamic Correlation Functions\n", - "\n", - "There are a number of typical observables that we want to measure for a given quantum state\n", - "(ground state or thermal state) of a quantum lattice system. The first are operators which\n", - "have the same structure as the Hamiltonian, in being given by a sum of terms where every\n", - "individual term acts nontrivially only on a single site, or a small patch of neighbouring\n", - "sites. Furthermore, these terms all act identically, except that they are translated to the\n", - "different patches that make up the lattice. Typical examples include the energy itself or\n", - "specific contributions to it (kinetic energy, interaction energy, … ) as well as the total\n", - "number of particles, a total magnetisation, and other similar quantities.\n", - "\n", - "Let us use the transverse field Ising model as an example. An interesting quantity in the\n", - "transverse field Ising model is the longitudinal magnetisation, given by \n", - "$\\hat{S}^z=\\frac{1}{2} \\sum_{n} \\sigma^z_n$. The expectation value of such operators is\n", - "extensive, and so we are typically interested in the associated density, which is obtained\n", - "by dividing out the volume factor. With respect to a translation-invariant state, this is\n", - "equivalent to simply measuring the expectation value of a single term, i.e.\n", - "$\\frac{1}{2} \\sigma^z$ in the case of the longitudinal magnetisation, which is thus a local\n", - "operator. The precise position where it acts does then not really matter.\n", - "\n", - "Such quantities come up for example to measure potential symmetry breaking, where an operator that should\n", - "have zero expectation value given the symmetries of the Hamiltonian, actually acquires a\n", - "nonzero expectation value. Indeed, given that the Ising Hamiltonian has\n", - "the property that $\\left[\\hat{H},\\hat{U}\\right] = 0$, where $\\hat{U} = \\bigotimes_{n} \\sigma^x_n$,\n", - "we also expect the ground state $\\ket{\\Psi_0}$ to satisfy \n", - "$\\hat{U} \\ket{\\Psi_0} \\sim \\ket{\\Psi_0}$, where the proportionality factor can only be plus\n", - "or minus one, due to $\\hat{U}^2 = \\hat{1}$. The magnetisation in the $z$-direction, on the\n", - "other hand, satisfies $\\hat{U}^\\dagger \\hat{S}^z \\hat{U} = - \\hat{S}^z$, so that we expect\n", - "\n", - "$$\\braket{\\Psi_0 \\vert \\hat{S}^z \\vert \\Psi_0} = 0$$\n", - "\n", - "Indeed, if the ground state is unique, this is precisely what happens. However, it can\n", - "happen that there are multiple linearly independent ground states. In that case, the\n", - "restriction of $\\hat{S}^z$ into the ground subspace can be nontrivial, and there exist\n", - "specific ground state choices for which the expectation value is nonzero. For reasons that\n", - "go beyond what can be explained here, it are typically these states which are easiest to\n", - "create or approximate (they have lower entanglement). Such operators that can characterise\n", - "the presence of symmetry breaking are referred to as *order parameters*.\n", - "\n", - "Nonetheless, the use of local operators to probe the ground state properties is somewhat\n", - "limited. A different class of observables that are of typical interest are (static)\n", - "correlation functions, which take the form\n", - "\n", - "$$ C^{A,B}_{i,j} = \\braket{\\Psi\\vert \\hat{A}_i^\\dagger \\hat{B}_j\\vert \\Psi} $$\n", - "\n", - "where $\\hat{A}_i$ is a local operator acting on or in the neighbourhood of site (or unit\n", - "cell) $i$ and $\\hat{B}_j$ is a local operator acting on or in the neighbourhood of site $j$.\n", - "Typically, the operators $\\hat{A}$ and $\\hat{B}$ are chosen such that their local expectation\n", - "value is zero. If this is not the case, we can subtract these local expectation values by\n", - "redefining\n", - "\n", - "$$ C^{A,B}_{i,j} = \\braket{\\Psi\\vert (\\hat{A}_i - \\braket{\\Psi\\vert\\hat{A}_i\\vert \\Psi})^\\dagger (\\hat{B}_j - \\braket{\\Psi\\vert\\hat{B}_j\\vert \\Psi})\\vert \\Psi} = \\braket{\\Psi\\vert \\hat{A}_i \\hat{B}_j\\vert \\Psi} - \\braket{\\Psi\\vert\\hat{A}_i\\vert \\Psi} \\braket{\\Psi\\vert\\hat{B}_j\\vert \\Psi}.$$\n", - "\n", - "We are then interested in the dependence of this correlation function on the positions $i$\n", - "and $j$. In particular, in a translation invariant system, it is only the relative lattice\n", - "vector from site $i$ to site $j$ on which this quantity depends. It can be proven that if\n", - "$\\ket{\\Psi}$ is the unique ground state of a gapped local Hamiltonian, then the asymptotic\n", - "behaviour of such correlation functions is that they decay exponentially in the distance\n", - "between the two sites. This exponential thus defines a length scale $\\xi$ via $\\exp(-d/\\xi)$\n", - "with $d$ the relevant distance. The length scale $\\xi$ is known as the correlation length of\n", - "the system.\n", - "\n", - "When the system is gapless, static correlation functions still go to zero in the limit of\n", - "infinite separation distance, but rather decay as an algebraic function of the distance,\n", - "i.e. they give rise to power laws. The exponents that appear in these power laws do\n", - "typically have universal values that are set by general properties such as the number of\n", - "spatial dimensions, the global symmetries in the system, etc. In particular for the case of\n", - "one-dimensional system, there is a rich literature and well developed framework for\n", - "analysing such gapless systems using methods from conformal field theory.\n", - "\n", - "Finally, in systems with potential symmetry breaking, the static correlation function of the\n", - "order parameter with itself is an extremely useful diagnostic. In particular, when the system\n", - "has symmetry breaking, the large distance limit of the correlation function does not vanish\n", - "and the system is said to contain *long range order*. Unlike the expectation value of the local\n", - "order parameter, which can have a nonzero expectation value for particularly chosen\n", - "symmetry breaking ground states but is still zero for other choices of ground states, the\n", - "value of the correlation function and its large distance limit is insensitive to the specifically\n", - "chosen ground state out of the ground subspace that it is computed with. For the transverse-field\n", - "Ising model, symmetry breaking will thus be present whenever\n", - "\n", - "$$ C_{i,j} = \\braket{\\Psi \\vert \\sigma^z_i \\sigma^z_j \\vert \\Psi} $$\n", - "\n", - "does not decay to zero limit for large distance between sites $i$ and $j$. The limiting\n", - "value of this correlation function can then be considered as $m^2$, i.e. the square of the\n", - "local magnetisation that would be measured in some states of the ground subspace.\n", - "\n", - "Strictly speaking, the ground state static correlation function does not provide information\n", - "about excited states or other dynamical information of the Hamiltonian. In most physical\n", - "system, it however does provide some qualitative information. Since the static correlation\n", - "function, considered as a matrix with rows $i$ and columns $j$, has a particular structure\n", - "resulting from translation invariance, it can be diagonalised by a (multidimensional)\n", - "discrete Fourier transform. The resulting eigenvalues depend on the lattice momentum\n", - "$\\kappa$ and are known as the static structure factor $S(\\kappa)$. In particular, in the\n", - "case of a gapped system with unique ground state, these values are well defined for all\n", - "$\\kappa$. Nonetheless, it can be argued (using different techniques) that maxima for\n", - "$S(\\kappa)$ will correspond to momenta where the single particle excitations have minima in\n", - "their dispersion relations. For critical systems, $S(\\kappa)$ can also have algebraic\n", - "divergences, whereas in the case of long range order, $S(\\kappa)$ will contain a Dirac-delta\n", - "type of divergence, typically at zero momentum, unless there is some spatially repeating\n", - "pattern in the way symmetry is broken (and thus also translation invariance is broken).\n", - "\n", - "More detailed quantitative information about the spectrum of excited states is contained in\n", - "the time-dependent correlation function \n", - "\n", - "```{math}\n", - "G^{A,B}_{i,j}(t) &= \\braket{\\Psi_0\\vert \\hat{A}_i(t)^\\dagger \\hat{B}_j(0)\\vert \\Psi_0}\\\\\n", - "&=\\braket{\\Psi_0\\vert \\mathrm{e}^{+\\mathrm{i} \\hat{H} t} \\hat{A}_i^\\dagger \\mathrm{e}^{-\\mathrm{i} \\hat{H} t} \\hat{B}_j\\vert \\Psi_0} \\\\\n", - "&=\\braket{\\Psi_0\\vert \\hat{A}_i \\mathrm{e}^{-\\mathrm{i} (\\hat{H}-E_0) t} \\hat{B}_j\\vert \\Psi_0} \n", - "```\n", - "\n", - "On the first line, we have used operator \n", - "$\\hat{A}(t) = \\mathrm{e}^{+\\mathrm{i} t \\hat{H}}\\hat{A} \\mathrm{e}^{-\\mathrm{i} t \\hat{H}}$\n", - "in the Heisenberg picture. In going from the second to the third line, we have used that\n", - "$\\ket{\\Psi_0}$ is the ground state of $\\hat{H}$ with ground state energy $E_0$. Again, this\n", - "quantity will depend on the relative lattice vector connecting sites $i$ and $j$ in a\n", - "translation-invariant system. Once again, we can diagonalise the spatial dependence using a\n", - "multidimensional discrete Fourier transform. If we now furthermore also perform a Fourier\n", - "transform of the time-dependence into frequency space, we obtain the *dynamical structure\n", - "factor* given by\n", - "\n", - "$$ S^{A,B}(\\kappa, \\omega) = \\sum_{n} \\delta(\\omega- (E_n - E_0))\\braket{\\Psi_0 \\vert \\hat{A}(\\kappa)^\\dagger | \\Psi_n}\\braket{\\Psi_n \\ \\hat{B}(k\\kappa) \\vert \\Psi_0} $$\n", - "\n", - "Here, $\\hat{A}(k\\kappa)$ and $\\hat{B}(\\kappa)$ correspond to the discrete Fourier transforms\n", - "of $\\hat{A}_i$, which amounts to the momentum superposition. As a consequence,\n", - "$\\hat{B}(\\kappa) \\ket{\\Psi_0}$ is a state with definite momentum $k$ (provided the ground\n", - "state is translation invariant), and thus only has overlap with excited states\n", - "$\\ket{\\Psi_n}$ with momentum $\\kappa$. Because of the factor $\\delta(\\omega - (E_n -E_0))$,\n", - "the dynamical structure factor $S^{A,B}(\\kappa, \\omega)$ can be nonzero only if there exist\n", - "eigenstates with momentum $\\kappa$ and excitation energy $\\omega$ in the spectrum of the\n", - "Hamiltonian $\\hat{H}$. By studying $S^{A,B}(\\kappa, \\omega)$ for different choices of\n", - "operators $\\hat{A}$ and $\\hat{B}$, we can detect all eigenstates and map out the full\n", - "(low-energy) spectrum of $\\hat{H}$." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/1-Introduction/Observables.md b/pr-preview/pr-27/_sources/1-Introduction/Observables.md deleted file mode 100644 index 0ab16adb..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/Observables.md +++ /dev/null @@ -1,600 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(observables)= -# Interesting States and Observables in Quantum Many-Body Physics - -Having introduced the Hilbert space and Hamiltonian of quantum many-body systems, we still -need to define which states we are actually interested in, and which type of observables we -want to compute for such states. So far, we have only mentioned that isolated systems have a -quantum state which corresponds to a vector (or rather a ray of vectors) in its Hilbert -space $\mathbb{H}$. Before answering this question, we first need to generalize our concept -of a quantum state. - -## Quantum States Revisited - -More abstractly and generally, the quantum state of a system can be introduced as a map from -observables (operators) to numbers (expectation values). This is typically denoted as $\rho: -\mathrm{End}(\mathbb{H}) \mapsto \mathbb{C}:\hat{A} \to \hat{A}$. Here, -$\mathrm{End}(\mathbb{H})$ is the set of linear operators (a.k.a endomorphisms) on -$\mathbb{H}$. This set is itself a vector space, as we can consider linear combinations of -linear operators. Furthermore, as we can compose two linear operators and obtain a new -linear operator, we have a product operation, which makes $\mathrm{End}(\mathbb{H})$ into an -algebra. Finally, we have defined the concept of the adjoint of an operator, which in -mathematics terminology gives $\mathrm{End}(\mathbb{H})$ the structure of a -$C^\ast$-algebra. - -The map $\rho$ that represents a quantum state should have a number of properties, that -generalise those of the case we have encountered so far, where $\rho(\hat{A}) = -\frac{\braket{\Psi\vert \hat{A} \vert \Psi}}{\braket{\Psi | \Psi}}$. In particular, this map -is linear with respect to linear combinations of operators. This implies that it can be -written as $\rho(\hat{A}) = \mathrm{Tr}\left[\hat{\rho}\hat{A}\right]$, where $\hat{\rho}$ -is now itself an element of $\mathrm{End}(\mathbb{H})$ (technically, $\rho$ is an element -from the dual space of $\mathrm{End}(\mathbb{H})$). Furthermore, we must have that our state -gives rise to nonnegative and normalised probabilities, which implies that - -* $\rho(\hat{1}) = \mathrm{Tr}\left[\hat{\rho}\right] = 1$ -* $\rho(\hat{P}) \geq 0$ for any projector, and more generally, for any positive definite - operator $\hat{P}$. This implies that the associated operator $\hat{\rho}$, known as the - **density operator** or density matrix (when expressed with respect to a chosen basis), - is itself a positive (and thus self-adjoint) operator, which is furthermore normalised - to have trace one. - -The particular case where the state of the system was given by a vector -$\ket{\Psi}\in\mathbb{H}$ corresponds to -$\hat{\rho}=\frac{\ket{\Psi}\bra{\Psi}}{\braket{\Psi\vert \Psi}}$ and thus satisfies -$\hat{\rho}^2=\hat{\rho}$, i.e. $\hat{\rho}$ is itself a projector. Such states are called -*pure states*. All density operators which do not have this property are called *mixed -states*. - -Being positive definite operators, any density operator admits a spectral decomposition of -the form - -```{math} -\hat{\rho} = \sum_{n} p_n \ket{\Phi_n}\bra{\Phi_n} -``` - -where the states $\{\ket{\Phi_n}\}$ form an orthonormal set and the eigenvalues $p_n$ -satisfy $\sum_{n} p_n =1 $ and $p_n \geq 0$ (which together also yields $p_n < 1$). - -Mixed states arise in the quantum world in two scenarios: - -1. If the system is not isolated, but is rather a subsystem of a larger system and - interacting with its complement therein. This is discussed in the next section. - -2. Even for an isolated system, it can happen that the state is not exactly known and one - must deal with classical uncertaintity and probability. Indeed, a mixed state can be - interpreted as a statistical ensemble. If the system can be prepared into different (not - necessarily orthogonal) states $\{\ket{\Psi_1}, \ket{\Psi_2}, \ldots\}$ with - probabilities $p_1, p_2, \ldots$ that sum up to one, then the state of the system is - given by - - ```{math} - \hat{\rho} = p_1 \ket{\Psi_1}\bra{\Psi_1} + p_2 \ket{\Psi_2}\bra{\Psi_2} + - \ldots - ``` - -Note that this does not necessarily correspond to the spectral decomposition of -$\hat{\rho}$, as the states $\ket{\Psi_i}$ are not necessarily orthogonal. It is nonetheless -a valid density operator. More generally, given two density operator $\hat{\rho}_1$ and -$\hat{\rho}_2$, aany convex combination $\hat{\rho} = p \hat{\rho}_1 + (1-p) \hat{\rho}_2$ -with thus $0 \leq p \leq 1$ is a valid density operator. - -To a mixed state, we can associate the Von Neumann entropy - -```{math} -S(\hat{\rho}) = - \mathrm{Tr}\left[\hat{\rho}\log \hat{\rho}\right] = - \sum_{n} p_n \log(p_n) -``` - -with $p_n$ the eigenvalues of $\hat{\rho}$. For a pure state, the Von Neumann entropy -evaluates to zero (using $\lim_{x\to 0} x \log x = 0$). The maximal value of the Von Neumann -entropy is obtained when all values $p_n$ are equal so that $\hat{\rho} \sim \hat{1}$. -Because of normalisation, we then have $p_n = 1/d$ with $d$ the Hilbert space dimension and -thus obtain - -```{math} -0 \leq S(\hat{\rho}) \leq \log d. -``` - -In a many-body system, the Hilbert space dimension scales exponentially with the number of -sites or number of degrees of freedom in the system. If we call this quantity the "volume" -of the system, than we can conclude that the maximal value of the Von Neumann entropy is -thus proportional to the volume of the system. - -Depending on the context, the interpretation and meaning of the Von Neumann entropy can -differ, as we discuss below. - -(entanglement)= -## From Tensor Products to Mixed States and Entanglement - -Consider a bipartite system composed of two subsystems $A$ and $B$, with thus $\mathbb{H} = -\mathbb{H}^{(A)} \otimes \mathbb{H}^{(B)}$. Now suppose that we are only interested in -measuring observables that act non-trivially on subsystem $A$. This might be the case if -subsystem $A$ is the actual quantum system that we want to model, but it is not isolated and -instead interacting with an environment, corresponding to subsystem $B$. With the axioms so -far, we are forced to include the environment into our discussion. Only the combined system -+ environment can be assigned a pure state $\ket{\Psi}$. However, this seems complete -overkill, as the environment might extend the whole universe and so it will be impossible to -know the complete state $\ket{\Psi}$. Since we are only interested in observables that act -nontrivially on the system $A$, i.e. all observables that we want to measure take the form -$\hat{O}^A = \hat{O} \otimes \hat{1}_B$, and thus we expect that a reduced and simplified -description must exist. - -Let us now assume that the Hilbert space of subsystem $A$ is spanned by a basis -$\{\ket{\psi_k}, k=1,\dots, d^A\}$ and the Hilbert space of subsystem $B$ is spanned by a -basis $\{\ket{\varphi_l}, l=1,\ldots, d^B\}$. A reduced description for the system $A$ can -be obtained by observing that we can write - -```{math} -\braket{\Psi \vert \hat{O}^A \vert \Psi} &= \mathrm{Tr}\left[\hat{O} \otimes \hat{1}_B \ket{\Psi} \bra{\Psi}\right]\\ -&= \sum_{k = 1}^{d^A}\sum_{l = 1}^{d^B} \left(\bra{\psi_k} \otimes \bra{\varphi_l}\right) \left(\hat{O} \otimes \hat{1}_B\right) \ket{\Psi}\bra{\Psi}\left(\ket{\psi_k} \otimes \ket{\varphi_l}\right)\\ -&= \sum_{k = 1}^{d^A}] \bra{\psi_k} \hat{O} \left[ \sum_{l=1}^{d^B} \bra{\varphi_l} \ket{\Psi} \bra{\Psi} \ket{\varphi_l}\right] \ket{\psi_k}\\ -&= \mathrm{Tr}_A \left[\hat{O} \mathrm{Tr}_B\left(\ket{\Psi}\bra{\Psi} \right)\right]\\ -&= \mathrm{Tr}\left[\hat{O} \hat{\rho}^{(A)}\right] -``` - -Hence, subsystem $A$ an be described in terms of a mixed state that is obtained as - -```{math} -\hat{\rho}^A = \mathrm{Tr}_B \ket{\Psi}\bra{\Psi} = \sum_{l=1}^{d^B} \bra{\varphi_l} -\ket{\Psi} \bra{\Psi} \ket{\varphi_l} -``` - -This construction is known as a *partial trace* and the resulting mixed state of subsystem -$A$ as the *reduced density operator*. It is based on the fact that by using a tensor -product basis for the joint Hilbert space $\mathbb{H} = \mathbb{H}^{(A)} \otimes -\mathbb{H}^{(B)}$, a trace operation leads to a double sum, namely one over all basis -vectors for $\mathbb{H}^A$ and one over all basis vectors for $\mathbb{H}^B$. Hence, the -complete trace can be interpreted as the composition of two partial traces, one over -subsystem $A$ and one over subsystem $B$. If all relevant operators act trivially on $B$, -the partial trace over $B$ can be performed directly on the state $\hat{\rho}^{(AB)} = -\ket{\Psi}\bra{\Psi}$ and gives rise to the reduced density matrix $\hat{\rho}^{(A)}$. Some -notes are in order. -* While we made reference to a specific tensor product basis to define this construction, - the concepts of reduced density operator and partial trace do not depend on the specific - choice of basis for $\mathbb{H}^{(A)}$ and $\mathbb{H}^{(B)}$. The construction only - requires a tensor product basis to expose the tensor product structure of $\mathbb{H}$. -* While we have assumed that the total system is described by a pure state - $\hat{\rho}^{(AB)} = \ket{\Psi}\bra{\Psi}$. However, for the construction of the reduced - density opeator as $\hat{\rho}^{(A)} = \mathrm{Tr}_B \hat{\rho}^{(AB)}$ this is not - necessary. -* With can expand the whole construction with respect to an explicitly chosen basis. If - $\ket{\Psi} = \sum_{k=1}^{d^A} \sum_{l=1}^{d^B} \Psi_{k,l} \ket{k}\otimes \ket{l}$, we - find - - ```{math} - \hat{\rho}^{(AB)} = \sum_{k,k'=1}^{d^A} \sum_{l,l'=1}^{d^B} \Psi_{k,l} \Psi_{k',l'}^\ast - \left(\ket{k}\otimes \ket{l}\right) \left(\bra{k'}\otimes \bra{l'}\right) - ``` - - and - - ```{math} - \hat{\rho}^{(A)} = \sum_{k,k'=1}^{d^A} \sum_{l=1}^{d^B} \Psi_{k,l} \Psi_{k',l}^\ast - \ket{k}\bra{k'} - ``` - -If the reduced density operator $\hat{\rho}^A$ is pure, this indicates that the state -$\ket{\Psi}$ was itself a tensor product. In all other cases, the subsystems $A$ and $B$ are -said to be entangled. This entanglement can be quantified by computing the Von Neumann -entropy $S(\hat{\rho}^A)$, which is then called the **entanglement entropy** of the combined -system $A$ and $B$. Indeed, that this entropy is a property of how both subsystems are -entangled follows from the fact that $S(\hat{\rho}^A) = S(\hat{\rho}^B)$, i.e.\ it doesn't -matter whether the Von Neumann entropy of the reduced density operator of subsystem $A$ or -of subsystem $B$ is computed. This is only true if the total system is in a pure state -$\ket{\Psi}$. When also the total system is in a mixed state, because of classical -randomness, then it is harder to differentiate between true quantum entanglement and -classical probability. - -To conclude, we analyze the case where the combined system is in a pure state a bit more. -If we again expand $\ket{\Psi}$ with respect to the tensor product basis as - -```{math} -\ket{\Psi} = \sum_{k=1}^{d^A} \sum_{l=1}^{d^B} \Psi_{k,l} \ket{k}\otimes \ket{l} -``` - -and interpret its expansion coefficients $\Psi_{k,l}$ as the entries of a $d^A \times d^B$ -matrix $C$. The reduced density operators can now be written as - -```{math} -\hat{\rho}^A = \sum_{k,k'=1}^{d^A} [C C^\dagger]_{k,k'} \ket{k}\bra{k'}\quad -\text{and}\quad\hat{\rho}^A = \sum_{k,k'=1}^{d^A} [C^\dagger C]_{l,l'} \ket{l}\bra{l'} -``` - -Hence, the reduced density matrices for subsystems $A$ and $B$ are related by the fact that -they correspond to the two different ways in which we can multiply the matrix $C$ with its -Hermitian conjugate $C^\dagger$. It is a well-known result from linear algebra that for two -matrices $A \in \mathbb{C}^{d_1 \times d_2}$ and $B \in \mathbb{C}^{d_2 \times d_1}$, the -square matrices $A B \in \mathbb{C}^{d_1 \times d_1}$ and $BA \in \mathbb{C}^{d_2 \times -d_2}$ have the same set of nonzero eigenvalues, counted with degeneracy. If $d_1 \neq d_2$, -the larger of the two matrices will have additional eigenvalues zero. This result already -proofs the equality $S(\hat{\rho}^{(A)}) = S(\hat{\rho}^{(B)})$. - -However, we can even make this more explicit. We can decompose the matrix $C \in -\mathbb{C}^{d^A \times d^B}$ as $C = U S V^\dagger$ with $U$ and $V$ unitary matrices (of -size $d^A \times d^A$ and $d^B \times d^B$ respectively), and $S$ a $d^A \times d^B$ matrix -which only has nonzero entries on the diagonal. Furthermore, the nonzero entries of $S$ can -be chosen positive in descending order. This decomposition is known as the **singular value -decomposition**. For further reference, we denote the diagonal elements of $S$ as $s_i = -S_{i,i}$ for $i=1,\ldots, \mathrm{min}(d^A,d^B)$. - -The unitary matrices $U$ and $V$ can be interpreted as basis transforms in the subsystems -$A$ and $B$ respectively, i.e. they define a new basis (which is thus specific to the chosen -state $\ket{\Psi}$), which we denote as $\{\ket{\psi^{(A)}_k}, k= 1,\ldots, d^A\}$ and -$\{\ket{\psi^{(B)}_l}, l= 1,\ldots, d^B\}$. We can then write - -```{math} -\ket{\Psi} &= \sum_{i=1}^{\min(d^A,d^B)} s_i \ket{\psi^A_i} \otimes \ket{\psi^B_i}\\ -\hat{\rho}^{(A)} &= \sum_{i=1}^{d^A} (s_i)^2 \ket{\psi^A_i} \bra{\psi^A_i}\\ -\hat{\rho}^{(B)} &= \sum_{i=1}^{d^b} (s_i)^2 \ket{\psi^B_i} \bra{\psi^B_i} -``` - -This particular way of writing the bipartite state $\ket{\Psi}$ is known as the Schmidt decomposition. -As a result, the reduced matrices appear immidiately in diagonalised form. The singular values -$s_i$, or rather their squares $p_i = (s_i)^2$ are referred to as **Schmidt coefficients**, and -together make up the **entanglement spectrum**. The entanglement entropy is then given by - -```{math} -:label: entanglement_entropy -S = - \sum_{i} p_i \log(p_i) -``` - -In all of this, it is clear that subsystems $A$ and $B$ were treated on equal footing, and -it does in fact not matter which of the two is chosen to probe the entanglement structure of -the state. - -If the entanglement entropy evaluates to zero, the two subsystems $A$ and $B$ are said to be -unentangled, and the state $\ket{\Psi}$ actually factorises as a tensor product -$\ket{\psi^A} \otimes \ket{\psi^B}$. As soon as the entanglement entropy is nonzero, the two -subsystems are entangled. As stated above, the entropy is upper bounded, in this case by the -logarithm of the smallest of the two Hilbert space dimensions $d^A$ or $d^B$. Thus, if $d^A -\leq d^B$, we find that the entanglement entropy satisfies - -```{math} -0 \leq S \leq \log(d^A). -``` - -It turns out that states that are randomly selected from the Hilbert space typically have -an entanglement entropy that is close to maximal. - -## Quantum Many-Body Physics at Finite Temperature - -With the concept of mixed states and quantum entanglement at hand, we can now discuss -physically interesting states. Firstly, when considering a system that is in contact with a -large environment that acts as a heat bath at temperature $T$, it will equilibrate. The -state of the system at equilibrium is then given by the so-called Gibbs state - -```{math} -\hat{\rho} = \frac{1}{Z(\beta)} \mathrm{e}^{-\beta \hat{H}} -``` - -where the normalization factor - -```{math} -Z(\beta) = \mathrm{Tr}\left[\mathrm{e}^{-\beta \hat{H}}\right] -``` - -is typically referred to as the **partition function**. Here, $\beta = \frac{1}{k_B T}$ with -$T$ de temperature and $k_B$ Boltzmann's constant. Henceforth, we simply refer to $\beta$ as -*inverse temperature*. - -The Von Neumann entropy of the Gibbs state corresponds to the thermodynamical notion of -entropy. In a many-body system, the thermal entropy at finite temperature will be extensive -and thus scale with the volume of the system, just like the energy expectation value, so -that together the free energy $E - T S$ is minimised. - -At infinite temperature ($\beta=0$), we obtain $\hat{\rho} \sim \hat{1}$ and the Von Neumann -entropy reaches its upper bound. At zero temperature ($\beta \to +\infty$), we obtain -$\hat{\rho} \sim \hat{P}_0$, with $\hat{P}_0$ the projector onto the eigenspace of lowest -energy. Hence, in that case the Von Neumann entropy is given by $\log(d_0)$, with $d_0$ the -lowest energy eigenvalue, i.e. the dimension of the ground state subspace. Most quantum -lattice systems have a single or at least a small number of linearly indepenent ground -states, so that $d_0$ is a small number independent of the system size. However, there are -also cases where the number of ground states scales exponentially with the system size, and -the thermal entropy remains extensive at zero temperature. This then constitutes a violation -of the infamous third law of thermodynamics. - -While the heat bath or environment with which the system interacts is in practice typically -much "larger" (in terms of number of degrees of freedom and thus Hilbert space dimension), -we can use a property that any mixed state can be obtained as the reduced density operator -from a pure state in a Hilbert space that is the tensor product of two copies of the -system's Hilbert space, or thus, where the environment is just exactly as large as the -system. Writing a mixed state $\hat{\rho}$ as the reduced density operator of a pure state -$\ket{\Psi}$ in a Hilbert space $\mathbb{H} = \mathbb{H}^S \otimes \mathbb{H}^E$ is known as -a *purification*. With respect to the purification, all expectation values can be obtained -as - -```{math} -\mathrm{Tr}\left[\hat{O} \hat{\rho}\right] = \braket{\Psi \vert \hat{O} \otimes \hat{1}_E \vert \Psi} -``` - -which can be an advantage if one has an efficient (mathematical, computational, …) formalism -for working with pure states. We can thus always construct such a purification by just -taking the environment to be a copy of the system. Note that the environment in this -construction is merely an auxiliary tool, and has no physical meaning or relation to the -actual environment. If the Hilbert space of the system is described by a basis $\{\ket{j}, -j=1,\dots, d\}$, then we can first build a purification if the infinite temperature state as - -```{math} -\ket{\Psi_0} = \sum_{j} \ket{j}_S \otimes \ket{j}_E -``` - -In particular, if the system is a many-body system and $\ket{j}$ is itself already a tensor -product basis state $\ket{j_1} \otimes \ket{j_2} \otimes \ldots$, we can organise the -environment so that matching tensor product factors between system and environment are taken -together. This has the advantage that the infinite temperature state can be written as - -```{math} -\ket{\Psi_0} = \left(\sum_{j_1} \ket{j_1}_S \otimes \ket{j_1}_E\right) \otimes \left(\sum_{j_2} \ket{j_2}_S \otimes \ket{j_2}_E\right) \otimes \ldots -``` - -and still has an overall tensor product structure. A purification of the finite temperature -state can then be obtained as - -```{math} -\ket{\Psi_\beta} &= \frac{1}{\sqrt{Z(\beta)}} \sum_{j=1}^{d} \left(\mathrm{e}^{-\frac{\beta}{2} \hat{H}} \ket{j}_S \right)\otimes \ket{j}_E \\ -&= \frac{1}{\sqrt{Z(\beta)}} \exp\left(-\frac{\beta}{2} \hat{H} \otimes \hat{1}_E \right) \ket{\Psi_0} -``` - -This expression now looks remarkibly similar to how to compute a time-evolved state, by -replacing $-\mathrm{i} t \mapsto -\beta/2$. Hence, methods that solve Schrödinger's equation -and are sufficiently general to also work with imaginary values of the time coordinate can -be used to prepare thermal states. - -```{note} -Purifications of thermal states are also referred to as *thermofield double states*, -especially in the high energy physics literature, i.e. in the context of quantum field -theory, holography and quantum gravity. -``` - -(zero_temp)= -## Quantum Many-Body Physics at Zero Temperature - -As quantum effects are most pronounced at zero temperature, we typically assume to be -operating in this regime. It then follows that we are mostly interested in the lowest energy -states of the Hamiltonian, and in particular in the ground state(s). - -A trivial but nonetheless important property of ground states is that they can easily be -characterised as states that minimise the expectation value $\braket{\Psi \vert \hat{H} | -\Psi}$. Indeed, this forms the basis for the variational principle. If we have a set of -trial states, in which there are a number of free parameters, than we can construct an -approximation to the ground state by 'simply' minimising the energy expectation value of the -Hamiltonian with respect to these free parameters. How good this approximation is in -practice depends on the properties of both the Hamiltonian and the trial states. However, -one way to quantify the quality of the ground state approximation is by computing the energy -variance - -```{math} -\braket{\Psi \vert (\hat{H} - \braket{\Psi \vert \hat{H} \vert \Psi})^2 \vert \Psi} = -\braket{\Psi \vert \hat{H}^2 \vert \Psi} - \braket{\Psi \vert \hat{H} \vert \Psi}^2. -``` - -The Hamiltonians for quantum lattice systems that we are interested in, will typically -contain a sum of terms where every individual term acts nontrivially only in a small patch -of the lattice. For such Hamiltonians, the low-energy states have a special property. -Hereto, we consider arbitrary bipartitions of the system, where one subsystem corresponds to -a (connected) region of sites, whereas the complement, i.e.\ the remaining sites in the -lattice, make up the second subsystem. The ground state will in general not factorize into a -tensor product, as it contains correlations and entanglement between these two (arbitrarily -chosen) subsystems. As pointed out above, the maximal value of entanglement entropy is given -by the logarithm of the smallest of the two Hilbert space dimensions. Assuming that our -chosen region of sites is smaller than its complement, its Hilbert space will itself scale -exponentially with the number of sites in that region, i.e.\ with its volume. Hence, the -entanglement entropy computed for such a bipartition has an upper bound that is proportional -to the volume of the subsystem. As was also stated above, random states typically satisfy -this upper bound. However, the special property of low-energy states of locally interacting -Hamiltonians is exactly that they have much less entanglement. They typically have an -entanglement entropy that only scales with the common area between the subsystem and its -complement. This scaling behavior is referred to as the **area law of entanglement entropy** -and provides the key motivation for approximating such low energy states using a tensor -network decomposition. It indicates that the most important quantum correlations are short -range (just like the interactions that generate them), and are thus situated across the -boundary connecting the subsystem and its complement. However, this does not exclude that -there is also a small amount of nontrivial long-range correlations in the system. - -Aside from the ground state, one might also be interested in the first excited states, as -these will be important for understanding how the system at zero temperature reacts to -external perturbations. In a macroscopically large many-body system, one should not expect -that the energy spectrum consists of a number of discrete levels with gaps in between. The -lowest-energy excited states in a quantum lattice system can typically be given a -particle-like interpretation, as is well known from quantum field theory. They correspond to -small bumps of energy, i.e. they can be thought of as perturbations of the ground state in a -small region and thus have an anergy cost that does not scale with the system size. However, -because of kinetic energy-like terms, actual eigenstates will not correspond to having this -energy bump in a localized region, but will rather be in a superposition where the -"particle" is delocalized. In particular, in the case of a translation invariant system, the -eigenstates will also be momentum eigenstates, and thus describe a particle that is in a -momentum superposition across the lattice. The energy (surplus) of such a particle like -excitation will thus be a number $\epsilon(k)$ that is of order $1$ independent of the -system size, and that depends on the specific momentum. If $\epsilon(k)$ is everywhere lower -bounded by some value $\Delta$ (again indepenent of system size), then the system is said to -be gapped. However, in some systems, $\epsilon(k)$ can become zero for particular values of -$k$. Such systems are called gapless, and they often correspond to phase transition points, -where the nature of the ground state radically changes if the parameters in the Hamiltonian -are varied. - -The energy spectrum of a quantum lattice system will then consist of one or a few ground -states, the energy of which is an extensive number that is most easily expressed as some -energy density per site. To study the excited states, it is then convenient to shift the -energy scale such that the ground state energy is zero. The lowest excited states will then -correspond to particles which can be created at a certain momentum. In an energy-momentum -diagram, their dispersion relation $\epsilon(k)$ will apear as an isolated band. Note that a -system can have different types of such particle-like excitations, each with their own -dispersion relation. Higher up in the energy spectrum we start to obtain regions -corresponding to states with two- or more particles, that are travelling independent from -each other. For such states, the energy can be obtained simply as the sum of the indivual -particles in the state, and since the relative momentum of the particles can change while -keeping the total momentum fixed, the energy in such states can also vary continuously (at -least in the thermodynamic limit). - -## Quantum Dynamics and Quenches - -Aside from low-energy eigenstates of the Hamiltonian, we are often also interested in states -that have a non-trivial time depence. One particular use case is where one starts from the -ground state $\ket{\Psi_0}$ of a certain Hamiltonian $\hat{H}_0$, and then some parameters -in the Hamiltonian are suddenly changed, so that the Hamiltonian now corresponds to a new -operator $\hat{H}_1$. This sudden change is reminiscent of quenching a system, and such a -setup is called a global quench. We then want to compute - -```{math} -\ket{\Psi(t)} = \exp(-\mathrm{i} t \hat{H}_1) \ket{\Psi_0}. -``` - -With respect to $\hat{H}_1$, the state $\ket{\Psi_0}$ will no longer be a ground state and -most likely not even be an eigenstate. However, it will have a certain (extensive) -energy expectation value that is preserved throughout the evolution. - -In terms of entanglement and correlations, even when $\ket{\Psi_0}$ is a state with an area -law entanglement scaling (because it is a low-energy state of another local Hamiltonian, -namely $\hat{H}_0$), the entanglement in the state will grow rapidly with time. Indeed, the -bipartite entanglement entropy for will tend to grow linearly with time. From the -perspective of a given subsystem, its entropy will grow from an initial value proportional -to the area of the subsystem, until it saturates at a value that is propertional to the -volume of the subsystem. This process is known as thermalisation, as it turns out that at -that point, the subsystem is locally indistinguishable from a Gibbs state with a temperature -set by the energy density of the initial state. The subsystem has thermalized with respect -to its complement behaving as an environment or heat bath. The larger the subsystem, the -longer it will take before thermalisation is complete, and the overall state of the global -system remains a pure state, albeit a highly entangled one. - -## Observables and Static and Dynamic Correlation Functions - -There are a number of typical observables that we want to measure for a given quantum state -(ground state or thermal state) of a quantum lattice system. The first are operators which -have the same structure as the Hamiltonian, in being given by a sum of terms where every -individual term acts nontrivially only on a single site, or a small patch of neighbouring -sites. Furthermore, these terms all act identically, except that they are translated to the -different patches that make up the lattice. Typical examples include the energy itself or -specific contributions to it (kinetic energy, interaction energy, … ) as well as the total -number of particles, a total magnetisation, and other similar quantities. - -Let us use the transverse field Ising model as an example. An interesting quantity in the -transverse field Ising model is the longitudinal magnetisation, given by -$\hat{S}^z=\frac{1}{2} \sum_{n} \sigma^z_n$. The expectation value of such operators is -extensive, and so we are typically interested in the associated density, which is obtained -by dividing out the volume factor. With respect to a translation-invariant state, this is -equivalent to simply measuring the expectation value of a single term, i.e. -$\frac{1}{2} \sigma^z$ in the case of the longitudinal magnetisation, which is thus a local -operator. The precise position where it acts does then not really matter. - -Such quantities come up for example to measure potential symmetry breaking, where an operator that should -have zero expectation value given the symmetries of the Hamiltonian, actually acquires a -nonzero expectation value. Indeed, given that the Ising Hamiltonian has -the property that $\left[\hat{H},\hat{U}\right] = 0$, where $\hat{U} = \bigotimes_{n} \sigma^x_n$, -we also expect the ground state $\ket{\Psi_0}$ to satisfy -$\hat{U} \ket{\Psi_0} \sim \ket{\Psi_0}$, where the proportionality factor can only be plus -or minus one, due to $\hat{U}^2 = \hat{1}$. The magnetisation in the $z$-direction, on the -other hand, satisfies $\hat{U}^\dagger \hat{S}^z \hat{U} = - \hat{S}^z$, so that we expect - -$$\braket{\Psi_0 \vert \hat{S}^z \vert \Psi_0} = 0$$ - -Indeed, if the ground state is unique, this is precisely what happens. However, it can -happen that there are multiple linearly independent ground states. In that case, the -restriction of $\hat{S}^z$ into the ground subspace can be nontrivial, and there exist -specific ground state choices for which the expectation value is nonzero. For reasons that -go beyond what can be explained here, it are typically these states which are easiest to -create or approximate (they have lower entanglement). Such operators that can characterise -the presence of symmetry breaking are referred to as *order parameters*. - -Nonetheless, the use of local operators to probe the ground state properties is somewhat -limited. A different class of observables that are of typical interest are (static) -correlation functions, which take the form - -$$ C^{A,B}_{i,j} = \braket{\Psi\vert \hat{A}_i^\dagger \hat{B}_j\vert \Psi} $$ - -where $\hat{A}_i$ is a local operator acting on or in the neighbourhood of site (or unit -cell) $i$ and $\hat{B}_j$ is a local operator acting on or in the neighbourhood of site $j$. -Typically, the operators $\hat{A}$ and $\hat{B}$ are chosen such that their local expectation -value is zero. If this is not the case, we can subtract these local expectation values by -redefining - -$$ C^{A,B}_{i,j} = \braket{\Psi\vert (\hat{A}_i - \braket{\Psi\vert\hat{A}_i\vert \Psi})^\dagger (\hat{B}_j - \braket{\Psi\vert\hat{B}_j\vert \Psi})\vert \Psi} = \braket{\Psi\vert \hat{A}_i \hat{B}_j\vert \Psi} - \braket{\Psi\vert\hat{A}_i\vert \Psi} \braket{\Psi\vert\hat{B}_j\vert \Psi}.$$ - -We are then interested in the dependence of this correlation function on the positions $i$ -and $j$. In particular, in a translation invariant system, it is only the relative lattice -vector from site $i$ to site $j$ on which this quantity depends. It can be proven that if -$\ket{\Psi}$ is the unique ground state of a gapped local Hamiltonian, then the asymptotic -behaviour of such correlation functions is that they decay exponentially in the distance -between the two sites. This exponential thus defines a length scale $\xi$ via $\exp(-d/\xi)$ -with $d$ the relevant distance. The length scale $\xi$ is known as the correlation length of -the system. - -When the system is gapless, static correlation functions still go to zero in the limit of -infinite separation distance, but rather decay as an algebraic function of the distance, -i.e. they give rise to power laws. The exponents that appear in these power laws do -typically have universal values that are set by general properties such as the number of -spatial dimensions, the global symmetries in the system, etc. In particular for the case of -one-dimensional system, there is a rich literature and well developed framework for -analysing such gapless systems using methods from conformal field theory. - -Finally, in systems with potential symmetry breaking, the static correlation function of the -order parameter with itself is an extremely useful diagnostic. In particular, when the system -has symmetry breaking, the large distance limit of the correlation function does not vanish -and the system is said to contain *long range order*. Unlike the expectation value of the local -order parameter, which can have a nonzero expectation value for particularly chosen -symmetry breaking ground states but is still zero for other choices of ground states, the -value of the correlation function and its large distance limit is insensitive to the specifically -chosen ground state out of the ground subspace that it is computed with. For the transverse-field -Ising model, symmetry breaking will thus be present whenever - -$$ C_{i,j} = \braket{\Psi \vert \sigma^z_i \sigma^z_j \vert \Psi} $$ - -does not decay to zero limit for large distance between sites $i$ and $j$. The limiting -value of this correlation function can then be considered as $m^2$, i.e. the square of the -local magnetisation that would be measured in some states of the ground subspace. - -Strictly speaking, the ground state static correlation function does not provide information -about excited states or other dynamical information of the Hamiltonian. In most physical -system, it however does provide some qualitative information. Since the static correlation -function, considered as a matrix with rows $i$ and columns $j$, has a particular structure -resulting from translation invariance, it can be diagonalised by a (multidimensional) -discrete Fourier transform. The resulting eigenvalues depend on the lattice momentum -$\kappa$ and are known as the static structure factor $S(\kappa)$. In particular, in the -case of a gapped system with unique ground state, these values are well defined for all -$\kappa$. Nonetheless, it can be argued (using different techniques) that maxima for -$S(\kappa)$ will correspond to momenta where the single particle excitations have minima in -their dispersion relations. For critical systems, $S(\kappa)$ can also have algebraic -divergences, whereas in the case of long range order, $S(\kappa)$ will contain a Dirac-delta -type of divergence, typically at zero momentum, unless there is some spatially repeating -pattern in the way symmetry is broken (and thus also translation invariance is broken). - -More detailed quantitative information about the spectrum of excited states is contained in -the time-dependent correlation function - -```{math} -G^{A,B}_{i,j}(t) &= \braket{\Psi_0\vert \hat{A}_i(t)^\dagger \hat{B}_j(0)\vert \Psi_0}\\ -&=\braket{\Psi_0\vert \mathrm{e}^{+\mathrm{i} \hat{H} t} \hat{A}_i^\dagger \mathrm{e}^{-\mathrm{i} \hat{H} t} \hat{B}_j\vert \Psi_0} \\ -&=\braket{\Psi_0\vert \hat{A}_i \mathrm{e}^{-\mathrm{i} (\hat{H}-E_0) t} \hat{B}_j\vert \Psi_0} -``` - -On the first line, we have used operator -$\hat{A}(t) = \mathrm{e}^{+\mathrm{i} t \hat{H}}\hat{A} \mathrm{e}^{-\mathrm{i} t \hat{H}}$ -in the Heisenberg picture. In going from the second to the third line, we have used that -$\ket{\Psi_0}$ is the ground state of $\hat{H}$ with ground state energy $E_0$. Again, this -quantity will depend on the relative lattice vector connecting sites $i$ and $j$ in a -translation-invariant system. Once again, we can diagonalise the spatial dependence using a -multidimensional discrete Fourier transform. If we now furthermore also perform a Fourier -transform of the time-dependence into frequency space, we obtain the *dynamical structure -factor* given by - -$$ S^{A,B}(\kappa, \omega) = \sum_{n} \delta(\omega- (E_n - E_0))\braket{\Psi_0 \vert \hat{A}(\kappa)^\dagger | \Psi_n}\braket{\Psi_n \ \hat{B}(k\kappa) \vert \Psi_0} $$ - -Here, $\hat{A}(k\kappa)$ and $\hat{B}(\kappa)$ correspond to the discrete Fourier transforms -of $\hat{A}_i$, which amounts to the momentum superposition. As a consequence, -$\hat{B}(\kappa) \ket{\Psi_0}$ is a state with definite momentum $k$ (provided the ground -state is translation invariant), and thus only has overlap with excited states -$\ket{\Psi_n}$ with momentum $\kappa$. Because of the factor $\delta(\omega - (E_n -E_0))$, -the dynamical structure factor $S^{A,B}(\kappa, \omega)$ can be nonzero only if there exist -eigenstates with momentum $\kappa$ and excitation energy $\omega$ in the spectrum of the -Hamiltonian $\hat{H}$. By studying $S^{A,B}(\kappa, \omega)$ for different choices of -operators $\hat{A}$ and $\hat{B}$, we can detect all eigenstates and map out the full -(low-energy) spectrum of $\hat{H}$. diff --git a/pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.ipynb b/pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.ipynb deleted file mode 100644 index d30f19a6..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.ipynb +++ /dev/null @@ -1,253 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "82884509", - "metadata": {}, - "source": [ - "(quantum_mechanics)=\n", - "# Quantum Mechanics and its Postulates\n", - "\n", - "While the energy levels of the hydrogen atom played an important role in the historical\n", - "development of quantum mechanics, it became almost immediately clear that the true challenge\n", - "is in applying the laws of quantum mechanics to systems with many interacting particles or\n", - "fields. Note that the formalism of quantum mechanics, and in particular its postulates, are\n", - "generically valid and not restricted to the description of a single particle. Quantum field\n", - "theory also follows these postulates and is thus not a generalisation of quantum mechanics,\n", - "but rather a specific case of it. These postulates characterise the mathematical model by\n", - "which quantum mechanics describes physical systems, and more specifically how it represents\n", - "states, observables, measurements and dynamics. We briefly reiterate these postulates and\n", - "base our discussion on the wonderfull lecture notes \"Quantum Information and Computation\" by\n", - "John Preskill.\n", - "\n", - "##\t**Postulate 1: States**\n", - "\n", - "The state of an isolated quantum system is associated to a ray of vectors in a complex\n", - "Hilbert space $\\mathbb{H}$.\n", - "\n", - "A Hilbert space is a metric complete inner product space. Let us unpack this definition:\n", - "1. $\\mathbb{H}$ is a vector space in this case over the complex numbers. We will denote\n", - " elements of this vector space with Dirac's ket notation $\\ket{\\psi}$. In particular, we\n", - " can build linear combinations\n", - "\n", - " ```{math}\n", - " \\ket{\\psi} = a \\ket{\\psi_1} + b \\ket{\\psi_2}\n", - " ```\n", - "\n", - " for all $a, b \\in \\mathbb{C}$ and all $\\ket{\\psi_1}, \\ket{\\psi_2} \\in \\mathbb{H}$.\n", - "\n", - "2. $\\mathbb{H}$ has an inner product, which maps two vectors $\\ket{\\psi}$ and $\\ket{\\varphi}$\n", - " onto a scalar $\\braket{\\varphi|\\psi} \\in \\mathbb{C}$ with the properties of\n", - " * Linearity: $\\bra{\\varphi} ( a \\ket{\\psi_1} + b \\ket{\\psi_2}) = a \\braket{ \\varphi | \\psi_1} + b \\braket{ \\varphi | \\psi_2}$\n", - " * Skew-symmetry: $\\braket{ \\varphi | \\psi} = \\braket{ \\psi | \\varphi}^\\ast$\n", - "\t * Positivity: $\\braket{ \\psi | \\psi} \\geq 0$ with equality only if $\\ket{\\psi} = 0$.\n", - "\t\n", - " This last property enables us to define a norm $\\lVert \\psi \\rVert = \\lVert \\ket{\\psi}\n", - " \\rVert = \\sqrt{\\braket{\\psi|\\psi}}$, which satisfies known properties such as $\\lVert \\psi\n", - " \\rVert = 0 \\Leftrightarrow \\ket{\\psi} = 0$ $\\lVert a \\ket{\\psi} \\rVert = \\vert a\\vert\n", - " \\lVert \\psi \\rVert$ and the triangle inequality $\\lVert \\ket{\\varphi} + \\ket{\\psi} \\rVert\n", - " \\leq \\lVert \\varphi \\rVert + \\lVert \\psi \\rVert$.\n", - "\n", - "3. The final property of metric completeness is a technical requirement that is only\n", - " relevant in infinite-dimensional Hilbert spaces. Firstly, a metric is a notation of\n", - " distance between the elements in $\\mathbb{H}$, which is provided by the norm of the\n", - " difference, i.e. $d(\\varphi, \\psi) = \\lVert \\varphi - \\psi \\rVert$.\n", - " \n", - " Completeness of the metric is a specific property that guarantees that certain sequences\n", - " of vectors are guaranteed to have a limit value that also exists in $\\mathbb{H}$. This\n", - " is necessary to make sense of e.g. Fourier series.\n", - "\n", - "The state of a quantum system is associated to a ray of vectors, which is the\n", - "one-dimensional space $\\{ a \\ket{\\psi} , \\forall a \\in \\mathbb{C}\\}$ spanned by a single\n", - "(nonzero) vector $\\ket{\\psi} \\in \\mathbb{H}$. We will describe the state of the system using\n", - "a single representative $\\ket{\\psi}$ of this ray, which we typically choose such that\n", - "$\\braket{ \\psi | \\psi} = 1$. However, this does not fix the representative completely, as we\n", - "can still add arbitrary phases $\\exp(\\mathrm{i}\\alpha)$, i.e. $\\ket{\\psi}$ and\n", - "$\\mathrm{e}^{\\mathrm{i}\\alpha} \\ket{\\psi}$ describe the same state.\n", - "\n", - "The best known Hilbert space from your courses on single-particle quantum mechanics is\n", - "probably $L^2(\\mathbb{R}^n)$, the Hilbert space for a single quantum particle moving in the\n", - "$n$-dimensional coordinate space $\\mathbb{R}^n$ (typically $n=1,2,3$). This Hilbert space\n", - "corresponds to the space of all square-integrable functions $\\psi:\\mathbb{R}^d \\to\n", - "\\mathbb{C}: x \\mapsto \\psi(x)$ and the inner product is given by\n", - "\n", - "$$\\braket{\\varphi | \\psi} = \\int_{\\mathbb{R}^n} \\varphi(x)^\\ast \\psi(x)\\,\\mathrm{d} x$$\n", - "\n", - "However, this is already a complicated Hilbert space from a technical perspective. Hilbert\n", - "spaces can also be finite-dimensional, i.e. $\\mathbb{C}^d$, the space of column vectors of\n", - "length $d$, with the standard Euclidean inner product\n", - "\n", - "$$\\braket{\\varphi | \\psi} = \\sum_{i=1}^d \\varphi_i^\\ast \\psi_i$$\n", - "\n", - "These Hilbert spaces will be very important in our discussion. The simplest nontrivial case\n", - "corresponds to $d=2$ and the associated quantum system is known under various names. It is\n", - "often referred to as a qubit in the context of quantum information theory. There are various\n", - "ways in which qubits can be physically realised. Another common example of a two-dimensional\n", - "Hilbert space is for describing the spin degree of freedom of an electron, or another\n", - "particle with spin quantum number 1/2. Such a reduced description (forgetting about the\n", - "position) is possible if the electron is localised in space, for example when it is strongly\n", - "bound to an atom.\n", - "\n", - "If we do want to describe a particle that moves in space, we might also consider it to exist\n", - "only at discrete positions in space, i.e. on a lattice. For example, on a one-dimensional\n", - "lattice (a.k.a. a chain) with $L$ sites, the Hilbert space would also correspond to\n", - "$\\mathbb{H} = \\mathbb{C}^L$ and the standard basis vectors $\\vert j \\rangle, j=1,\\dots,L$\n", - "correspond to the state of the system if the particle is exactly localised on site $j$. We\n", - "can also consider infinitely large lattices, e.g. the one-dimensional chain where there is a\n", - "site associated with every $j \\in \\mathbb{Z}$ (or the n-dimensional hypercubic lattice\n", - "$\\mathbb{Z}^n$). The resulting Hilbert space is then spanned by the states $\\vert j \\rangle$\n", - "for all $j \\in \\mathbb{Z}$, and is thus infinite-dimensional but with a straightforward\n", - "countably infinite basis.\n", - "\n", - "Of course, our goal is to find the Hilbert space of a many body system. We return to this\n", - "question below and devote a complete section to it.\n", - "\n", - "##\t**Postulate 2: Observables**\n", - "\n", - "Physical observables of the system correspond to self-adjoint (a.k.a. Hermitian) linear\n", - "operators on the Hilbert space $\\mathbb{H}$.\n", - "\n", - "An operator $\\hat{A}$ on $\\mathbb{H}$ is a linear map $\\hat{A}:\\mathbb{H} \\to \\mathbb{H}$,\n", - "i.e. a map from vectors to vectors that satisfies\n", - "\n", - "```{math}\n", - "\\hat{A}( a \\ket{\\varphi} + b \\lvert \\psi \\rangle) = a \\hat{A}(\\ket{\\varphi}) + b\n", - "\\hat{A}(\\ket{\\psi})\n", - "```\n", - "\n", - "The adjoint of an operator $\\hat{A}$ is a new operator $\\hat{A}^\\dagger$ that is constructed\n", - "such that\n", - "\n", - "```{math}\n", - "\\bra{\\varphi} \\hat{A} \\psi \\rangle = \\langle \\hat{A}^\\dagger \\varphi \\ket{\\psi}\n", - "```\n", - "\n", - "for all $\\ket{\\varphi}, \\ket{\\psi} \\in \\mathbb{H}$ and where $\\vert \\hat{A}\\psi \\rangle =\n", - "\\hat{A} \\ket{\\psi}$. This definition requires that $(a_1 \\hat{A}_1 + a_2 \\hat{A}_2)^\\dagger\n", - "= a_1^\\ast \\hat{A}_1^\\dagger + a_2^\\ast \\hat{A}_2^\\dagger$ and $(\\hat{A}_1\n", - "\\hat{A}_2)^\\dagger = \\hat{A}_2^\\dagger \\hat{A}_1^\\dagger$.\n", - "\n", - "A self-adjoint operator is an operator such that $\\hat{A}^\\dagger = \\hat{A}$ or thus\n", - "\n", - "```{math}\n", - "\\braket{\\varphi | \\hat{A} \\psi } = \\braket{ \\hat{A}^\\dagger \\varphi | \\psi}\n", - "```\n", - "\n", - "for all $\\ket{\\varphi}, \\ket{\\psi} \\in \\mathbb{H}$. Linear combinations of self-adjoint\n", - "operators with real coefficients are self-adjoint. The composition of two self-adjoint\n", - "linear operators $\\hat{A}_1 \\hat{A}_2$ is self-adjoint if and only if\n", - "\n", - "```{math}\n", - "\\left[ \\hat{A}_1 , \\hat{A}_2 \\right] = \\hat{A}_1 \\hat{A}_2 - \\hat{A}_2 \\hat{A}_1 = 0,\n", - "```\n", - "\n", - "i.e. if the operators also commute. Self-adjoint operators have real eigenvalues, and\n", - "eigenvectors associated to distinct eigenvalues are orthogonal. In a finite-dimensional\n", - "Hilbert space, self-adjoint operators admit a spectral decomposition\n", - "\n", - "$$\\hat{A} = \\sum_{n} \\lambda_n \\hat{P}_n$$\n", - "\n", - "where $\\hat{P}_n$ is the spectral projector onto the eigenspace associated with $\\lambda_n$.\n", - "The spectral projectors satisfy $\\hat{P}_n \\hat{P}_m = \\delta_{n,m} \\hat{P}_n$,\n", - "$\\hat{P}_n^\\dagger = \\hat{P}_n$ and $\\sum_{n} \\hat{P}_n = \\mathbb{1}$, the identity\n", - "operator. If $\\lambda_n$ has one-dimensional eigenspace spanned by the eigenvector\n", - "$\\vert\\phi_n\\rangle$, then\n", - "\n", - "```{math}\n", - "\\hat{P}_n = \\frac{\\vert \\phi_n \\rangle \\langle \\phi_n \\vert}{\\langle \\phi_n \\vert \\phi_n \\rangle}\n", - "```\n", - "\n", - "where the denominator can be omitted if the eigenvector is normalised.\n", - "\n", - "In the language of matrices, these properties can be rephrased as follows: With respect to\n", - "an orthonormal basis choice, self-adjoint operators are represented as hermitian matrices.\n", - "Such matrices can be diagonalised by a unitary transformation, or thus, we can construct a\n", - "complete basis consisting of eigenvectors. With respect to this basis, the self-adjoint\n", - "operator is represented by a diagonal matrix with real values on the diagonal.\n", - "\n", - "## **Postulate 3: Measurements, Expectation Values and Collapse**\n", - "\n", - "Given an observable to which we associate the operator $\\hat{A}$, we now need to prescribe\n", - "the result of measuring this observable with respect to a system that is in a state\n", - "$\\ket{\\psi}$. The most compact way of describing the result is by stating that, the\n", - "expectation value $\\braket{\\hat{A}}$ (= the mean value of the measurement when averaging\n", - "over an ensemble of identical copies of the system) is given by\n", - "\n", - "```{math}\n", - "\\braket{\\hat{A}} = \\frac{\\braket{\\psi \\vert \\hat{A} \\vert \\psi}}{\\braket{\\psi \\vert \\psi}}\n", - "```\n", - "\n", - "By exploiting the fact that this also prescribes the expectation value of all higher moments\n", - "$\\braket{\\hat{A}^k}$, this determines the full probability distribution of the measurement\n", - "outcome, and yields the more familiar result: The only possible measurement outcomes are\n", - "given by the eigenvalues $\\lambda_n$ of $\\hat{A}$, and for a system in state $\\ket{\\psi}$\n", - "(now assumed normalized), the probability of obtaining $\\lambda_n$ is given by $p_n =\n", - "\\braket{\\psi \\vert \\hat{P}_n \\vert \\psi}$ with $\\hat{P}_n$ the spectral projector from\n", - "above. In the case that $\\lambda_n$ has a single (linearly independent) eigenvector\n", - "$\\ket{\\phi_n}$ (also assumed normalised), this amounts to $p_n = \\vert\n", - "\\braket{\\phi_n|\\psi}\\vert^2$.\n", - "\n", - "There is a second part to the measurement postulate, which states that, if the measurement\n", - "is immediately repeated (without intermediate dynamics, as described by the next postulate),\n", - "then the same measurement outcome is obtained. Because the measurement outcome with respect\n", - "to the initial state $\\ket{\\psi}$ is probabilistic and can yield different results, this\n", - "requires that after the first measurement, the state changes is changed. This is the\n", - "well-known **collapse** of the wave function. More specifically, if a measurement of\n", - "observable $\\hat{A}$ is performed in a system with state $\\ket{\\psi}$ and the measurement\n", - "value $\\lambda_n$ is obtained, then the state of the system changes to\n", - "\n", - "```{math}\n", - "\\ket{\\psi} \\longrightarrow \\frac{\\hat{P}_n \\ket{\\psi}}{\\lVert \\hat{P}_n \\ket{\\psi}\\rVert}.\n", - "```\n", - "\n", - "Note that the denominator cannot vanish, as otherwise the probability of having obtained\n", - "measurement outcome $\\lambda_n$ would have been zero in the first place.\n", - "\n", - "## **Postulate 4: Dynamics**\n", - "\n", - "During time intervals without measurements, the state of an isolated quantum system evolves \n", - "unitarily according to the (first order linear) differential equation\n", - "\n", - "```{math}\n", - "\\frac{\\mathrm{d}\\ }{\\mathrm{d} t} \\ket{\\psi(t)} = - \\mathrm{i} \\hat{H}(t) \\ket{\\psi(t)}\n", - "```\n", - "\n", - "known as the Schr\\\"{o}dinger equation, where $\\hat{H}(t)$ is the Hamiltonian of the system,\n", - "which may itself be time-dependent. In the case of a time-independent Hamiltonian, we can\n", - "define the evolution operator\n", - "\n", - "```{math}\n", - "U(t, t') = \\exp\\left(-\\mathrm{i}(t-t')\\hat{H}\\right)\n", - "```\n", - "\n", - "which relates states at different times via $\\ket{\\psi(t)} = \\hat{U}(t, t') \\ket{\\psi(t')}$\n", - "and is clearly a unitary operator. Clearly, we need to know the Hamiltonian of a system in\n", - "order to even start thinking about modelling its quantum properties. We will always assume\n", - "that the Hamiltonian is given. In practice, however, the situation can be much more\n", - "complicated. Typically, we want to build only an effective quantum description of the system\n", - "(e.g. only the electrons, only certain electrons, $\\ldots$) and not start all the way down\n", - "at the level of fundamental particles and the standard model (which is also only an\n", - "effective model valid up to some energy scale)." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.md b/pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.md deleted file mode 100644 index d0b21d84..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/QuantumMechanics.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(quantum_mechanics)= -# Quantum Mechanics and its Postulates - -While the energy levels of the hydrogen atom played an important role in the historical -development of quantum mechanics, it became almost immediately clear that the true challenge -is in applying the laws of quantum mechanics to systems with many interacting particles or -fields. Note that the formalism of quantum mechanics, and in particular its postulates, are -generically valid and not restricted to the description of a single particle. Quantum field -theory also follows these postulates and is thus not a generalisation of quantum mechanics, -but rather a specific case of it. These postulates characterise the mathematical model by -which quantum mechanics describes physical systems, and more specifically how it represents -states, observables, measurements and dynamics. We briefly reiterate these postulates and -base our discussion on the wonderfull lecture notes "Quantum Information and Computation" by -John Preskill. - -## **Postulate 1: States** - -The state of an isolated quantum system is associated to a ray of vectors in a complex -Hilbert space $\mathbb{H}$. - -A Hilbert space is a metric complete inner product space. Let us unpack this definition: -1. $\mathbb{H}$ is a vector space in this case over the complex numbers. We will denote - elements of this vector space with Dirac's ket notation $\ket{\psi}$. In particular, we - can build linear combinations - - ```{math} - \ket{\psi} = a \ket{\psi_1} + b \ket{\psi_2} - ``` - - for all $a, b \in \mathbb{C}$ and all $\ket{\psi_1}, \ket{\psi_2} \in \mathbb{H}$. - -2. $\mathbb{H}$ has an inner product, which maps two vectors $\ket{\psi}$ and $\ket{\varphi}$ - onto a scalar $\braket{\varphi|\psi} \in \mathbb{C}$ with the properties of - * Linearity: $\bra{\varphi} ( a \ket{\psi_1} + b \ket{\psi_2}) = a \braket{ \varphi | \psi_1} + b \braket{ \varphi | \psi_2}$ - * Skew-symmetry: $\braket{ \varphi | \psi} = \braket{ \psi | \varphi}^\ast$ - * Positivity: $\braket{ \psi | \psi} \geq 0$ with equality only if $\ket{\psi} = 0$. - - This last property enables us to define a norm $\lVert \psi \rVert = \lVert \ket{\psi} - \rVert = \sqrt{\braket{\psi|\psi}}$, which satisfies known properties such as $\lVert \psi - \rVert = 0 \Leftrightarrow \ket{\psi} = 0$ $\lVert a \ket{\psi} \rVert = \vert a\vert - \lVert \psi \rVert$ and the triangle inequality $\lVert \ket{\varphi} + \ket{\psi} \rVert - \leq \lVert \varphi \rVert + \lVert \psi \rVert$. - -3. The final property of metric completeness is a technical requirement that is only - relevant in infinite-dimensional Hilbert spaces. Firstly, a metric is a notation of - distance between the elements in $\mathbb{H}$, which is provided by the norm of the - difference, i.e. $d(\varphi, \psi) = \lVert \varphi - \psi \rVert$. - - Completeness of the metric is a specific property that guarantees that certain sequences - of vectors are guaranteed to have a limit value that also exists in $\mathbb{H}$. This - is necessary to make sense of e.g. Fourier series. - -The state of a quantum system is associated to a ray of vectors, which is the -one-dimensional space $\{ a \ket{\psi} , \forall a \in \mathbb{C}\}$ spanned by a single -(nonzero) vector $\ket{\psi} \in \mathbb{H}$. We will describe the state of the system using -a single representative $\ket{\psi}$ of this ray, which we typically choose such that -$\braket{ \psi | \psi} = 1$. However, this does not fix the representative completely, as we -can still add arbitrary phases $\exp(\mathrm{i}\alpha)$, i.e. $\ket{\psi}$ and -$\mathrm{e}^{\mathrm{i}\alpha} \ket{\psi}$ describe the same state. - -The best known Hilbert space from your courses on single-particle quantum mechanics is -probably $L^2(\mathbb{R}^n)$, the Hilbert space for a single quantum particle moving in the -$n$-dimensional coordinate space $\mathbb{R}^n$ (typically $n=1,2,3$). This Hilbert space -corresponds to the space of all square-integrable functions $\psi:\mathbb{R}^d \to -\mathbb{C}: x \mapsto \psi(x)$ and the inner product is given by - -$$\braket{\varphi | \psi} = \int_{\mathbb{R}^n} \varphi(x)^\ast \psi(x)\,\mathrm{d} x$$ - -However, this is already a complicated Hilbert space from a technical perspective. Hilbert -spaces can also be finite-dimensional, i.e. $\mathbb{C}^d$, the space of column vectors of -length $d$, with the standard Euclidean inner product - -$$\braket{\varphi | \psi} = \sum_{i=1}^d \varphi_i^\ast \psi_i$$ - -These Hilbert spaces will be very important in our discussion. The simplest nontrivial case -corresponds to $d=2$ and the associated quantum system is known under various names. It is -often referred to as a qubit in the context of quantum information theory. There are various -ways in which qubits can be physically realised. Another common example of a two-dimensional -Hilbert space is for describing the spin degree of freedom of an electron, or another -particle with spin quantum number 1/2. Such a reduced description (forgetting about the -position) is possible if the electron is localised in space, for example when it is strongly -bound to an atom. - -If we do want to describe a particle that moves in space, we might also consider it to exist -only at discrete positions in space, i.e. on a lattice. For example, on a one-dimensional -lattice (a.k.a. a chain) with $L$ sites, the Hilbert space would also correspond to -$\mathbb{H} = \mathbb{C}^L$ and the standard basis vectors $\vert j \rangle, j=1,\dots,L$ -correspond to the state of the system if the particle is exactly localised on site $j$. We -can also consider infinitely large lattices, e.g. the one-dimensional chain where there is a -site associated with every $j \in \mathbb{Z}$ (or the n-dimensional hypercubic lattice -$\mathbb{Z}^n$). The resulting Hilbert space is then spanned by the states $\vert j \rangle$ -for all $j \in \mathbb{Z}$, and is thus infinite-dimensional but with a straightforward -countably infinite basis. - -Of course, our goal is to find the Hilbert space of a many body system. We return to this -question below and devote a complete section to it. - -## **Postulate 2: Observables** - -Physical observables of the system correspond to self-adjoint (a.k.a. Hermitian) linear -operators on the Hilbert space $\mathbb{H}$. - -An operator $\hat{A}$ on $\mathbb{H}$ is a linear map $\hat{A}:\mathbb{H} \to \mathbb{H}$, -i.e. a map from vectors to vectors that satisfies - -```{math} -\hat{A}( a \ket{\varphi} + b \lvert \psi \rangle) = a \hat{A}(\ket{\varphi}) + b -\hat{A}(\ket{\psi}) -``` - -The adjoint of an operator $\hat{A}$ is a new operator $\hat{A}^\dagger$ that is constructed -such that - -```{math} -\bra{\varphi} \hat{A} \psi \rangle = \langle \hat{A}^\dagger \varphi \ket{\psi} -``` - -for all $\ket{\varphi}, \ket{\psi} \in \mathbb{H}$ and where $\vert \hat{A}\psi \rangle = -\hat{A} \ket{\psi}$. This definition requires that $(a_1 \hat{A}_1 + a_2 \hat{A}_2)^\dagger -= a_1^\ast \hat{A}_1^\dagger + a_2^\ast \hat{A}_2^\dagger$ and $(\hat{A}_1 -\hat{A}_2)^\dagger = \hat{A}_2^\dagger \hat{A}_1^\dagger$. - -A self-adjoint operator is an operator such that $\hat{A}^\dagger = \hat{A}$ or thus - -```{math} -\braket{\varphi | \hat{A} \psi } = \braket{ \hat{A}^\dagger \varphi | \psi} -``` - -for all $\ket{\varphi}, \ket{\psi} \in \mathbb{H}$. Linear combinations of self-adjoint -operators with real coefficients are self-adjoint. The composition of two self-adjoint -linear operators $\hat{A}_1 \hat{A}_2$ is self-adjoint if and only if - -```{math} -\left[ \hat{A}_1 , \hat{A}_2 \right] = \hat{A}_1 \hat{A}_2 - \hat{A}_2 \hat{A}_1 = 0, -``` - -i.e. if the operators also commute. Self-adjoint operators have real eigenvalues, and -eigenvectors associated to distinct eigenvalues are orthogonal. In a finite-dimensional -Hilbert space, self-adjoint operators admit a spectral decomposition - -$$\hat{A} = \sum_{n} \lambda_n \hat{P}_n$$ - -where $\hat{P}_n$ is the spectral projector onto the eigenspace associated with $\lambda_n$. -The spectral projectors satisfy $\hat{P}_n \hat{P}_m = \delta_{n,m} \hat{P}_n$, -$\hat{P}_n^\dagger = \hat{P}_n$ and $\sum_{n} \hat{P}_n = \mathbb{1}$, the identity -operator. If $\lambda_n$ has one-dimensional eigenspace spanned by the eigenvector -$\vert\phi_n\rangle$, then - -```{math} -\hat{P}_n = \frac{\vert \phi_n \rangle \langle \phi_n \vert}{\langle \phi_n \vert \phi_n \rangle} -``` - -where the denominator can be omitted if the eigenvector is normalised. - -In the language of matrices, these properties can be rephrased as follows: With respect to -an orthonormal basis choice, self-adjoint operators are represented as hermitian matrices. -Such matrices can be diagonalised by a unitary transformation, or thus, we can construct a -complete basis consisting of eigenvectors. With respect to this basis, the self-adjoint -operator is represented by a diagonal matrix with real values on the diagonal. - -## **Postulate 3: Measurements, Expectation Values and Collapse** - -Given an observable to which we associate the operator $\hat{A}$, we now need to prescribe -the result of measuring this observable with respect to a system that is in a state -$\ket{\psi}$. The most compact way of describing the result is by stating that, the -expectation value $\braket{\hat{A}}$ (= the mean value of the measurement when averaging -over an ensemble of identical copies of the system) is given by - -```{math} -\braket{\hat{A}} = \frac{\braket{\psi \vert \hat{A} \vert \psi}}{\braket{\psi \vert \psi}} -``` - -By exploiting the fact that this also prescribes the expectation value of all higher moments -$\braket{\hat{A}^k}$, this determines the full probability distribution of the measurement -outcome, and yields the more familiar result: The only possible measurement outcomes are -given by the eigenvalues $\lambda_n$ of $\hat{A}$, and for a system in state $\ket{\psi}$ -(now assumed normalized), the probability of obtaining $\lambda_n$ is given by $p_n = -\braket{\psi \vert \hat{P}_n \vert \psi}$ with $\hat{P}_n$ the spectral projector from -above. In the case that $\lambda_n$ has a single (linearly independent) eigenvector -$\ket{\phi_n}$ (also assumed normalised), this amounts to $p_n = \vert -\braket{\phi_n|\psi}\vert^2$. - -There is a second part to the measurement postulate, which states that, if the measurement -is immediately repeated (without intermediate dynamics, as described by the next postulate), -then the same measurement outcome is obtained. Because the measurement outcome with respect -to the initial state $\ket{\psi}$ is probabilistic and can yield different results, this -requires that after the first measurement, the state changes is changed. This is the -well-known **collapse** of the wave function. More specifically, if a measurement of -observable $\hat{A}$ is performed in a system with state $\ket{\psi}$ and the measurement -value $\lambda_n$ is obtained, then the state of the system changes to - -```{math} -\ket{\psi} \longrightarrow \frac{\hat{P}_n \ket{\psi}}{\lVert \hat{P}_n \ket{\psi}\rVert}. -``` - -Note that the denominator cannot vanish, as otherwise the probability of having obtained -measurement outcome $\lambda_n$ would have been zero in the first place. - -## **Postulate 4: Dynamics** - -During time intervals without measurements, the state of an isolated quantum system evolves -unitarily according to the (first order linear) differential equation - -```{math} -\frac{\mathrm{d}\ }{\mathrm{d} t} \ket{\psi(t)} = - \mathrm{i} \hat{H}(t) \ket{\psi(t)} -``` - -known as the Schr\"{o}dinger equation, where $\hat{H}(t)$ is the Hamiltonian of the system, -which may itself be time-dependent. In the case of a time-independent Hamiltonian, we can -define the evolution operator - -```{math} -U(t, t') = \exp\left(-\mathrm{i}(t-t')\hat{H}\right) -``` - -which relates states at different times via $\ket{\psi(t)} = \hat{U}(t, t') \ket{\psi(t')}$ -and is clearly a unitary operator. Clearly, we need to know the Hamiltonian of a system in -order to even start thinking about modelling its quantum properties. We will always assume -that the Hamiltonian is given. In practice, however, the situation can be much more -complicated. Typically, we want to build only an effective quantum description of the system -(e.g. only the electrons, only certain electrons, $\ldots$) and not start all the way down -at the level of fundamental particles and the standard model (which is also only an -effective model valid up to some energy scale). diff --git a/pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.ipynb b/pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.ipynb deleted file mode 100644 index 05d3bcfd..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.ipynb +++ /dev/null @@ -1,215 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "85bcf2d6", - "metadata": {}, - "source": [ - "(quantum_to_classical)=\n", - "# Quantum-to-Classical Mapping\n", - "\n", - "In this final section, we introduce a general technique that essentially enables us to map\n", - "any quantum lattice system in $d$ dimensions to a classical partition function in $d+1$\n", - "dimensions, up to some caveats that we will return to at the end of this section.\n", - "\n", - "## Suzuki-Trotter decomposition\n", - "\n", - "Remember that thermal expectation values are given by\n", - "\n", - "$$\\braket{\\hat{O}} = \\mathrm{Tr}\\left[\\hat{O} \\mathrm{e}^{-\\beta \\hat{H}}\\right]/Z(\\beta)= \\mathrm{Tr}\\left[\\mathrm{e}^{-\\beta \\hat{H}/2} \\hat{O} \\mathrm{e}^{-\\beta \\hat{H}/2}\\right]/Z(\\beta)$$\n", - "\n", - "with the thermal partition function $Z(\\beta)$ given by\n", - "\n", - "$$Z(\\beta) = \\mathrm{Tr} \\mathrm{e}^{-\\beta \\hat{H}}.$$\n", - "\n", - "The ground state physics is encoded in the limit $\\beta \\to \\infty$. Note that, if the\n", - "system has a unique ground state, we can obtain the ground state $\\ket{\\Psi_0}$ of a quantum\n", - "system by starting from essentially a random state $\\ket{\\Phi}$ and evolving it in imaginary\n", - "time $\\tau = -\\mathrm{i} t$ for sufficiently long\n", - "\n", - "$$\\ket{\\Psi_0} \\sim \\lim_{\\tau \\to \\infty} \\mathrm{e}^{-\\tau \\hat{H}} \\ket{\\Phi}$$\n", - "\n", - "Expanding the initial state $\\ket{\\phi}$ in the energy eigenbasis of $\\hat{H}$, we see that\n", - "the only condition is that it is not orthogonal to the ground state (subspace). In addition,\n", - "the ground state will be well approximated if $\\tau \\Delta E \\gg 1$, with \n", - "$\\Delta E=E_1 - E_0$ the energy gap. This imaginary time evolution also forms the basic\n", - "ingredient of several numerical algorithms for approximating ground states of quantum many\n", - "body systems, often in combination with the Suzuki-Trotter decomposition which is introduced\n", - "below.\n", - "\n", - "Using this approach, the following expression for the ground state expectation value of on\n", - "operator $\\hat{O}$ is obtained\n", - "\n", - "$$\\braket{\\hat{O}} = \\lim_{\\tau\\to\\infty} \\braket{\\phi\\vert \\mathrm{e}^{-\\tau \\hat{H}} \\hat{O} \\mathrm{e}^{-\\tau \\hat{H}}\\vert \\phi}/\\braket{\\phi\\vert\\mathrm{e}^{-2\\tau \\hat{H}} \\vert\\phi}$$\n", - "\n", - "This expression can be compared to the thermal expectation value with $\\beta = 2\\tau$; the\n", - "only difference is in the boundary conditions.\n", - "\n", - "For a quantum many body system, taking the exponential is as hard as determining the full\n", - "diagonalisation of the hamiltonian, which is impossible due to the exponentially large\n", - "Hilbert space. If the hamiltonian is a sum of local terms, each of these terms can be\n", - "exponentiated easily, but for arbitrary $\\tau$ there is no relation ship between\n", - "$\\exp(-\\tau \\sum_{i} \\hat{h}_i)$ and the individual $\\exp(-\\tau \\hat{h}_i)$, unless the\n", - "different $\\hat{h}_i$ commute. However, for an infinitesimal time step $\\epsilon$, we can\n", - "use to Baker-Campbell-Hausdorff formula (or better yet, the Zassenhaus formula) to obtain\n", - "\n", - "$$\\exp(-\\epsilon \\sum_{i} \\hat{h}_i) = \\prod_i \\exp(-\\epsilon \\hat{h}_i) +\n", - "\\mathcal{O}(\\epsilon^2).$$\n", - "\n", - "This then leads to the **Suzuki-Trotter decomposition**\n", - " \n", - "$$\\exp\\left(-\\tau \\sum_{i} \\hat{h}_i\\right) = \\lim_{M\\to\\infty} \\left( \\mathrm{e}^{-\\frac{\\tau}{M} \\sum_i \\hat{h}_i} \\right)^M =\\lim_{M\\to\\infty} \\left(\\prod_i \\mathrm{e}^{-\\frac{\\tau}{M} \\hat{h}_i} + \\mathcal{O}(\\tau^2/M^2)\\right)^M = \\lim_{M\\to\\infty} \\left( \\left[\\prod_i \\mathrm{e}^{-\\frac{\\tau}{M} \\hat{h}_i}\\right]^M + \\mathcal{O}(\\tau^2/M)\\right)$$\n", - "\n", - "The product in the final expressions requires chosing a specific order, exactly because the terms $\\hat{h}_i$\n", - "and thus also the factors $\\mathrm{e}^{-\\frac{\\tau}{M} \\hat{h}_i}$ do not commute. The approximation\n", - "and error term are valid for arbitrary choices of ordering, but different orderings are not\n", - "equivalent. Particular choices can be more suitable for particular purposes. Furthermore,\n", - "note that splitting the time interval $[0,\\tau]$ into small segments $\\epsilon = \\tau/M$ is\n", - "also the starting point for deriving a path integral representation of the quantum partition\n", - "function. The next step is to insert a resolution of the identity in between the $N$\n", - "different factors, where the labels of the basis will behave as classical degrees of\n", - "freedom. For obtaining a path integral, the basis should be labeled by a number of\n", - "continuous degrees of freedom, which can then become continuous functions of time in the\n", - "limit $\\epsilon\\to 0$. Here, instead, we will keep $\\epsilon$ small but finite, and use a\n", - "discrete basis. \n", - "\n", - "## From quantum to statistical mechanics\n", - "\n", - "Let's start with a quantum system in $d=0$, i.e. a small number of spins, or in particular, a single spin,\n", - "described by a hamiltonian\n", - "\n", - "$$\\hat{H} = - h_x \\sigma^x - h_z \\sigma^z$$\n", - "\n", - "While we could in principle exponentiate $\\hat{H}$ directly as it is a $2 \\times 2$ matrix,\n", - "we will treat it using the Suzuki-Trotter decomposition. Throughout the remainder of this\n", - "section, we will use the $\\sigma^z$ basis, which we denote as $\\ket{1} = \\ket{\\uparrow}$ and\n", - "$\\ket{-1} = \\ket{\\downarrow}$. Inserting resolutions of the identity, we write\n", - "\n", - "$$Z(\\beta) = \\mathrm{Tr} \\mathrm{e}^{-\\beta \\hat{H}} = \\sum_{\\{s_k\\}=\\pm 1}\n", - "\\braket{s_1|\\mathrm{e}^{-\\epsilon \\hat{H}}|s_2}\\cdots \\braket{s_M-1| \\mathrm{e}^{-\\epsilon\n", - "\\hat{H}}|s_{M}} \\cdots \\braket{s_M| \\mathrm{e}^{-\\epsilon \\hat{H}}|s_{M+1}}$$\n", - "\n", - "with $s_{M+1} = s_1$, $M\\epsilon =\\beta$, and where\n", - "\n", - "```{math}\n", - "\\braket{s_{i}|\\mathrm{e}^{-\\epsilon \\hat{H}}|s_{i+1}} &= \\braket{s_{i} \\vert \\mathrm{e}^{-\\epsilon H} \\vert s_{i+1}} \\approx \\braket{s_{i} \\vert \\mathrm{e}^{\\epsilon h_z \\sigma^z}\\mathrm{e}^{\\epsilon h_x \\sigma^x} \\vert s_{i+1}}\\\\ \n", - "&= \\mathrm{e}^{\\epsilon h_z s_i} \\braket{s_{i} \\vert \\cosh(\\epsilon h_x) \\mathbb{1} + \\sinh(\\epsilon h_x) \\sigma^x \\vert s_{i+1}}\\\\\n", - " &= \\mathrm{e}^{K s_{i}s_{i+1} + h s_i + f_0}\n", - "```\n", - "\n", - "where the parameters in the last line are given by\n", - "$K= -\\frac{1}{2}\\log \\tanh(\\epsilon h_x)$, $h = \\epsilon h_z$ and\n", - "$f_0 =\\frac{1}{2}\\log[\\cosh(\\epsilon h_x)\\sinh(\\epsilon h_x)]$. \n", - "\n", - "We thus obtain\n", - "\n", - "$$Z(\\beta) = \\sum_{s_k} \\mathrm{e}^{\\sum_{i=1}^{M}K s_i s_{i+1} + h s_i},$$\n", - "\n", - "the partition function of the one-dimensional classical Ising model with periodic boundary\n", - "conditions. Indeed, $\\braket{s_{i}|\\mathrm{e}^{-\\epsilon H}|s_{i+1}}$ does exactly\n", - "correspond to the transfer matrix, and diagonalising the transfer matrix is the most\n", - "straightforward approach to solving the one-dimensional classical Ising model.\n", - "\n", - "## Higher dimensional generalisation\n", - "\n", - "We now apply the same approach to the Ising model with both transverse and longitudinal\n", - "field in $d$ dimensions, on a hypercubic lattice. We separate the hamiltonian in two parts\n", - "according to\n", - "\n", - "$$\\hat{H} = \\left(-J\\sum_{\\braket{i,j}} \\sigma^z_i \\sigma^z_j - h_z \\sum_{i} \\sigma^z_i\\right) + \\left(- h_x \\sum_{i} \\sigma^x_i\\right)= \\hat{H}_1 + \\hat{H}_2$$\n", - "\n", - "Note that $\\hat{H}_1$ and $\\hat{H}_2$ in itself contain commuting terms, but of course don't\n", - "mutually commute. We follow the same strategy, and will in every (imaginary) time step\n", - "introduce a resolution of the identity using the tensor product $\\sigma^z$ basis. We now denote\n", - "the basis at time step $k$ as $\\ket{\\{s_{i,k}\\}}$, where $i$ labels a site in the $d$\n", - "dimensional lattice hosting the quantum degrees of freedom, and $k$ labels points along the\n", - "imaginary time axis, which emerges as a new dimension in the problem. We find\n", - "\n", - "$$\\exp(-\\epsilon \\hat{H}_1)\\ket{\\{s_{i,k}\\}} = \\exp(\\epsilon J \\sum_{\\braket{i,j}} s_{i,k} s_{j,k}+\\epsilon h \\sum_i s_{i,k}) \\ket{\\{s_{i,k}\\}}$$\n", - "\n", - "as $\\hat{H}_1$ is diagonal in this basis, and \n", - "\n", - "$$\\braket{\\{s_{i,k}\\}|\\exp(-\\epsilon \\hat{H}_2)|\\{s_{i,k+1}\\}} = \\prod_i \\braket{s_{i,k}|\\mathrm{e}^{-\\epsilon h_x \\sigma^x_i} | s_{i,k+1}} \\sim \\exp(K_\\perp\\sum_{i} s_{i,k} s_{i,k+1})$$\n", - " \n", - "with $K_\\perp = \\log \\tanh(\\epsilon h_x)$ as before. Here, we have now ignored an overall\n", - "proportionality factor, which is irrelevant when using the partition function to compute\n", - "expectation values. With this, we find\n", - "\n", - "$$ Z(\\beta) = \\sum_{\\{s_i,k\\}} \\exp\\left(\\sum_{k=1}^{M}\\sum_{i} K_\\perp s_{i,k} s_{i,k+1}+\\sum_{k=1}^M\\sum_{\\braket{i,j}} K_\\parallel s_{i,k} s_{j,k} + \\sum_{k=1}^{M}\\sum_{i} h s_{i,k} \\right)$$\n", - "\n", - "with $K_{\\parallel} = \\epsilon J$ and $h = \\epsilon h_z$. We thus find the partition\n", - "function of the classical Ising model in $d+1$ dimensions with anisotropic interaction\n", - "strengths, periodic boundary condition in the imaginary time direction and a number of sites\n", - "in the time direction given by $M = \\beta/\\epsilon$. Hence, the ground state regime\n", - "$\\beta\\to \\infty$ corresponds to the thermodynamic limit in this additional time direction\n", - "of the corresponding classical system, so that there are many similarities (or actually,\n", - "equivalences) between between quantum phenomena in $d$ dimensions and classical phenomena in\n", - "$D=d+1$ dimensions. On the other hand, when the quantum system is at finite temperature\n", - "$\\beta$, the additional dimension is finite and never in the thermodynamic limit. In that\n", - "case, this extra dimension cannot cause new non-analyticities in the partition function and\n", - "finite temperature quantum systems in $d$ dimensions are very similar to classical systems\n", - "in $d$ dimensions.\n", - "\n", - "This quantum to classical mapping can also be inverted. Taking a codimension $1$ slice out\n", - "of a $D$-dimensional classical partition function, one obtains a transfer matrix which can\n", - "be interpreted as the exponential of a quantum hamiltonian acting on the Hilbert space of a\n", - "$d=D-1$ dimensional quantum system. Hence, methods for targetting quantum ground states in\n", - "$d$ dimensions can also be used to study problems in $(d+1)$-dimensional classical\n", - "statistical mechanics.\n", - "\n", - "It is clear that the quantum to classical mapping is not specific to the quantum Ising model\n", - "and can be applied to any hamiltonian. The path integral representation of the partition\n", - "function fits within the same scheme, and only differs in the fact that the limit\n", - "$\\epsilon\\to 0$ is taken such that the additional dimension becomes continuous. This is\n", - "particularly natural if also the spatial dimensions of the quantum dimension are continuous,\n", - "i.e. if we have a quantum field theory. In this case, a $D=d+1$ dimensional classical\n", - "statistical field theory is obtained. For relativistic quantum field theories, where it is\n", - "common practice to explicitly count the time dimension together with the space dimensions,\n", - "imaginary time evolution leads to an action, which is equivalently a hamiltonian of a\n", - "classical field theory in $D=d+1$ spatial dimensions, with full Euclidean invariance.\n", - "\n", - "One might thus wonder if there is anything new to be learned from studying quantum ground\n", - "states. First of all, there is one important catch which we have overlooked so far. There is\n", - "no guarantee that the above process yields a classical partition function with Boltzmann\n", - "weights which are positive, or even real. While this may seem like a technical detail, it is\n", - "of major importance. The quantum to classical mapping is the basis behind the Quantum Monte\n", - "Carlo method, one the most successful numerical methods for studying quantum many body\n", - "systems. One maps the quantum problem to a classical partition function and then uses one of\n", - "the many flavours of Monte Carlo sampling. However, with non-positive Boltzmann weights, the\n", - "interpretation of a probability distribution is lost and no efficient sampling procedure can\n", - "be designed, as samples might annihilate each other. This is known as the **sign problem**.\n", - "\n", - "Secondly, for many non-relativistic quantum systems, the anisotropy between the imaginary\n", - "time direction and the spatial dimensions in the corresponding classical system cannot be\n", - "ignored, even at the critical point. In those cases, critical correlations behave\n", - "differently in the spatial and the time direction, which is characterised by a dynamical\n", - "critical exponent $z$. The case $z=1$ corresponds to the case where the critical point has\n", - "(emergent) rotation/Lorentz invariance between time and space.\n", - "\n", - "A final reason to study quantum systems directly is that certain concepts are more natural\n", - "in that setting. In particular, the last 15 years, ideas from quantum information theory,\n", - "and in particular the concept of entanglement, have made their way into the standard toolbox\n", - "to study and characterize quantum many body systems." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.md b/pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.md deleted file mode 100644 index 3b6f0ab4..00000000 --- a/pr-preview/pr-27/_sources/1-Introduction/QuantumToClassical.md +++ /dev/null @@ -1,197 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(quantum_to_classical)= -# Quantum-to-Classical Mapping - -In this final section, we introduce a general technique that essentially enables us to map -any quantum lattice system in $d$ dimensions to a classical partition function in $d+1$ -dimensions, up to some caveats that we will return to at the end of this section. - -## Suzuki-Trotter decomposition - -Remember that thermal expectation values are given by - -$$\braket{\hat{O}} = \mathrm{Tr}\left[\hat{O} \mathrm{e}^{-\beta \hat{H}}\right]/Z(\beta)= \mathrm{Tr}\left[\mathrm{e}^{-\beta \hat{H}/2} \hat{O} \mathrm{e}^{-\beta \hat{H}/2}\right]/Z(\beta)$$ - -with the thermal partition function $Z(\beta)$ given by - -$$Z(\beta) = \mathrm{Tr} \mathrm{e}^{-\beta \hat{H}}.$$ - -The ground state physics is encoded in the limit $\beta \to \infty$. Note that, if the -system has a unique ground state, we can obtain the ground state $\ket{\Psi_0}$ of a quantum -system by starting from essentially a random state $\ket{\Phi}$ and evolving it in imaginary -time $\tau = -\mathrm{i} t$ for sufficiently long - -$$\ket{\Psi_0} \sim \lim_{\tau \to \infty} \mathrm{e}^{-\tau \hat{H}} \ket{\Phi}$$ - -Expanding the initial state $\ket{\phi}$ in the energy eigenbasis of $\hat{H}$, we see that -the only condition is that it is not orthogonal to the ground state (subspace). In addition, -the ground state will be well approximated if $\tau \Delta E \gg 1$, with -$\Delta E=E_1 - E_0$ the energy gap. This imaginary time evolution also forms the basic -ingredient of several numerical algorithms for approximating ground states of quantum many -body systems, often in combination with the Suzuki-Trotter decomposition which is introduced -below. - -Using this approach, the following expression for the ground state expectation value of on -operator $\hat{O}$ is obtained - -$$\braket{\hat{O}} = \lim_{\tau\to\infty} \braket{\phi\vert \mathrm{e}^{-\tau \hat{H}} \hat{O} \mathrm{e}^{-\tau \hat{H}}\vert \phi}/\braket{\phi\vert\mathrm{e}^{-2\tau \hat{H}} \vert\phi}$$ - -This expression can be compared to the thermal expectation value with $\beta = 2\tau$; the -only difference is in the boundary conditions. - -For a quantum many body system, taking the exponential is as hard as determining the full -diagonalisation of the hamiltonian, which is impossible due to the exponentially large -Hilbert space. If the hamiltonian is a sum of local terms, each of these terms can be -exponentiated easily, but for arbitrary $\tau$ there is no relation ship between -$\exp(-\tau \sum_{i} \hat{h}_i)$ and the individual $\exp(-\tau \hat{h}_i)$, unless the -different $\hat{h}_i$ commute. However, for an infinitesimal time step $\epsilon$, we can -use to Baker-Campbell-Hausdorff formula (or better yet, the Zassenhaus formula) to obtain - -$$\exp(-\epsilon \sum_{i} \hat{h}_i) = \prod_i \exp(-\epsilon \hat{h}_i) + -\mathcal{O}(\epsilon^2).$$ - -This then leads to the **Suzuki-Trotter decomposition** - -$$\exp\left(-\tau \sum_{i} \hat{h}_i\right) = \lim_{M\to\infty} \left( \mathrm{e}^{-\frac{\tau}{M} \sum_i \hat{h}_i} \right)^M =\lim_{M\to\infty} \left(\prod_i \mathrm{e}^{-\frac{\tau}{M} \hat{h}_i} + \mathcal{O}(\tau^2/M^2)\right)^M = \lim_{M\to\infty} \left( \left[\prod_i \mathrm{e}^{-\frac{\tau}{M} \hat{h}_i}\right]^M + \mathcal{O}(\tau^2/M)\right)$$ - -The product in the final expressions requires chosing a specific order, exactly because the terms $\hat{h}_i$ -and thus also the factors $\mathrm{e}^{-\frac{\tau}{M} \hat{h}_i}$ do not commute. The approximation -and error term are valid for arbitrary choices of ordering, but different orderings are not -equivalent. Particular choices can be more suitable for particular purposes. Furthermore, -note that splitting the time interval $[0,\tau]$ into small segments $\epsilon = \tau/M$ is -also the starting point for deriving a path integral representation of the quantum partition -function. The next step is to insert a resolution of the identity in between the $N$ -different factors, where the labels of the basis will behave as classical degrees of -freedom. For obtaining a path integral, the basis should be labeled by a number of -continuous degrees of freedom, which can then become continuous functions of time in the -limit $\epsilon\to 0$. Here, instead, we will keep $\epsilon$ small but finite, and use a -discrete basis. - -## From quantum to statistical mechanics - -Let's start with a quantum system in $d=0$, i.e. a small number of spins, or in particular, a single spin, -described by a hamiltonian - -$$\hat{H} = - h_x \sigma^x - h_z \sigma^z$$ - -While we could in principle exponentiate $\hat{H}$ directly as it is a $2 \times 2$ matrix, -we will treat it using the Suzuki-Trotter decomposition. Throughout the remainder of this -section, we will use the $\sigma^z$ basis, which we denote as $\ket{1} = \ket{\uparrow}$ and -$\ket{-1} = \ket{\downarrow}$. Inserting resolutions of the identity, we write - -$$Z(\beta) = \mathrm{Tr} \mathrm{e}^{-\beta \hat{H}} = \sum_{\{s_k\}=\pm 1} -\braket{s_1|\mathrm{e}^{-\epsilon \hat{H}}|s_2}\cdots \braket{s_M-1| \mathrm{e}^{-\epsilon -\hat{H}}|s_{M}} \cdots \braket{s_M| \mathrm{e}^{-\epsilon \hat{H}}|s_{M+1}}$$ - -with $s_{M+1} = s_1$, $M\epsilon =\beta$, and where - -```{math} -\braket{s_{i}|\mathrm{e}^{-\epsilon \hat{H}}|s_{i+1}} &= \braket{s_{i} \vert \mathrm{e}^{-\epsilon H} \vert s_{i+1}} \approx \braket{s_{i} \vert \mathrm{e}^{\epsilon h_z \sigma^z}\mathrm{e}^{\epsilon h_x \sigma^x} \vert s_{i+1}}\\ -&= \mathrm{e}^{\epsilon h_z s_i} \braket{s_{i} \vert \cosh(\epsilon h_x) \mathbb{1} + \sinh(\epsilon h_x) \sigma^x \vert s_{i+1}}\\ - &= \mathrm{e}^{K s_{i}s_{i+1} + h s_i + f_0} -``` - -where the parameters in the last line are given by -$K= -\frac{1}{2}\log \tanh(\epsilon h_x)$, $h = \epsilon h_z$ and -$f_0 =\frac{1}{2}\log[\cosh(\epsilon h_x)\sinh(\epsilon h_x)]$. - -We thus obtain - -$$Z(\beta) = \sum_{s_k} \mathrm{e}^{\sum_{i=1}^{M}K s_i s_{i+1} + h s_i},$$ - -the partition function of the one-dimensional classical Ising model with periodic boundary -conditions. Indeed, $\braket{s_{i}|\mathrm{e}^{-\epsilon H}|s_{i+1}}$ does exactly -correspond to the transfer matrix, and diagonalising the transfer matrix is the most -straightforward approach to solving the one-dimensional classical Ising model. - -## Higher dimensional generalisation - -We now apply the same approach to the Ising model with both transverse and longitudinal -field in $d$ dimensions, on a hypercubic lattice. We separate the hamiltonian in two parts -according to - -$$\hat{H} = \left(-J\sum_{\braket{i,j}} \sigma^z_i \sigma^z_j - h_z \sum_{i} \sigma^z_i\right) + \left(- h_x \sum_{i} \sigma^x_i\right)= \hat{H}_1 + \hat{H}_2$$ - -Note that $\hat{H}_1$ and $\hat{H}_2$ in itself contain commuting terms, but of course don't -mutually commute. We follow the same strategy, and will in every (imaginary) time step -introduce a resolution of the identity using the tensor product $\sigma^z$ basis. We now denote -the basis at time step $k$ as $\ket{\{s_{i,k}\}}$, where $i$ labels a site in the $d$ -dimensional lattice hosting the quantum degrees of freedom, and $k$ labels points along the -imaginary time axis, which emerges as a new dimension in the problem. We find - -$$\exp(-\epsilon \hat{H}_1)\ket{\{s_{i,k}\}} = \exp(\epsilon J \sum_{\braket{i,j}} s_{i,k} s_{j,k}+\epsilon h \sum_i s_{i,k}) \ket{\{s_{i,k}\}}$$ - -as $\hat{H}_1$ is diagonal in this basis, and - -$$\braket{\{s_{i,k}\}|\exp(-\epsilon \hat{H}_2)|\{s_{i,k+1}\}} = \prod_i \braket{s_{i,k}|\mathrm{e}^{-\epsilon h_x \sigma^x_i} | s_{i,k+1}} \sim \exp(K_\perp\sum_{i} s_{i,k} s_{i,k+1})$$ - -with $K_\perp = \log \tanh(\epsilon h_x)$ as before. Here, we have now ignored an overall -proportionality factor, which is irrelevant when using the partition function to compute -expectation values. With this, we find - -$$ Z(\beta) = \sum_{\{s_i,k\}} \exp\left(\sum_{k=1}^{M}\sum_{i} K_\perp s_{i,k} s_{i,k+1}+\sum_{k=1}^M\sum_{\braket{i,j}} K_\parallel s_{i,k} s_{j,k} + \sum_{k=1}^{M}\sum_{i} h s_{i,k} \right)$$ - -with $K_{\parallel} = \epsilon J$ and $h = \epsilon h_z$. We thus find the partition -function of the classical Ising model in $d+1$ dimensions with anisotropic interaction -strengths, periodic boundary condition in the imaginary time direction and a number of sites -in the time direction given by $M = \beta/\epsilon$. Hence, the ground state regime -$\beta\to \infty$ corresponds to the thermodynamic limit in this additional time direction -of the corresponding classical system, so that there are many similarities (or actually, -equivalences) between between quantum phenomena in $d$ dimensions and classical phenomena in -$D=d+1$ dimensions. On the other hand, when the quantum system is at finite temperature -$\beta$, the additional dimension is finite and never in the thermodynamic limit. In that -case, this extra dimension cannot cause new non-analyticities in the partition function and -finite temperature quantum systems in $d$ dimensions are very similar to classical systems -in $d$ dimensions. - -This quantum to classical mapping can also be inverted. Taking a codimension $1$ slice out -of a $D$-dimensional classical partition function, one obtains a transfer matrix which can -be interpreted as the exponential of a quantum hamiltonian acting on the Hilbert space of a -$d=D-1$ dimensional quantum system. Hence, methods for targetting quantum ground states in -$d$ dimensions can also be used to study problems in $(d+1)$-dimensional classical -statistical mechanics. - -It is clear that the quantum to classical mapping is not specific to the quantum Ising model -and can be applied to any hamiltonian. The path integral representation of the partition -function fits within the same scheme, and only differs in the fact that the limit -$\epsilon\to 0$ is taken such that the additional dimension becomes continuous. This is -particularly natural if also the spatial dimensions of the quantum dimension are continuous, -i.e. if we have a quantum field theory. In this case, a $D=d+1$ dimensional classical -statistical field theory is obtained. For relativistic quantum field theories, where it is -common practice to explicitly count the time dimension together with the space dimensions, -imaginary time evolution leads to an action, which is equivalently a hamiltonian of a -classical field theory in $D=d+1$ spatial dimensions, with full Euclidean invariance. - -One might thus wonder if there is anything new to be learned from studying quantum ground -states. First of all, there is one important catch which we have overlooked so far. There is -no guarantee that the above process yields a classical partition function with Boltzmann -weights which are positive, or even real. While this may seem like a technical detail, it is -of major importance. The quantum to classical mapping is the basis behind the Quantum Monte -Carlo method, one the most successful numerical methods for studying quantum many body -systems. One maps the quantum problem to a classical partition function and then uses one of -the many flavours of Monte Carlo sampling. However, with non-positive Boltzmann weights, the -interpretation of a probability distribution is lost and no efficient sampling procedure can -be designed, as samples might annihilate each other. This is known as the **sign problem**. - -Secondly, for many non-relativistic quantum systems, the anisotropy between the imaginary -time direction and the spatial dimensions in the corresponding classical system cannot be -ignored, even at the critical point. In those cases, critical correlations behave -differently in the spatial and the time direction, which is characterised by a dynamical -critical exponent $z$. The case $z=1$ corresponds to the case where the critical point has -(emergent) rotation/Lorentz invariance between time and space. - -A final reason to study quantum systems directly is that certain concepts are more natural -in that setting. In particular, the last 15 years, ideas from quantum information theory, -and in particular the concept of entanglement, have made their way into the standard toolbox -to study and characterize quantum many body systems. diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.ipynb b/pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.ipynb deleted file mode 100644 index b51eac2e..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.ipynb +++ /dev/null @@ -1,469 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "c6095311", - "metadata": {}, - "source": [ - "(linear_algebra)=\n", - "# (Multi-) Linear Algebra\n", - "\n", - "```{contents} Contents\n", - ":depth: 2\n", - "```\n", - "\n", - "## Overview\n", - "\n", - "This lecture covers some basic linear algebra concepts and operations, that will serve as\n", - "foundation for most of what follows. The goal is to provide some intuitive understanding of\n", - "the concepts, without insisting on too much mathematical rigour. The most important goal is\n", - "to introduce and define the concept of a tensor, without resorting to the usual mathematical\n", - "definition, which is not very intuitive.\n", - "\n", - "Simultaneously, the lecture also showcases some of the features of\n", - "[TensorKit.jl](https://github.com/Jutho/TensorKit.jl), a Julia package that is extremely\n", - "well-suited for the demonstration of the concepts that are discussed." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "b8c3fee1", - "metadata": {}, - "outputs": [], - "source": [ - "using TensorKit" - ] - }, - { - "cell_type": "markdown", - "id": "43b54eb0", - "metadata": {}, - "source": [ - "Before discussing tensor networks, it is necessary to understand what tensors are.\n", - "Furthermore, before really understanding tensors, it is instructive to reiterate some basic\n", - "concepts of linear algebra for the case of vectors and matrices, which are nothing but\n", - "specific cases of tensors. In fact, many of the concepts and ideas that are introduced and\n", - "discussed are defined in terms of thinking of tensors as vectors or matrices.\n", - "\n", - "In what follows, vectors and matrices will be thought of from the viewpoint of computers,\n", - "where they are represented using regular one- and two-dimensional arrays of either real or\n", - "complex numbers. Nevertheless, much of the discussion can be readily generalized to\n", - "arbitrary vector spaces and linear maps.\n", - "\n", - "## Vectors and Matrices\n", - "\n", - "In general, a vector is an object in a vector space, which can be described by a list of\n", - "numbers that correspond to the components of the vector in some basis. For example, a vector\n", - "in a two-dimensional space is in its most general form described by\n", - "$\\vec{v} = \\left[v_1, v_2\\right]^T$.\n", - "\n", - "As a reminder, the defining properties of vector spaces make sure that the following\n", - "operations are well-defined:\n", - "\n", - "* Vectors can be added together, i.e. $\\vec{v} + \\vec{w}$ is a vector.\n", - "* Vectors can be multiplied by scalars, i.e. $\\alpha \\vec{v}$ is a vector.\n", - "* These operations behave as expected, i.e. there is a notion of associativity, commutativity, and distributivity.\n", - "\n", - "Given two such vector spaces (not necessarily distinct) it is possible to define a linear\n", - "map between them, which is just a function that preserves the vector space structure. In\n", - "other words, a linear map $A \\colon V \\rightarrow W$ maps vectors from one vector space $V$\n", - "to another vector space $W$. Because of the structure of vector spaces, and the requirement\n", - "of linearity, such a map is completely determined by its action on the basis vectors of $V$.\n", - "This leads in a very natural way to the notion of a matrix by considering the following\n", - "construction, where $v_i$ are the components of $\\vec{v}$ and $w_i$ are the components of\n", - "$\\vec{w}$:\n", - "\n", - "```{math}\n", - ":label: eq:linear_map\n", - "\\begin{array}{rcl}\n", - "A & : & V \\rightarrow W\\\\\n", - " & & \\vec{v} ↦ A(\\vec{v}) \\equiv \\sum_j A_{ij} v_j = w_i \\equiv \\vec{w}\n", - "\\end{array}\n", - "```\n", - "\n", - "where $A_{ij}$ are the components of the matrix $A$ in these bases. In other words, the\n", - "abstract notion of a linear map between vector spaces can be represented by a concrete\n", - "matrix, and the action of the map is the usual matrix product.\n", - "\n", - "In particular, it is instructive to think of the columns of the matrix $A$ as labelling the\n", - "components of the input vector space, also called _domain_, while the rows label the\n", - "component of the output vector space, or _codomain_.\n", - "\n", - "In the context of Julia, we can create vector spaces, vectors and matrices through a syntax\n", - "that follows this very closely:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "bf866dcc", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "true" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = ℂ^2 # type as \\bbC \n", - "W = ComplexSpace(3) # equivalent to ℂ^3\n", - "\n", - "A = TensorMap(rand, Float64, W ← V) # ← as \\leftarrow\n", - "v = Tensor(rand, Float64, V)\n", - "w = A * v\n", - "\n", - "w[1] ≈ A[1,1] * v[1] + A[1,2] * v[2]" - ] - }, - { - "cell_type": "markdown", - "id": "57a37400", - "metadata": {}, - "source": [ - "````{note}\n", - "For linear maps, both notations $V \\rightarrow W$ and $W \\leftarrow V$ are used to denote\n", - "their codomain and domain. The choice of notation is mostly a matter of taste, as left to\n", - "right might seem more conventional for a language that reads from left to right, while right\n", - "to left is more natural when considering the mathematical usage, where matrices typically\n", - "act on vectors from left to right. In TensorKit, both notations are supported through the\n", - "`→` and `←` operators, and a Unicode-less version is also available, which defaults to `←`.\n", - "Thus, the following are all equivalent:\n", - "\n", - "```{code-block} julia\n", - "A = TensorMap(rand, Float64, V → W)\n", - "A = TensorMap(rand, Float64, W ← V)\n", - "A = TensorMap(rand, Float64, W, V)\n", - "```\n", - "````\n", - "\n", - "## Tensors and Tensor Products\n", - "\n", - "Using the same logic as above, it is possible to generalize the notion of a linear map by\n", - "making use of the [tensor product](https://en.wikipedia.org/wiki/Tensor_product), which is\n", - "nothing but an operation that can combine two vector spaces $V$ and $W$ into a new vector\n", - "space $V \\otimes W$. The tensor product is defined in such a way that the combination of\n", - "vectors from the original vector spaces preserves a natural notion of linearity, i.e. the\n", - "following equality holds for all vectors $v \\in V$, $w \\in W$, and scalars $\\lambda$:\n", - "\n", - "```{math}\n", - ":label: eq:tensor_product\n", - "(\\lambda v) \\otimes w = v \\otimes (\\lambda w) = \\lambda (v \\otimes w)\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "5b17be9b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "true" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "λ = rand()\n", - "(λ * v) ⊗ w ≈ v ⊗ (λ * w) ≈ λ * (v ⊗ w)" - ] - }, - { - "cell_type": "markdown", - "id": "a78faf7f", - "metadata": {}, - "source": [ - "This new vector space can be equipped with a canonical basis, which is constructed by taking\n", - "the tensor product of the basis vectors of the original vector spaces. For example, if $V$\n", - "and $W$ are two-dimensional vector spaces with basis vectors $v_i$ and $w_j$, respectively,\n", - "then the basis vectors of $V \\otimes W$ are given by $v_i \\otimes w_j$. In other words, the\n", - "vectors in $V \\otimes W$ are linear combinations of all combinations of the basis vectors of\n", - "$V$ and $W$.\n", - "\n", - "When considering how to represent a vector in this new vector space, it can be written as a\n", - "list of numbers that correspond to the components of the vector in that basis. For example,\n", - "a vector in $V \\otimes W$ is described by:\n", - "\n", - "```{math}\n", - ":label: eq:tensor_basis\n", - "t = \\sum_{i_1,i_2} t_{i_1i_2} (v_{i_1} \\otimes w_{i_2})\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "a6f9f91d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2×3 StridedViews.StridedView{Float64, 2, Matrix{Float64}, typeof(identity)}:\n", - " 0.526571 0.413696 0.719603\n", - " 0.487646 0.238492 0.286419" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "t = Tensor(rand, Float64, V ⊗ W)\n", - "t[] # shorthand for extracting the multi-dimensional array of components" - ] - }, - { - "cell_type": "markdown", - "id": "68d8ba00", - "metadata": {}, - "source": [ - "Here, the tentative name $t$ was used to denote that this is in fact a tensor, where\n", - "$t_{i_1i_2}$ are the components of that tensor $t$ in the basis $v_{i_1} \\otimes w_{i_2}$.\n", - "Because of the induced structure of the tensor product, it is more natural and very common\n", - "to express this object not just as a list of numbers, but by reshaping that list into a\n", - "matrix. In this case, the components of the $i_1$-th row correspond to basis vectors that\n", - "are built from $v_{i_1}$, and similarly the $i_2$-th column corresponds to basis vectors\n", - "that are built from $w_{i_2}$.\n", - "\n", - "As the tensor product can be generalized to more than two vector spaces, this finally leads\n", - "to the general definition of a tensor as an element of the vector space that is built up\n", - "from the tensor product of an arbitrary number of vector spaces. Additionally, the\n", - "components of these objects are then naturally laid out in a multi-dimensional array, which\n", - "is then by a slight misuse of terminology also called a tensor.\n", - "\n", - "```{note}\n", - "The reshaping operation of components from a list of numbers into a multi-dimensional array\n", - "is a mapping between linear indices $I$ and Cartesian indices $i_1, i_2, \\cdots,\n", - "i_N$. This is a very common and useful trick which allows reinterpreting tensors as vectors,\n", - "or vice versa.\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "deb397c8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2×3 LinearIndices{2, Tuple{UnitRange{Int64}, UnitRange{Int64}}}:\n", - " 1 3 5\n", - " 2 4 6" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "LinearIndices((1:2, 1:3))" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "f2b93dc1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2×3 Matrix{CartesianIndex{2}}:\n", - " CartesianIndex(1, 1) CartesianIndex(1, 2) CartesianIndex(1, 3)\n", - " CartesianIndex(2, 1) CartesianIndex(2, 2) CartesianIndex(2, 3)" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collect(CartesianIndices((1:2, 1:3))) # collect to force printing" - ] - }, - { - "cell_type": "markdown", - "id": "c2cc0096", - "metadata": {}, - "source": [ - "## Tensors and Multi-Linear Maps\n", - "\n", - "Due to the fact that the tensor product of vector spaces is a vector space in of itself, it\n", - "is again possible to define linear maps between such vector spaces. Keeping in mind the\n", - "definition of a linear map from {eq}`eq:linear_map`, the columns now label components of the\n", - "input vector space, while the rows label components of the output vector space. Now however,\n", - "the components of the input and output vector spaces are themselves comprised of a\n", - "combination of basis vectors from the original vector spaces. If a linear order of these\n", - "combinations can be established, the linear map can again be represented by a matrix:\n", - "\n", - "```{math}\n", - ":label: eq:multilinear_map\n", - "\\begin{array}{rcl}\n", - "A & : & W_1 \\otimes W_2 \\otimes \\cdots \\otimes W_M \\leftarrow \n", - " V_1 \\otimes V_2 \\otimes \\cdots \\otimes V_N \\\\\n", - " & & v_1 \\otimes v_2 \\otimes \\cdots \\otimes v_N \\mapsto \n", - " A(v_1 \\otimes v_2 \\otimes \\cdots \\otimes v_N) \\\\\n", - " & & = \\sum_{j_1, j_2, \\cdots, j_N} A_{i_1, i_2, \\cdots, i_M; j_1, j_2, \\cdots, j_N}\n", - " v_{1, j_1} \\otimes v_{2, j_2} \\otimes \\cdots \\otimes v_{N, j_N} \\\\\n", - " & & = \\sum_{J} A_{I;J} v_J \\\\\n", - " & & = w_1 \\otimes w_2 \\otimes \\cdots \\otimes w_M \\\\\n", - "\\end{array}\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "36d6c323", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "true" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V1 = ℂ^2\n", - "V2 = ℂ^2\n", - "W1 = ℂ^2\n", - "W2 = ℂ^2\n", - "\n", - "A = TensorMap(rand, Float64, W1 ⊗ W2 ← V1 ⊗ V2)\n", - "v = Tensor(rand, Float64, V1 ⊗ V2)\n", - "w = A * v\n", - "w[] ≈ reshape(reshape(A[], 4, 4) * reshape(v[], 4), 2, 2)" - ] - }, - { - "cell_type": "markdown", - "id": "cb37fa74", - "metadata": {}, - "source": [ - "The attentive reader might have already noted that the definition of a linear map as a\n", - "matrix strongly resembles the definition of a vector in a tensor product vector space. This\n", - "is not a coincidence, and in fact the two can easily be identified by considering the\n", - "following identification (isomorphism):\n", - "\n", - "```{math}\n", - ":label: eq:tensor_isomorphism\n", - "(W \\leftarrow V) \\cong (W \\otimes V^*) \n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "a24ef8ac", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "true" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = TensorMap(rand, Float64, W ← V)\n", - "B = Tensor(rand, Float64, W ⊗ V')\n", - "space(A, 2) == space(B, 2)" - ] - }, - { - "cell_type": "markdown", - "id": "46ea9d53", - "metadata": {}, - "source": [ - "```{note}\n", - "For finite-dimensional real or complex vector spaces without additional structure, this\n", - "isomorphism is *trivial* and is just the reshaping operation of the components of a vector\n", - "into a matrix. However, note that this is a choice, which is not unique, and already differs\n", - "for\n", - "[row- and column-major order](https://en.wikipedia.org/wiki/Row-_and_column-major_order). In\n", - "a more general setting, the identification between $V \\otimes W^*$ and $V \\leftarrow W$ is\n", - "not an equivalence but an isomorphism. This means that it is still possible to relate one\n", - "object to the other, but the operation is not necessarily trivial.\n", - "```\n", - "\n", - "## Conclusion\n", - "\n", - "The entire discussion can be summarized and leads to the following equivalent definitions of\n", - "a tensor:\n", - "\n", - "* A tensor is an element of a tensor product of vector spaces, which can be represented as a multi-dimensional array of numbers that indicate the components along the constituent basis vectors. Thus, a tensor is _vector-like_.\n", - "* A tensor is a multi-linear map between vector spaces, which can be represented as a matrix that represents the action of the map on the basis vectors of the input vector space. Thus, a tensor is _matrix-like_.\n", - "\n", - "The equivalence of these two definitions leads to the lifting of many important facets of\n", - "linear algebra to the multi-linear setting." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 32, - 34, - 89, - 98, - 130, - 133, - 151, - 154, - 177, - 181, - 183, - 209, - 219, - 231, - 235 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.md b/pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.md deleted file mode 100644 index 65dc1dc0..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/LinearAlgebra.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(linear_algebra)= -# (Multi-) Linear Algebra - -```{contents} Contents -:depth: 2 -``` - -## Overview - -This lecture covers some basic linear algebra concepts and operations, that will serve as -foundation for most of what follows. The goal is to provide some intuitive understanding of -the concepts, without insisting on too much mathematical rigour. The most important goal is -to introduce and define the concept of a tensor, without resorting to the usual mathematical -definition, which is not very intuitive. - -Simultaneously, the lecture also showcases some of the features of -[TensorKit.jl](https://github.com/Jutho/TensorKit.jl), a Julia package that is extremely -well-suited for the demonstration of the concepts that are discussed. - -```{code-cell} julia -using TensorKit -``` - -Before discussing tensor networks, it is necessary to understand what tensors are. -Furthermore, before really understanding tensors, it is instructive to reiterate some basic -concepts of linear algebra for the case of vectors and matrices, which are nothing but -specific cases of tensors. In fact, many of the concepts and ideas that are introduced and -discussed are defined in terms of thinking of tensors as vectors or matrices. - -In what follows, vectors and matrices will be thought of from the viewpoint of computers, -where they are represented using regular one- and two-dimensional arrays of either real or -complex numbers. Nevertheless, much of the discussion can be readily generalized to -arbitrary vector spaces and linear maps. - -## Vectors and Matrices - -In general, a vector is an object in a vector space, which can be described by a list of -numbers that correspond to the components of the vector in some basis. For example, a vector -in a two-dimensional space is in its most general form described by -$\vec{v} = \left[v_1, v_2\right]^T$. - -As a reminder, the defining properties of vector spaces make sure that the following -operations are well-defined: - -* Vectors can be added together, i.e. $\vec{v} + \vec{w}$ is a vector. -* Vectors can be multiplied by scalars, i.e. $\alpha \vec{v}$ is a vector. -* These operations behave as expected, i.e. there is a notion of associativity, commutativity, and distributivity. - -Given two such vector spaces (not necessarily distinct) it is possible to define a linear -map between them, which is just a function that preserves the vector space structure. In -other words, a linear map $A \colon V \rightarrow W$ maps vectors from one vector space $V$ -to another vector space $W$. Because of the structure of vector spaces, and the requirement -of linearity, such a map is completely determined by its action on the basis vectors of $V$. -This leads in a very natural way to the notion of a matrix by considering the following -construction, where $v_i$ are the components of $\vec{v}$ and $w_i$ are the components of -$\vec{w}$: - -```{math} -:label: eq:linear_map -\begin{array}{rcl} -A & : & V \rightarrow W\\ - & & \vec{v} ↦ A(\vec{v}) \equiv \sum_j A_{ij} v_j = w_i \equiv \vec{w} -\end{array} -``` - -where $A_{ij}$ are the components of the matrix $A$ in these bases. In other words, the -abstract notion of a linear map between vector spaces can be represented by a concrete -matrix, and the action of the map is the usual matrix product. - -In particular, it is instructive to think of the columns of the matrix $A$ as labelling the -components of the input vector space, also called _domain_, while the rows label the -component of the output vector space, or _codomain_. - -In the context of Julia, we can create vector spaces, vectors and matrices through a syntax -that follows this very closely: - -```{code-cell} julia -V = ℂ^2 # type as \bbC -W = ComplexSpace(3) # equivalent to ℂ^3 - -A = TensorMap(rand, Float64, W ← V) # ← as \leftarrow -v = Tensor(rand, Float64, V) -w = A * v - -w[1] ≈ A[1,1] * v[1] + A[1,2] * v[2] -``` - -````{note} -For linear maps, both notations $V \rightarrow W$ and $W \leftarrow V$ are used to denote -their codomain and domain. The choice of notation is mostly a matter of taste, as left to -right might seem more conventional for a language that reads from left to right, while right -to left is more natural when considering the mathematical usage, where matrices typically -act on vectors from left to right. In TensorKit, both notations are supported through the -`→` and `←` operators, and a Unicode-less version is also available, which defaults to `←`. -Thus, the following are all equivalent: - -```{code-block} julia -A = TensorMap(rand, Float64, V → W) -A = TensorMap(rand, Float64, W ← V) -A = TensorMap(rand, Float64, W, V) -``` -```` - -## Tensors and Tensor Products - -Using the same logic as above, it is possible to generalize the notion of a linear map by -making use of the [tensor product](https://en.wikipedia.org/wiki/Tensor_product), which is -nothing but an operation that can combine two vector spaces $V$ and $W$ into a new vector -space $V \otimes W$. The tensor product is defined in such a way that the combination of -vectors from the original vector spaces preserves a natural notion of linearity, i.e. the -following equality holds for all vectors $v \in V$, $w \in W$, and scalars $\lambda$: - -```{math} -:label: eq:tensor_product -(\lambda v) \otimes w = v \otimes (\lambda w) = \lambda (v \otimes w) -``` - -```{code-cell} julia -λ = rand() -(λ * v) ⊗ w ≈ v ⊗ (λ * w) ≈ λ * (v ⊗ w) -``` - -This new vector space can be equipped with a canonical basis, which is constructed by taking -the tensor product of the basis vectors of the original vector spaces. For example, if $V$ -and $W$ are two-dimensional vector spaces with basis vectors $v_i$ and $w_j$, respectively, -then the basis vectors of $V \otimes W$ are given by $v_i \otimes w_j$. In other words, the -vectors in $V \otimes W$ are linear combinations of all combinations of the basis vectors of -$V$ and $W$. - -When considering how to represent a vector in this new vector space, it can be written as a -list of numbers that correspond to the components of the vector in that basis. For example, -a vector in $V \otimes W$ is described by: - -```{math} -:label: eq:tensor_basis -t = \sum_{i_1,i_2} t_{i_1i_2} (v_{i_1} \otimes w_{i_2}) -``` - -```{code-cell} julia -t = Tensor(rand, Float64, V ⊗ W) -t[] # shorthand for extracting the multi-dimensional array of components -``` - -Here, the tentative name $t$ was used to denote that this is in fact a tensor, where -$t_{i_1i_2}$ are the components of that tensor $t$ in the basis $v_{i_1} \otimes w_{i_2}$. -Because of the induced structure of the tensor product, it is more natural and very common -to express this object not just as a list of numbers, but by reshaping that list into a -matrix. In this case, the components of the $i_1$-th row correspond to basis vectors that -are built from $v_{i_1}$, and similarly the $i_2$-th column corresponds to basis vectors -that are built from $w_{i_2}$. - -As the tensor product can be generalized to more than two vector spaces, this finally leads -to the general definition of a tensor as an element of the vector space that is built up -from the tensor product of an arbitrary number of vector spaces. Additionally, the -components of these objects are then naturally laid out in a multi-dimensional array, which -is then by a slight misuse of terminology also called a tensor. - -```{note} -The reshaping operation of components from a list of numbers into a multi-dimensional array -is a mapping between linear indices $I$ and Cartesian indices $i_1, i_2, \cdots, -i_N$. This is a very common and useful trick which allows reinterpreting tensors as vectors, -or vice versa. -``` - -```{code-cell} julia -LinearIndices((1:2, 1:3)) -``` - -```{code-cell} julia -collect(CartesianIndices((1:2, 1:3))) # collect to force printing -``` - -## Tensors and Multi-Linear Maps - -Due to the fact that the tensor product of vector spaces is a vector space in of itself, it -is again possible to define linear maps between such vector spaces. Keeping in mind the -definition of a linear map from {eq}`eq:linear_map`, the columns now label components of the -input vector space, while the rows label components of the output vector space. Now however, -the components of the input and output vector spaces are themselves comprised of a -combination of basis vectors from the original vector spaces. If a linear order of these -combinations can be established, the linear map can again be represented by a matrix: - -```{math} -:label: eq:multilinear_map -\begin{array}{rcl} -A & : & W_1 \otimes W_2 \otimes \cdots \otimes W_M \leftarrow - V_1 \otimes V_2 \otimes \cdots \otimes V_N \\ - & & v_1 \otimes v_2 \otimes \cdots \otimes v_N \mapsto - A(v_1 \otimes v_2 \otimes \cdots \otimes v_N) \\ - & & = \sum_{j_1, j_2, \cdots, j_N} A_{i_1, i_2, \cdots, i_M; j_1, j_2, \cdots, j_N} - v_{1, j_1} \otimes v_{2, j_2} \otimes \cdots \otimes v_{N, j_N} \\ - & & = \sum_{J} A_{I;J} v_J \\ - & & = w_1 \otimes w_2 \otimes \cdots \otimes w_M \\ -\end{array} -``` - -```{code-cell} julia -V1 = ℂ^2 -V2 = ℂ^2 -W1 = ℂ^2 -W2 = ℂ^2 - -A = TensorMap(rand, Float64, W1 ⊗ W2 ← V1 ⊗ V2) -v = Tensor(rand, Float64, V1 ⊗ V2) -w = A * v -w[] ≈ reshape(reshape(A[], 4, 4) * reshape(v[], 4), 2, 2) -``` - -The attentive reader might have already noted that the definition of a linear map as a -matrix strongly resembles the definition of a vector in a tensor product vector space. This -is not a coincidence, and in fact the two can easily be identified by considering the -following identification (isomorphism): - -```{math} -:label: eq:tensor_isomorphism -(W \leftarrow V) \cong (W \otimes V^*) -``` - -```{code-cell} julia -A = TensorMap(rand, Float64, W ← V) -B = Tensor(rand, Float64, W ⊗ V') -space(A, 2) == space(B, 2) -``` - -```{note} -For finite-dimensional real or complex vector spaces without additional structure, this -isomorphism is *trivial* and is just the reshaping operation of the components of a vector -into a matrix. However, note that this is a choice, which is not unique, and already differs -for -[row- and column-major order](https://en.wikipedia.org/wiki/Row-_and_column-major_order). In -a more general setting, the identification between $V \otimes W^*$ and $V \leftarrow W$ is -not an equivalence but an isomorphism. This means that it is still possible to relate one -object to the other, but the operation is not necessarily trivial. -``` - -## Conclusion - -The entire discussion can be summarized and leads to the following equivalent definitions of -a tensor: - -* A tensor is an element of a tensor product of vector spaces, which can be represented as a multi-dimensional array of numbers that indicate the components along the constituent basis vectors. Thus, a tensor is _vector-like_. -* A tensor is a multi-linear map between vector spaces, which can be represented as a matrix that represents the action of the map on the basis vectors of the input vector space. Thus, a tensor is _matrix-like_. - -The equivalence of these two definitions leads to the lifting of many important facets of -linear algebra to the multi-linear setting. diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.ipynb b/pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.ipynb deleted file mode 100644 index a3ec7eae..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.ipynb +++ /dev/null @@ -1,708 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "fd152461", - "metadata": {}, - "source": [ - "(symmetries)=\n", - "# Symmetries in Quantum Many-Body Physics\n", - "\n", - "The goal of this section is to give a very gentle introduction to the concept of symmetries\n", - "in quantum many-body physics, and the notion of symmetric tensors. The general mathematical\n", - "framework of symmetries in physics (or at least the framework we will restrict to) is that\n", - "of group - and representation theory. Our goal is not to take this framework as a given and\n", - "illustrate it, but rather to first discuss a couple of important applications of symmetries\n", - "in the context of some concrete models and gradually build up to the more general framework.\n", - "We will finish our discussion with an outlook to generalizations of the framework presented\n", - "here. It goes without saying that we will only scratch the surface of this vast topic. The\n", - "interested reader is referred to the immense literature on this topic, or to a more\n", - "specialized course.\n", - "\n", - "## Examples and Applications\n", - "\n", - "### Symmetry Breaking, Order Parameters and Phases\n", - "\n", - "Recall the one-dimensional transverse field Ising model defined above. Its degrees of\n", - "freedom are qubits ordered on a one-dimensional lattice, and its Hamiltonian reads\n", - "\n", - "```{math}\n", - "H = -\\sum_{i} \\sigma^z_i\\sigma^z_{i+1} -h_x\\sum_i\\sigma^x_i.\n", - "```\n", - "\n", - "Let us simply consider periodic boundary conditions. Besides the obvious translation\n", - "symmetry, which we will discuss below, this model is also invariant under flipping all spins\n", - "simultaneously in the Z-direction, i.e. in the Pauli Z basis:\n", - "$\\ket{\\uparrow}\\leftrightarrow\\ket{\\downarrow}$. That this operation constitutes a symmetry\n", - "is clear from the Hamiltonian as the energy of the first term only depends on the\n", - "neighbouring spins being (anti-)aligned, which is clearly spin flip-invariant. The second\n", - "spin is trivially invariant as this models an external magnetic field which is orthogonal to\n", - "the Z-direction.\n", - "\n", - "This spin flip is \"implemented\", or more correctly \"represented\", by the unitary operator\n", - "$P=\\bigotimes_i \\sigma^x_i$. Notice that $P^2=1$ in accordance with our intuition that\n", - "flipping all the spins twice is equivalent with leaving all spins untouched. The fact that\n", - "this operator represents a symmetry of the model then translates to $[H,P]=0$, or\n", - "equivalently $P^\\dagger HP=H$. Notice that the identity operator is also trivially a\n", - "symmetry (of every model) and thus the set $\\{1,P\\}$ is closed under taking the product.\n", - "\n", - "Even though the Hamiltonian has the symmetry regardless of the value of the parameter $h_x$,\n", - "you might know from a previous course that the ground state or ground state subspace are not\n", - "necessarily invariant under the symmetry, a phenomenon known as spontaneous symmetry\n", - "breaking (SSB) or symmetry breaking for short. Let us investigate the ground state subspace\n", - "of the transverse field Ising model in the extremal case of vanishing and infinite magnetic\n", - "field.\n", - "\n", - "- $h_x\\rightarrow \\infty$ In this case the model effectly reduces to a paramagnet. The\n", - " unique ground state is the product state $\\ket{\\Psi_+}=\\ket{+}^{\\otimes N}$ where\n", - " $\\ket{+}=\\frac{1}{\\sqrt{2}}(\\ket{\\uparrow}+\\ket{\\downarrow})$ is the unique eigenvalue 1\n", - " eigenvector of $\\sigma^x$. Notice that this state is invariant under the symmetry operator\n", - " $P$, $P\\ket{\\Psi_+}=\\ket{\\Psi_+}$. In other words, the ground state in this case is\n", - " symmetric. For reasons mentioned below this state is also considered to be disordered.\n", - "- $h_x=0$ In this case the energy is minimized by aligning all the spins and the model\n", - " behaves as a classical ferromagnet. Obviously, two distinct ground states are\n", - " $\\ket{\\Psi_\\uparrow}=\\ket{\\uparrow\\uparrow...\\uparrow}$ and\n", - " $\\ket{\\Psi_\\downarrow}=\\ket{\\downarrow\\downarrow...\\downarrow}$. Contrary to the previous\n", - " case they span a two-dimensional ground state subspace, and these states are not\n", - " symmetric. In fact, under the action of $P$ they get mapped onto the other:\n", - " $P\\ket{\\Psi_\\uparrow}=\\ket{\\Psi_\\downarrow}$ and vice versa. The ground state in this case\n", - " is thus symmetry broken, or ordered.\n", - "\n", - "Since the ground state degeneracy is necessarily an integer, it is clear that it can not\n", - "change smoothly from two to one when the magnetic field is slowly turned on from\n", - "$h_x = 0 \\rightarrow \\infty$. Therefore the Ising model for small $h_x$ and large $h_x$ are\n", - "said to belong to different phases, and for some finite value of $h_x$ a phase transition\n", - "where the ground state degeneracy changes abruptly is expected to take place. As it turns\n", - "out, this change happens for $h_x = 1$, at which point the Ising model becomes critical.\n", - "\n", - "Inspired by the credo of symmetry we can introduce a local operator which probes the phase\n", - "and can witness the phase transition. In the case of the Ising model this order parameter is\n", - "the local magnetisation on every site: $O=\\sum_i\\sigma^z_i$. It is clear that this order\n", - "parameter anticommutes with the symmetry, $P^\\dagger OP=-O$, from which it follows that in\n", - "the symmetric phase the expectation value of the order parameter vanishes,\n", - "$\\braket{\\Psi_+|O|\\Psi_+}=0$, while in the ferromagnetic phase\n", - "$\\braket{\\Psi_\\uparrow|O|\\Psi_\\uparrow}>0$ and\n", - "$\\braket{\\Psi_\\downarrow|O|\\Psi_\\downarrow}<0$. Notice however that for the latter we could\n", - "also have chosen the ground state $\\ket{\\Psi_\\uparrow}+\\ket{\\Psi_\\downarrow}$ in which case\n", - "the expectation value of $O$ becomes 0. So it seems that the expectation value of the order\n", - "parameter is ill-defined is this phase. This can be remedied by first adding a small\n", - "symmetry breaking term $\\lambda\\sum_i\\sigma^z_i$ to the Hamiltonian which, depending on the\n", - "sign of $\\lambda$, selects one of the ground states $\\ket{\\Psi_{\\uparrow/\\downarrow}}$ after\n", - "which the limit $\\lambda\\rightarrow 0$ is taken.\n", - "\n", - "The synopsis of this example is thus the following. Symmetries in quantum many-body physics\n", - "(but also in single-particle quantum mechanics) are represented by unitary operators which\n", - "are closed under multiplication. Depending on the parameters in the Hamiltonian, part of\n", - "these symmetries can be broken by the ground state subspace, and this pattern of symmetry\n", - "breaking is a hallmark feature of different phases of the model. Different phases can be\n", - "probed by a local order parameter which does not commute with the symmetries. This paradigm\n", - "of classifying phases based on symmetry principles was first put forward by Landau\n", - "{cite}`Landau:1937obd`, and since then bears his name.\n", - "\n", - "### Noether and Conserved Quantitites\n", - "\n", - "You might remember Noether's theorem from a course on field theory. It states that every\n", - "continuous symmetry of a system (in field theory most often defined via its Lagrangian)\n", - "gives rise to a conserved current. In the context of quantum physics Noether's theorem\n", - "becomes almost trivial and states that the expectation value of every operator that commutes\n", - "with the Hamiltonian has a conserved expectation value:\n", - "\n", - "```{math}\n", - "[H, O] = 0 \\implies \\frac{d}{dt}\\braket{\\Psi(t)|O|\\Psi(t)} = 0.\n", - "```\n", - "\n", - "The proof is almost trivial and is left as a simple exercise.\n", - "\n", - "- The simplest example of this principle is obviously the Hamiltonain that trivially\n", - " commutes with itself. The consequence is that the expectation value of the total energy is\n", - " conserved.\n", - "\n", - "- Another example is that of translation symmetry. Translation symmetry is implemented by\n", - " the operator $T$ that acts on local operators $O_i$ via $T^\\dagger O_iT=O_{i+1}$. Since\n", - " for a system with $N$ sites we obviously have the identity $T^N=1$, and $T$ is unitary,\n", - " the eigenvalues of $T$ are phases $\\exp(2\\pi ip/N)$ where the quantum number\n", - " $p=0,1,...,N-1$ is the momentum. By virtue of Noether, translation invariance is\n", - " understood to give rise to conservation of momentum, and thus momentum acts as a good\n", - " quantum number for the eigenstates of translationally invariant models.\n", - "\n", - "Let us consider another non-trivial example to illustrate the implications of this theorem.\n", - "Recall the spins $s$ XXZ Heisenberg model whose Hamiltonian reads\n", - "\n", - "```{math}\n", - "H = -J\\sum_i S^x_iS^x_{i+1}+S^y_iS^y_{i+1}+\\Delta S^z_iS^z_{i+1}.\n", - "```\n", - "\n", - "The spin operators are $2s + 1$-dimensional and satisfy the $\\mathfrak{su}(2)$ commutation\n", - "relations\n", - "\n", - "```{math}\n", - "[\\sigma^a_i,\\sigma^b_j]=i\\delta_{i,j}\\sum_c \\varepsilon_{abc}S^c_i \n", - "```\n", - "\n", - "Let us define the total spin\n", - "\n", - "```{math}\n", - "S^a = \\sum_i S^a_i.\n", - "```\n", - "\n", - "From a direct computation it follows that in the case where $\\Delta=1$, and the model thus\n", - "reduces to the Heisenberg XXX model, $H$ commutes with all $S^a$, $[H,S^a]=0$, $a=x,y,z$.\n", - "However, when $\\Delta\\neq 1$ only the Z component $S^z$ commutes with $H$, $[H, S^z]=0$.\n", - "Notice the difference with the Ising model where the same symmetry was present for all\n", - "values of $h_x$.\n", - "\n", - "This means that in the $\\Delta=1$ case the Hamiltonian is symmetric under the full $SU(2)$\n", - "(half integer s) or $SO(3)$ (integer s) symmetry (see below), whereas when $\\Delta\\neq 1$\n", - "only an $SO(2)\\simeq U(1)$ symmetry generated by $S^z$ is retained. If $H$ commutes with\n", - "$S^z$ it follows that it automatically also commutes with $\\exp(i\\theta S^z)$,\n", - "$\\theta\\in[0,2\\pi)$. This operator has an interpretation as a rotation around the Z-axis\n", - "with an angle $\\theta$.\n", - "\n", - "According to Noether the Heisenberg model thus has conserved quantities associated with\n", - "these operators. Regardless of $\\Delta$ the Z component of the total spin is conserved, and\n", - "for $\\Delta=1$ all components of the total spin are conserved. In particular this means that\n", - "the eigenvalue $M_z$ of $S^z$ and $S(S+1)$ of $\\vec{S}\\cdot\\vec{S}$ are good quantum numbers\n", - "to label the eigenstates of the Heisenberg Hamiltonian.\n", - "\n", - "## Group and Representation Theory\n", - "\n", - "Motivated by the examples from above, we will gently introduce some notions of group - and\n", - "representation theory that form the backbone of a general theory of symmetries.\n", - "\n", - "### Group Theory\n", - "\n", - "Roughly speaking a group $G$ is a set of symmetry operators and a multiplication rule on how\n", - "to compose them. Let us motivate the definition one step a time.\n", - "\n", - "First of all notice that a model can have a finite or infinite (discrete or continuous)\n", - "number of symmetries. Clearly, the spin flip symmetry of the Ising model consists of only\n", - "one non-trivial symmetry operation, namely flipping all spins. The operator carrying out\n", - "this transformation is $P=\\bigotimes_i\\sigma^x_i$. The XXZ model however has a continuous\n", - "symmetry, namely rotations around the Z-axis, that is implemented via $\\exp(i\\theta S^z)$,\n", - "$\\theta\\in[0,2\\pi)$, where we should really think about every value of $\\theta$ as labeling\n", - "a different symmetry operation.\n", - "\n", - "These symmetries can be composed or multiplied to form a new symmetry operation. Take for\n", - "example flipping all the spins. Flipping all spins twice results in not flipping any spins\n", - "at all, which is trivially also a symmetry of the Hamiltonian. Next, consider also the\n", - "$U(1)$ symmetry of the XXZ model. First rotating over $\\theta_2$ and then over $\\theta_1$\n", - "gives a new rotation over $\\theta_1+\\theta_2$: $\\exp(i\\theta_1 S^z)\\exp(i\\theta_2\n", - "S^z)=\\exp(i(\\theta_1+\\theta_2) S^z)$. This leads to the first part of the definition of what\n", - "a group is.\n", - "\n", - "1. A group $G$ is a set $G=\\{g_1,g_2,...\\}$ endowed with a multiplication $G\\times\n", - " G\\rightarrow G$. There exists an identity $1\\in G$ for the multiplication such that\n", - " $1g=g1=g, \\forall g\\in G$.\n", - "\n", - "Note that this multiplication is not necessarily abelian. A simple example is the full\n", - "$SU(2)$ symmetry of the XXX model defined above. However, the composition of symmetries is\n", - "still associative:\n", - "\n", - "2. For all group elements $g,h,k$ we have that $g(hk)=(gh)k$.\n", - "\n", - "A property we also would like to formalize is the fact that every symmetry transformation\n", - "can be undone. Take for example a $U(1)$ rotation $\\exp(i\\theta S^z)$, if we compose it with\n", - "the opposite rotation $\\exp(i(2\\pi-\\theta) S^z)$ we get the identity. Hence:\n", - "\n", - "3. Every group element $g$ has a unique inverse $g^{-1}$: $gg^{-1}=g^{-1}g=1$.\n", - "\n", - "Together 1. 2. and 3. constitute the definition of a group. Before mentioning some examples\n", - "let us also introduce the concept of a subgroup. As the name suggests, a subgroup is a\n", - "subset of a group which itself constitutes a group. Note for example that a rotation over\n", - "$\\pi$, $\\exp(i\\pi S^z)$, together with the identity, generates a subgroup of $\\{\\exp(2\\pi\n", - "i\\theta S^z|\\theta\\in[0,2\\pi)\\}$ with two elements.\n", - "\n", - "The concept of subgroups lies at the heart of symmetry breaking. Recall that in the\n", - "ferromagnetic phase, the Ising model breaks the spin flip symmetry. In Landau's paradigm we\n", - "say that the pattern of symmetry breaking is $\\mathbb{Z}_2\\rightarrow \\{1\\}$ (see below for\n", - "an explanation of the notation). In other words, the full symmetry group ($\\mathbb{Z}_2$) is\n", - "broken in the ferromagnetic phase to a subgroup (the trivial group). More generally, a\n", - "theory with a $G$ symmetry can undergo a pattern of symmetry breaking $G\\rightarrow H$ where\n", - "$H$ is a subgroup of $G$. The meaning of this symbolic expression is that the ground states\n", - "keep an H symmetry, and the ground state degeneracy is $|G|/|H|$. \n", - "\n", - "#### Examples\n", - "\n", - "- The trivial group is a group with only one element that is than automatically also the\n", - " identity, and a trivial multiplication law. Above, it was denoted by $\\{1\\}$.\n", - "- $\\mathbb{Z}_N$ is the additive group of integers modulo $N$. The group elements are the\n", - " integers $\\{0,1,...,N-1\\}$ and the group multiplication is addition modulo $N$. Hence it\n", - " is clearly a finite group. In particular, the spin flip symmetry from above corresponds to\n", - " the group $\\mathbb{Z}_2$. Notice that for all $N$ $\\mathbb{Z}_N$ is abelian.\n", - "- Another abelian group is $U(1)$. This group is defined as\n", - " $U(1)=\\left\\{z\\in\\mathbb{C}:|z|^2 = 1\\right\\}$, with group multiplication the\n", - " multiplication of complex numbers. Note we encountered this group in the XXZ model as\n", - " being the rotations around the Z axis: $\\{\\exp(2\\pi i\\theta S^z|\\theta\\in[0,2\\pi)\\}$.\n", - "- $SU(2)$ is the group of unimodular unitary $2\\times 2$ matrices:\n", - " ```{math}\n", - " SU(2) := \\left\\{U \\in \\mathbb{C}^{2\\times 2} | \n", - " \\det U = 1, UU^\\dagger = U^\\dagger U = \\mathbb{I}\\right\\}.\n", - " ```\n", - " The group multiplication is given by group multiplication. Similarly, one defines\n", - " $SU(N),N\\geq 2$. Note that none of these groups are abelian.\n", - " \n", - "- The 3D rotation group or special orthogonal group $SO(3)$ is the group of real $3\\times 3$\n", - " orthogonal matrices with unit determinant:\n", - " ```{math}\n", - " SO(3) := \\left\\{M\\in\\mathbb{R}^{3\\times 3}|MM^T=M^TM=\\mathbb{I},\\det M=1\\right\\}.\n", - " ```\n", - " Similarly, one defines $SO(N),N\\geq 2$. Note that only $SO(2)$ is abelian.\n", - "\n", - "### Representation Theory\n", - "\n", - "In the above examples, we were dealing with the question which symmetry transformations\n", - "leave the Hamiltonian (and in the absence of symmetry breaking also the ground states)\n", - "invariant. These symmetry representations were implemented (represented) by invertible\n", - "linear operators, non-singular matrices, that form a closed set under multiplication. This\n", - "multiplication structure is what we identified as a group. What we could now do, is to take\n", - "a group as given, and wonder which linear transformations we can come up with that multiply\n", - "according to these multiplication rules. This is exactly the underlying idea of\n", - "representation theory. Representation theory deals with the question how groups can linearly\n", - "act on vector spaces.\n", - "\n", - "This immediately raises a plethora of questions such as if we can classify all\n", - "representations (up to some kind of equivalence), if there exists 'minimal' representations\n", - "and how we can construct new representations of known ones. A minimal answer to these\n", - "questions is the goal of this section.\n", - "\n", - "#### Definition\n", - "\n", - "For the sake of these notes, a representation of a group $G$ is thus a set of matrices\n", - "indexed by the group elements, $\\{X_g|g\\in G\\}$ that multiply according to the\n", - "multiplication rule of $G$:\n", - "\n", - "```{math}\n", - "X_gX_h = X_{gh}\n", - "```\n", - "\n", - "Note that the identity is always mapped to the identity matrix!\n", - "\n", - "We call the dimension of the matrices $X_g$ the dimension of the representation.\n", - "\n", - "##### Examples\n", - "\n", - "- Every group can be trivially represented by mapping every group element to the 'matrix'\n", - " (1). Obviously, this representation is one-dimensional and is called the trivial\n", - " representation.\n", - "- Probably the simplest non-trivial representation, is the representation of $\\mathbb{Z}_2$\n", - " that maps the non-trivial element to -1. Concretely, $X_0=1, X_1=-1$, and indeed\n", - " $X_1X_1=(-1)^2=X_0$. This representation is called the sign representation.\n", - "- Let us construct a two-dimensional representation of $\\mathbb{Z}_2$. Since the Pauli\n", - " matrix $\\sigma^x$ (as any other Pauli matrix) squares to the identity, $\\sigma^x$ together\n", - " with the two-dimensional identity matrix constitutes a two-dimensional representation of\n", - " $\\mathbb{Z}_2$. In the notation from above, $X_0=\\mathbb{I}_2$, $X_1=\\sigma^x$. This\n", - " representation is called the regular representation of $\\mathbb{Z}_2$.\n", - "\n", - "#### Complex Conjugate Representation, Tensor Product and Direct Sum Representation\n", - "\n", - "Given a representation $\\{X_g|g\\in G\\}$, the complex conjugate representation $\\bar X$ is\n", - "defined as $\\bar X=\\{\\bar X_g|g\\in G\\}$ which satisfies the defining property of\n", - "representations via $\\bar X_g\\bar X_h= \\overline{X_gX_h}=\\bar X_{gh}$.\n", - "\n", - "Given two representations of $G$, $X\\equiv\\{X_g|g\\in G\\}$ and $Y\\equiv\\{Y_g|g\\in G\\}$, there\n", - "are two obvious ways to construct a new representation.\n", - "\n", - "The first one is the tensor product representation defined via the Kronecker product of\n", - "matrices:\n", - "\n", - "```{math}\n", - "\\{X_g\\otimes Y_g|g\\in G\\}.\n", - "```\n", - "\n", - "You should check that these still satisfy the defining property of a representation. The\n", - "dimension of the tensor product is the product of the dimensions of the two representations\n", - "$X$ and $Y$.\n", - "\n", - "The other one is the direct sum:\n", - "\n", - "```{math}\n", - "\\{X_g\\oplus Y_g|g\\in G\\}.\n", - "```\n", - "\n", - "Its dimension is that the sum of the dimensions of $X$ and $Y$.\n", - "\n", - "#### Irreducible Representations\n", - "\n", - "It is clear that physical observables should not depend on any choice of basis. Therefore\n", - "two representations are (unitarily) equivalent when there is a unitary basis transformation\n", - "$U$ such that $X_g' =UX_gU^\\dagger$. Note that $U$ is independent of $g$.\n", - "\n", - "##### Example\n", - "\n", - "Consider again the two-dimensional regular representation of $\\mathbb{Z}_2$ from above. The\n", - "basis transformation\n", - "\n", - "```{math}\n", - "H=\\frac{1}{\\sqrt 2}\n", - "\\begin{pmatrix}\n", - " 1 & 1\\\\\n", - " 1 & -1\n", - "\\end{pmatrix}\n", - "```\n", - "\n", - "shows that this representation is equivalent to one where the non-trivial element of\n", - "$\\mathbb{Z}_2$ is represented by $H\\sigma^x H^\\dagger=\\sigma^z$. This illustrates that the\n", - "regular representation is equivalent to the direct sum of the trivial representation and the\n", - "sign representation!\n", - "\n", - "The crux of this example is the following. Some representations can, by an appropriate\n", - "choice of basis, be brought in a form where all $X_g$ are simultaneously block-diagonal:\n", - "\n", - "```{math}\n", - "X_g'=UX_gU^\\dagger=\n", - "\\begin{pmatrix}\n", - " \\fbox{$X^1_g$} & 0 &\\cdots\\\\\n", - " 0& \\fbox{$X^2_g$} & \\cdots\\\\\n", - " \\vdots & \\vdots & \\ddots\n", - "\\end{pmatrix}.\n", - "```\n", - "\n", - "These blocks correspond to invariant subspaces of the representation, i.e. subspaces that\n", - "transform amongst themselves under the action of the group.\n", - "\n", - "An irreducible representation, irrep for short, can then be defined as a representation that\n", - "can not be brought in a (non-trivial) block-diagonal form by any change of basis.\n", - "\n", - "It can be shown that every finite group has a finite number of irreps. The sum of the\n", - "dimensions squared is equal to the number of elements in the group: $\\sum_\\alpha\n", - "d_\\alpha^2=|G|$ where the sum is over all irreps labeled by $\\alpha$ and $d_\\alpha$ denote\n", - "their respective dimensions.\n", - "\n", - "One of the key questions of representation theory is what the irreps of a given group are\n", - "and how the tensor product of irreps (which is in general not an irrep!) decomposes in a\n", - "direct sum of irreps. The latter are sometimes known as the fusion rules. The basis\n", - "transformation that reduce a given representation in a direct sum of irreps is sometimes\n", - "called the Clebsch-Gordan coefficients, and are for some groups known explicitly. Before\n", - "discussing the example of $SU(2)$, let us first state the most important result in\n", - "representation theory which is due to Schur.\n", - "\n", - "[Schur's lemma] If a matrix $Y$ commutes with all representation matrices of an irreducible\n", - "representation of a group G, $X_gY=YX_g$ $\\forall g\\in G$, then $Y$ is proportional to the\n", - "identity matrix.\n", - "\n", - "#### Example\n", - "\n", - "The answer to the questions posed above is very well understood for the case of $SU(2)$. You\n", - "probably know the answer from a previous course on quantum mechanics.\n", - "\n", - "The irreps of $SU(2)$ can be labeled by its spin, let us call it $s$, that takes values\n", - "$s=0,1/2,1,3/2,...$. The dimension of the spin $s$ representation is equal to $2s+1$, so\n", - "there is exactly one irrep of every dimension. The spin $s=0$ irrep corresponds to the\n", - "trivial representation.\n", - "\n", - "The fusion rules can be summarized as\n", - "\n", - "```{math}\n", - "s_1\\otimes s_2 \\simeq \\bigoplus_{s=|s_1-s_2|}^{s_1+s_2}s.\n", - "```\n", - "\n", - "For example: $\\frac{1}{2}\\otimes\\frac{1}{2}\\simeq 0\\oplus 1$. The Clebsch-Gordan\n", - "coefficients for $SU(2)$ have been computed analytically, and for low-dimensional irreps\n", - "have been tabulated for example\n", - "[here](https://pdg.lbl.gov/2018/reviews/rpp2018-rev-clebsch-gordan-coefs.pdf).\n", - "\n", - "(symmetric_tensors)=\n", - "## Symmetric Tensors\n", - "\n", - "In physics we are often dealing with tensors that transform according to the tensor product\n", - "representation of a given group $G$. A symmetric tensor can then be understood as a tensor\n", - "that transforms trivially under the action of $G$, or more concretely under the tensor\n", - "product representation $X\\otimes\\bar Y\\otimes\\bar Z$:\n", - "\n", - "```{figure} ../_static/SymmetricTensors/symmtens.svg\n", - ":scale: 12%\n", - ":name: symmtens\n", - ":align: center\n", - "```\n", - "\n", - "This has strong implications for the structure of the tensor $T$. Notice that we didn't\n", - "assume the representations $X,Y$ and $Z$ to be irreducible. As we argued above, an\n", - "appropriate change of basis can bring the representations $X,Y$ and $Z$ in block-diagonal\n", - "form where every block corresponds to an irrep of the group and every block can appear\n", - "multiple times, which we call the multiplicity of an irrep in the representation. Schur's\n", - "lemma then implies that in this basis, the tensor becomes block-diagonal. In an appropriate\n", - "matricization of $T$ we can thus write $T=\\bigoplus_c B_c\\otimes\\mathbb{I}_c$ where the\n", - "direct sum over $c$ represents the decomposition of $X\\otimes\\bar Y\\otimes\\bar Z$ in irreps\n", - "$c$ that can appear multiple times. In other words, the generic symmetric tensor $T$ can be\n", - "stored much more efficiently by only keeping track of the different blocks $B_c$.\n", - "\n", - "TensorKit is particularly well suited for dealing with symmetric tensors. What TensorKit\n", - "does is exactly what was described in the previous paragraph, it keeps track of the block\n", - "structure of the symmetric tensor, hereby drastically reducing the amount of memory it takes\n", - "to store these objects, and is able to efficiently manipulate them by exploiting its\n", - "structure to the maximum.\n", - "\n", - "As a simple exercise, let us construct a rank 3 $SU(2)$ symmetric tensor as above. For\n", - "example the spin $1/2$ and spin $1$ representation can be called via respectively" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "e9ebd824", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Rep[SU₂](1=>1)" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "using TensorKit\n", - "\n", - "s = SU₂Space(1/2 => 1)\n", - "l = SU₂Space(1 => 1)" - ] - }, - { - "cell_type": "markdown", - "id": "723c4bf2", - "metadata": {}, - "source": [ - "Here, `` => 1`` essentially means that we consider only one copy (direct summand) of these\n", - "representations. If we would want to consider the direct sum $\\frac{1}{2}\\oplus\\frac{1}{2}$\n", - "we would write" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "11ffb4e8", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Rep[SU₂](1/2=>2)" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ss = SU₂Space(1/2 => 2)" - ] - }, - { - "cell_type": "markdown", - "id": "8b216a4d", - "metadata": {}, - "source": [ - "A symmetric tensor can now be constructed as" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "a374dbdf", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Rep[SU₂](1=>1) ← (Rep[SU₂](1/2=>1) ⊗ Rep[SU₂](1/2=>1))):\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1,), 1, (false,), ()) ← FusionTree{Irrep[SU₂]}((1/2, 1/2), 1, (false, false), ()):\n", - "[:, :, 1] =\n", - " 0.0\n" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = TensorMap(l ← s ⊗ s)" - ] - }, - { - "cell_type": "markdown", - "id": "912602a2", - "metadata": {}, - "source": [ - "This tensor then has, by construction, the symmetry property that it transforms trivially\n", - "under $1\\otimes\\bar{\\frac{1}{2}}\\otimes\\bar{\\frac{1}{2}}$. The blocks can then be inspected\n", - "by calling ``blocks`` on the tensor, and we can also check that the dimensions of the domain\n", - "and codomain are as expected:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "ec83147e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorKit.SortedVectorDict{SU2Irrep, Matrix{Float64}} with 1 entry:\n", - " 1 => [0.0;;]" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "@assert dim(domain(A)) == 4\n", - "@assert dim(codomain(A)) == 3\n", - "blocks(A)" - ] - }, - { - "cell_type": "markdown", - "id": "3422a594", - "metadata": {}, - "source": [ - "We see that this tensor has one block that we can fill up with some data of our liking. Let\n", - "us consider another example" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "a63bd6ac", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorKit.SortedVectorDict{SU2Irrep, Matrix{Float64}}()" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "B = TensorMap(s ← s ⊗ s)\n", - "blocks(B)" - ] - }, - { - "cell_type": "markdown", - "id": "7775f57b", - "metadata": {}, - "source": [ - "This tensor does not have any blocks! This is compatible with the fact that two spin 1/2's\n", - "cannot fuse to a third spin 1/2. Finally let us consider a tensor with with more blocks:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "aa039f7a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorKit.SortedVectorDict{SU2Irrep, Matrix{Float64}} with 1 entry:\n", - " 1/2 => [2.3342e-313 6.15379e-313; 3.39519e-313 6.92768e-310]" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "C = TensorMap(ss ← ss)\n", - "blocks(C)" - ] - }, - { - "cell_type": "markdown", - "id": "ece356da", - "metadata": {}, - "source": [ - "This tensor has four non-trivial entries.\n", - "\n", - "## Outlook and generalizations\n", - "\n", - "Let us conclude with an outlook and some generalizations.\n", - "\n", - "- Besides the \"global\" symmetries we considered here, you might also be familiar with gauge\n", - " symmetries from another course. Gauge theories are ubiquitous in physics and describe a\n", - " plethora of interesting physical phenomena. Gauge symmetries should however not be thought\n", - " of as actual symmetries transforming physically different states into each other, but\n", - " rather describe a redundancy in the description of the system. Nevertheless, group theory\n", - " also lies at the heart of these theories.\n", - "- In this brief overview we mostly neglected spatial symmetries. Spatial symmetries can be\n", - " understood as transformations that translate, rotate or reflect the lattice. These kind of\n", - " symmetries thus don't act \"on site\" anymore. The full classification of spatial symmetry\n", - " groups is notoriously rich and beautiful, especially in higher dimensions, and exploiting\n", - " them in algorithms can result in tremendous speedup and stability. We already encountered\n", - " the example of translation symmetry. One of the benefits of exploiting this symmetry in\n", - " tensor networks is e.g. that if the ground state of an infinite one-dimensional model does\n", - " not break translation invariance, this ground state can be well modelled by a uniform\n", - " matrix product state, a matrix product state consisting of one tensor repeated\n", - " indefinitely.\n", - "- Inspired by the discovery of topological phases of matter and their anyonic excitations,\n", - " there has been a growing fascination with the exploration of non-invertible, or\n", - " categorical symmetries. These symmetries are beyond the scope of these notes. These\n", - " categorical symmetries are not described by groups but by more general and intricate\n", - " algebraic structures called fusion categories, of which (finite) groups and their\n", - " representations are specific examples. For an example of how spin chains with categorical\n", - " symmetries can be constructed, see for example {cite}`feiguin2007interacting`. TensorKit\n", - " allows for an efficient construction and storage of tensors which are symmetric with\n", - " respect to these more general kind of symmetries." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 443, - 449, - 455, - 458, - 462, - 464, - 470, - 474, - 479, - 482, - 487, - 490 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.md b/pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.md deleted file mode 100644 index 02f28109..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/Symmetries.md +++ /dev/null @@ -1,523 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(symmetries)= -# Symmetries in Quantum Many-Body Physics - -The goal of this section is to give a very gentle introduction to the concept of symmetries -in quantum many-body physics, and the notion of symmetric tensors. The general mathematical -framework of symmetries in physics (or at least the framework we will restrict to) is that -of group - and representation theory. Our goal is not to take this framework as a given and -illustrate it, but rather to first discuss a couple of important applications of symmetries -in the context of some concrete models and gradually build up to the more general framework. -We will finish our discussion with an outlook to generalizations of the framework presented -here. It goes without saying that we will only scratch the surface of this vast topic. The -interested reader is referred to the immense literature on this topic, or to a more -specialized course. - -## Examples and Applications - -### Symmetry Breaking, Order Parameters and Phases - -Recall the one-dimensional transverse field Ising model defined above. Its degrees of -freedom are qubits ordered on a one-dimensional lattice, and its Hamiltonian reads - -```{math} -H = -\sum_{i} \sigma^z_i\sigma^z_{i+1} -h_x\sum_i\sigma^x_i. -``` - -Let us simply consider periodic boundary conditions. Besides the obvious translation -symmetry, which we will discuss below, this model is also invariant under flipping all spins -simultaneously in the Z-direction, i.e. in the Pauli Z basis: -$\ket{\uparrow}\leftrightarrow\ket{\downarrow}$. That this operation constitutes a symmetry -is clear from the Hamiltonian as the energy of the first term only depends on the -neighbouring spins being (anti-)aligned, which is clearly spin flip-invariant. The second -spin is trivially invariant as this models an external magnetic field which is orthogonal to -the Z-direction. - -This spin flip is "implemented", or more correctly "represented", by the unitary operator -$P=\bigotimes_i \sigma^x_i$. Notice that $P^2=1$ in accordance with our intuition that -flipping all the spins twice is equivalent with leaving all spins untouched. The fact that -this operator represents a symmetry of the model then translates to $[H,P]=0$, or -equivalently $P^\dagger HP=H$. Notice that the identity operator is also trivially a -symmetry (of every model) and thus the set $\{1,P\}$ is closed under taking the product. - -Even though the Hamiltonian has the symmetry regardless of the value of the parameter $h_x$, -you might know from a previous course that the ground state or ground state subspace are not -necessarily invariant under the symmetry, a phenomenon known as spontaneous symmetry -breaking (SSB) or symmetry breaking for short. Let us investigate the ground state subspace -of the transverse field Ising model in the extremal case of vanishing and infinite magnetic -field. - -- $h_x\rightarrow \infty$ In this case the model effectly reduces to a paramagnet. The - unique ground state is the product state $\ket{\Psi_+}=\ket{+}^{\otimes N}$ where - $\ket{+}=\frac{1}{\sqrt{2}}(\ket{\uparrow}+\ket{\downarrow})$ is the unique eigenvalue 1 - eigenvector of $\sigma^x$. Notice that this state is invariant under the symmetry operator - $P$, $P\ket{\Psi_+}=\ket{\Psi_+}$. In other words, the ground state in this case is - symmetric. For reasons mentioned below this state is also considered to be disordered. -- $h_x=0$ In this case the energy is minimized by aligning all the spins and the model - behaves as a classical ferromagnet. Obviously, two distinct ground states are - $\ket{\Psi_\uparrow}=\ket{\uparrow\uparrow...\uparrow}$ and - $\ket{\Psi_\downarrow}=\ket{\downarrow\downarrow...\downarrow}$. Contrary to the previous - case they span a two-dimensional ground state subspace, and these states are not - symmetric. In fact, under the action of $P$ they get mapped onto the other: - $P\ket{\Psi_\uparrow}=\ket{\Psi_\downarrow}$ and vice versa. The ground state in this case - is thus symmetry broken, or ordered. - -Since the ground state degeneracy is necessarily an integer, it is clear that it can not -change smoothly from two to one when the magnetic field is slowly turned on from -$h_x = 0 \rightarrow \infty$. Therefore the Ising model for small $h_x$ and large $h_x$ are -said to belong to different phases, and for some finite value of $h_x$ a phase transition -where the ground state degeneracy changes abruptly is expected to take place. As it turns -out, this change happens for $h_x = 1$, at which point the Ising model becomes critical. - -Inspired by the credo of symmetry we can introduce a local operator which probes the phase -and can witness the phase transition. In the case of the Ising model this order parameter is -the local magnetisation on every site: $O=\sum_i\sigma^z_i$. It is clear that this order -parameter anticommutes with the symmetry, $P^\dagger OP=-O$, from which it follows that in -the symmetric phase the expectation value of the order parameter vanishes, -$\braket{\Psi_+|O|\Psi_+}=0$, while in the ferromagnetic phase -$\braket{\Psi_\uparrow|O|\Psi_\uparrow}>0$ and -$\braket{\Psi_\downarrow|O|\Psi_\downarrow}<0$. Notice however that for the latter we could -also have chosen the ground state $\ket{\Psi_\uparrow}+\ket{\Psi_\downarrow}$ in which case -the expectation value of $O$ becomes 0. So it seems that the expectation value of the order -parameter is ill-defined is this phase. This can be remedied by first adding a small -symmetry breaking term $\lambda\sum_i\sigma^z_i$ to the Hamiltonian which, depending on the -sign of $\lambda$, selects one of the ground states $\ket{\Psi_{\uparrow/\downarrow}}$ after -which the limit $\lambda\rightarrow 0$ is taken. - -The synopsis of this example is thus the following. Symmetries in quantum many-body physics -(but also in single-particle quantum mechanics) are represented by unitary operators which -are closed under multiplication. Depending on the parameters in the Hamiltonian, part of -these symmetries can be broken by the ground state subspace, and this pattern of symmetry -breaking is a hallmark feature of different phases of the model. Different phases can be -probed by a local order parameter which does not commute with the symmetries. This paradigm -of classifying phases based on symmetry principles was first put forward by Landau -{cite}`Landau:1937obd`, and since then bears his name. - -### Noether and Conserved Quantitites - -You might remember Noether's theorem from a course on field theory. It states that every -continuous symmetry of a system (in field theory most often defined via its Lagrangian) -gives rise to a conserved current. In the context of quantum physics Noether's theorem -becomes almost trivial and states that the expectation value of every operator that commutes -with the Hamiltonian has a conserved expectation value: - -```{math} -[H, O] = 0 \implies \frac{d}{dt}\braket{\Psi(t)|O|\Psi(t)} = 0. -``` - -The proof is almost trivial and is left as a simple exercise. - -- The simplest example of this principle is obviously the Hamiltonain that trivially - commutes with itself. The consequence is that the expectation value of the total energy is - conserved. - -- Another example is that of translation symmetry. Translation symmetry is implemented by - the operator $T$ that acts on local operators $O_i$ via $T^\dagger O_iT=O_{i+1}$. Since - for a system with $N$ sites we obviously have the identity $T^N=1$, and $T$ is unitary, - the eigenvalues of $T$ are phases $\exp(2\pi ip/N)$ where the quantum number - $p=0,1,...,N-1$ is the momentum. By virtue of Noether, translation invariance is - understood to give rise to conservation of momentum, and thus momentum acts as a good - quantum number for the eigenstates of translationally invariant models. - -Let us consider another non-trivial example to illustrate the implications of this theorem. -Recall the spins $s$ XXZ Heisenberg model whose Hamiltonian reads - -```{math} -H = -J\sum_i S^x_iS^x_{i+1}+S^y_iS^y_{i+1}+\Delta S^z_iS^z_{i+1}. -``` - -The spin operators are $2s + 1$-dimensional and satisfy the $\mathfrak{su}(2)$ commutation -relations - -```{math} -[\sigma^a_i,\sigma^b_j]=i\delta_{i,j}\sum_c \varepsilon_{abc}S^c_i -``` - -Let us define the total spin - -```{math} -S^a = \sum_i S^a_i. -``` - -From a direct computation it follows that in the case where $\Delta=1$, and the model thus -reduces to the Heisenberg XXX model, $H$ commutes with all $S^a$, $[H,S^a]=0$, $a=x,y,z$. -However, when $\Delta\neq 1$ only the Z component $S^z$ commutes with $H$, $[H, S^z]=0$. -Notice the difference with the Ising model where the same symmetry was present for all -values of $h_x$. - -This means that in the $\Delta=1$ case the Hamiltonian is symmetric under the full $SU(2)$ -(half integer s) or $SO(3)$ (integer s) symmetry (see below), whereas when $\Delta\neq 1$ -only an $SO(2)\simeq U(1)$ symmetry generated by $S^z$ is retained. If $H$ commutes with -$S^z$ it follows that it automatically also commutes with $\exp(i\theta S^z)$, -$\theta\in[0,2\pi)$. This operator has an interpretation as a rotation around the Z-axis -with an angle $\theta$. - -According to Noether the Heisenberg model thus has conserved quantities associated with -these operators. Regardless of $\Delta$ the Z component of the total spin is conserved, and -for $\Delta=1$ all components of the total spin are conserved. In particular this means that -the eigenvalue $M_z$ of $S^z$ and $S(S+1)$ of $\vec{S}\cdot\vec{S}$ are good quantum numbers -to label the eigenstates of the Heisenberg Hamiltonian. - -## Group and Representation Theory - -Motivated by the examples from above, we will gently introduce some notions of group - and -representation theory that form the backbone of a general theory of symmetries. - -### Group Theory - -Roughly speaking a group $G$ is a set of symmetry operators and a multiplication rule on how -to compose them. Let us motivate the definition one step a time. - -First of all notice that a model can have a finite or infinite (discrete or continuous) -number of symmetries. Clearly, the spin flip symmetry of the Ising model consists of only -one non-trivial symmetry operation, namely flipping all spins. The operator carrying out -this transformation is $P=\bigotimes_i\sigma^x_i$. The XXZ model however has a continuous -symmetry, namely rotations around the Z-axis, that is implemented via $\exp(i\theta S^z)$, -$\theta\in[0,2\pi)$, where we should really think about every value of $\theta$ as labeling -a different symmetry operation. - -These symmetries can be composed or multiplied to form a new symmetry operation. Take for -example flipping all the spins. Flipping all spins twice results in not flipping any spins -at all, which is trivially also a symmetry of the Hamiltonian. Next, consider also the -$U(1)$ symmetry of the XXZ model. First rotating over $\theta_2$ and then over $\theta_1$ -gives a new rotation over $\theta_1+\theta_2$: $\exp(i\theta_1 S^z)\exp(i\theta_2 -S^z)=\exp(i(\theta_1+\theta_2) S^z)$. This leads to the first part of the definition of what -a group is. - -1. A group $G$ is a set $G=\{g_1,g_2,...\}$ endowed with a multiplication $G\times - G\rightarrow G$. There exists an identity $1\in G$ for the multiplication such that - $1g=g1=g, \forall g\in G$. - -Note that this multiplication is not necessarily abelian. A simple example is the full -$SU(2)$ symmetry of the XXX model defined above. However, the composition of symmetries is -still associative: - -2. For all group elements $g,h,k$ we have that $g(hk)=(gh)k$. - -A property we also would like to formalize is the fact that every symmetry transformation -can be undone. Take for example a $U(1)$ rotation $\exp(i\theta S^z)$, if we compose it with -the opposite rotation $\exp(i(2\pi-\theta) S^z)$ we get the identity. Hence: - -3. Every group element $g$ has a unique inverse $g^{-1}$: $gg^{-1}=g^{-1}g=1$. - -Together 1. 2. and 3. constitute the definition of a group. Before mentioning some examples -let us also introduce the concept of a subgroup. As the name suggests, a subgroup is a -subset of a group which itself constitutes a group. Note for example that a rotation over -$\pi$, $\exp(i\pi S^z)$, together with the identity, generates a subgroup of $\{\exp(2\pi -i\theta S^z|\theta\in[0,2\pi)\}$ with two elements. - -The concept of subgroups lies at the heart of symmetry breaking. Recall that in the -ferromagnetic phase, the Ising model breaks the spin flip symmetry. In Landau's paradigm we -say that the pattern of symmetry breaking is $\mathbb{Z}_2\rightarrow \{1\}$ (see below for -an explanation of the notation). In other words, the full symmetry group ($\mathbb{Z}_2$) is -broken in the ferromagnetic phase to a subgroup (the trivial group). More generally, a -theory with a $G$ symmetry can undergo a pattern of symmetry breaking $G\rightarrow H$ where -$H$ is a subgroup of $G$. The meaning of this symbolic expression is that the ground states -keep an H symmetry, and the ground state degeneracy is $|G|/|H|$. - -#### Examples - -- The trivial group is a group with only one element that is than automatically also the - identity, and a trivial multiplication law. Above, it was denoted by $\{1\}$. -- $\mathbb{Z}_N$ is the additive group of integers modulo $N$. The group elements are the - integers $\{0,1,...,N-1\}$ and the group multiplication is addition modulo $N$. Hence it - is clearly a finite group. In particular, the spin flip symmetry from above corresponds to - the group $\mathbb{Z}_2$. Notice that for all $N$ $\mathbb{Z}_N$ is abelian. -- Another abelian group is $U(1)$. This group is defined as - $U(1)=\left\{z\in\mathbb{C}:|z|^2 = 1\right\}$, with group multiplication the - multiplication of complex numbers. Note we encountered this group in the XXZ model as - being the rotations around the Z axis: $\{\exp(2\pi i\theta S^z|\theta\in[0,2\pi)\}$. -- $SU(2)$ is the group of unimodular unitary $2\times 2$ matrices: - ```{math} - SU(2) := \left\{U \in \mathbb{C}^{2\times 2} | - \det U = 1, UU^\dagger = U^\dagger U = \mathbb{I}\right\}. - ``` - The group multiplication is given by group multiplication. Similarly, one defines - $SU(N),N\geq 2$. Note that none of these groups are abelian. - -- The 3D rotation group or special orthogonal group $SO(3)$ is the group of real $3\times 3$ - orthogonal matrices with unit determinant: - ```{math} - SO(3) := \left\{M\in\mathbb{R}^{3\times 3}|MM^T=M^TM=\mathbb{I},\det M=1\right\}. - ``` - Similarly, one defines $SO(N),N\geq 2$. Note that only $SO(2)$ is abelian. - -### Representation Theory - -In the above examples, we were dealing with the question which symmetry transformations -leave the Hamiltonian (and in the absence of symmetry breaking also the ground states) -invariant. These symmetry representations were implemented (represented) by invertible -linear operators, non-singular matrices, that form a closed set under multiplication. This -multiplication structure is what we identified as a group. What we could now do, is to take -a group as given, and wonder which linear transformations we can come up with that multiply -according to these multiplication rules. This is exactly the underlying idea of -representation theory. Representation theory deals with the question how groups can linearly -act on vector spaces. - -This immediately raises a plethora of questions such as if we can classify all -representations (up to some kind of equivalence), if there exists 'minimal' representations -and how we can construct new representations of known ones. A minimal answer to these -questions is the goal of this section. - -#### Definition - -For the sake of these notes, a representation of a group $G$ is thus a set of matrices -indexed by the group elements, $\{X_g|g\in G\}$ that multiply according to the -multiplication rule of $G$: - -```{math} -X_gX_h = X_{gh} -``` - -Note that the identity is always mapped to the identity matrix! - -We call the dimension of the matrices $X_g$ the dimension of the representation. - -##### Examples - -- Every group can be trivially represented by mapping every group element to the 'matrix' - (1). Obviously, this representation is one-dimensional and is called the trivial - representation. -- Probably the simplest non-trivial representation, is the representation of $\mathbb{Z}_2$ - that maps the non-trivial element to -1. Concretely, $X_0=1, X_1=-1$, and indeed - $X_1X_1=(-1)^2=X_0$. This representation is called the sign representation. -- Let us construct a two-dimensional representation of $\mathbb{Z}_2$. Since the Pauli - matrix $\sigma^x$ (as any other Pauli matrix) squares to the identity, $\sigma^x$ together - with the two-dimensional identity matrix constitutes a two-dimensional representation of - $\mathbb{Z}_2$. In the notation from above, $X_0=\mathbb{I}_2$, $X_1=\sigma^x$. This - representation is called the regular representation of $\mathbb{Z}_2$. - -#### Complex Conjugate Representation, Tensor Product and Direct Sum Representation - -Given a representation $\{X_g|g\in G\}$, the complex conjugate representation $\bar X$ is -defined as $\bar X=\{\bar X_g|g\in G\}$ which satisfies the defining property of -representations via $\bar X_g\bar X_h= \overline{X_gX_h}=\bar X_{gh}$. - -Given two representations of $G$, $X\equiv\{X_g|g\in G\}$ and $Y\equiv\{Y_g|g\in G\}$, there -are two obvious ways to construct a new representation. - -The first one is the tensor product representation defined via the Kronecker product of -matrices: - -```{math} -\{X_g\otimes Y_g|g\in G\}. -``` - -You should check that these still satisfy the defining property of a representation. The -dimension of the tensor product is the product of the dimensions of the two representations -$X$ and $Y$. - -The other one is the direct sum: - -```{math} -\{X_g\oplus Y_g|g\in G\}. -``` - -Its dimension is that the sum of the dimensions of $X$ and $Y$. - -#### Irreducible Representations - -It is clear that physical observables should not depend on any choice of basis. Therefore -two representations are (unitarily) equivalent when there is a unitary basis transformation -$U$ such that $X_g' =UX_gU^\dagger$. Note that $U$ is independent of $g$. - -##### Example - -Consider again the two-dimensional regular representation of $\mathbb{Z}_2$ from above. The -basis transformation - -```{math} -H=\frac{1}{\sqrt 2} -\begin{pmatrix} - 1 & 1\\ - 1 & -1 -\end{pmatrix} -``` - -shows that this representation is equivalent to one where the non-trivial element of -$\mathbb{Z}_2$ is represented by $H\sigma^x H^\dagger=\sigma^z$. This illustrates that the -regular representation is equivalent to the direct sum of the trivial representation and the -sign representation! - -The crux of this example is the following. Some representations can, by an appropriate -choice of basis, be brought in a form where all $X_g$ are simultaneously block-diagonal: - -```{math} -X_g'=UX_gU^\dagger= -\begin{pmatrix} - \fbox{$X^1_g$} & 0 &\cdots\\ - 0& \fbox{$X^2_g$} & \cdots\\ - \vdots & \vdots & \ddots -\end{pmatrix}. -``` - -These blocks correspond to invariant subspaces of the representation, i.e. subspaces that -transform amongst themselves under the action of the group. - -An irreducible representation, irrep for short, can then be defined as a representation that -can not be brought in a (non-trivial) block-diagonal form by any change of basis. - -It can be shown that every finite group has a finite number of irreps. The sum of the -dimensions squared is equal to the number of elements in the group: $\sum_\alpha -d_\alpha^2=|G|$ where the sum is over all irreps labeled by $\alpha$ and $d_\alpha$ denote -their respective dimensions. - -One of the key questions of representation theory is what the irreps of a given group are -and how the tensor product of irreps (which is in general not an irrep!) decomposes in a -direct sum of irreps. The latter are sometimes known as the fusion rules. The basis -transformation that reduce a given representation in a direct sum of irreps is sometimes -called the Clebsch-Gordan coefficients, and are for some groups known explicitly. Before -discussing the example of $SU(2)$, let us first state the most important result in -representation theory which is due to Schur. - -[Schur's lemma] If a matrix $Y$ commutes with all representation matrices of an irreducible -representation of a group G, $X_gY=YX_g$ $\forall g\in G$, then $Y$ is proportional to the -identity matrix. - -#### Example - -The answer to the questions posed above is very well understood for the case of $SU(2)$. You -probably know the answer from a previous course on quantum mechanics. - -The irreps of $SU(2)$ can be labeled by its spin, let us call it $s$, that takes values -$s=0,1/2,1,3/2,...$. The dimension of the spin $s$ representation is equal to $2s+1$, so -there is exactly one irrep of every dimension. The spin $s=0$ irrep corresponds to the -trivial representation. - -The fusion rules can be summarized as - -```{math} -s_1\otimes s_2 \simeq \bigoplus_{s=|s_1-s_2|}^{s_1+s_2}s. -``` - -For example: $\frac{1}{2}\otimes\frac{1}{2}\simeq 0\oplus 1$. The Clebsch-Gordan -coefficients for $SU(2)$ have been computed analytically, and for low-dimensional irreps -have been tabulated for example -[here](https://pdg.lbl.gov/2018/reviews/rpp2018-rev-clebsch-gordan-coefs.pdf). - -(symmetric_tensors)= -## Symmetric Tensors - -In physics we are often dealing with tensors that transform according to the tensor product -representation of a given group $G$. A symmetric tensor can then be understood as a tensor -that transforms trivially under the action of $G$, or more concretely under the tensor -product representation $X\otimes\bar Y\otimes\bar Z$: - -```{figure} ../_static/SymmetricTensors/symmtens.svg -:scale: 12% -:name: symmtens -:align: center -``` - -This has strong implications for the structure of the tensor $T$. Notice that we didn't -assume the representations $X,Y$ and $Z$ to be irreducible. As we argued above, an -appropriate change of basis can bring the representations $X,Y$ and $Z$ in block-diagonal -form where every block corresponds to an irrep of the group and every block can appear -multiple times, which we call the multiplicity of an irrep in the representation. Schur's -lemma then implies that in this basis, the tensor becomes block-diagonal. In an appropriate -matricization of $T$ we can thus write $T=\bigoplus_c B_c\otimes\mathbb{I}_c$ where the -direct sum over $c$ represents the decomposition of $X\otimes\bar Y\otimes\bar Z$ in irreps -$c$ that can appear multiple times. In other words, the generic symmetric tensor $T$ can be -stored much more efficiently by only keeping track of the different blocks $B_c$. - -TensorKit is particularly well suited for dealing with symmetric tensors. What TensorKit -does is exactly what was described in the previous paragraph, it keeps track of the block -structure of the symmetric tensor, hereby drastically reducing the amount of memory it takes -to store these objects, and is able to efficiently manipulate them by exploiting its -structure to the maximum. - -As a simple exercise, let us construct a rank 3 $SU(2)$ symmetric tensor as above. For -example the spin $1/2$ and spin $1$ representation can be called via respectively - -```{code-cell} julia -:tags: ["hide-output"] -using TensorKit - -s = SU₂Space(1/2 => 1) -l = SU₂Space(1 => 1) -``` - -Here, `` => 1`` essentially means that we consider only one copy (direct summand) of these -representations. If we would want to consider the direct sum $\frac{1}{2}\oplus\frac{1}{2}$ -we would write - -```{code-cell} julia -:tags: ["hide-output"] -ss = SU₂Space(1/2 => 2) -``` - -A symmetric tensor can now be constructed as - -```{code-cell} julia -A = TensorMap(l ← s ⊗ s) -``` -This tensor then has, by construction, the symmetry property that it transforms trivially -under $1\otimes\bar{\frac{1}{2}}\otimes\bar{\frac{1}{2}}$. The blocks can then be inspected -by calling ``blocks`` on the tensor, and we can also check that the dimensions of the domain -and codomain are as expected: - -```{code-cell} julia -@assert dim(domain(A)) == 4 -@assert dim(codomain(A)) == 3 -blocks(A) -``` - -We see that this tensor has one block that we can fill up with some data of our liking. Let -us consider another example - -```{code-cell} julia -B = TensorMap(s ← s ⊗ s) -blocks(B) -``` - -This tensor does not have any blocks! This is compatible with the fact that two spin 1/2's -cannot fuse to a third spin 1/2. Finally let us consider a tensor with with more blocks: - -```{code-cell} julia -C = TensorMap(ss ← ss) -blocks(C) -``` - -This tensor has four non-trivial entries. - -## Outlook and generalizations - -Let us conclude with an outlook and some generalizations. - -- Besides the "global" symmetries we considered here, you might also be familiar with gauge - symmetries from another course. Gauge theories are ubiquitous in physics and describe a - plethora of interesting physical phenomena. Gauge symmetries should however not be thought - of as actual symmetries transforming physically different states into each other, but - rather describe a redundancy in the description of the system. Nevertheless, group theory - also lies at the heart of these theories. -- In this brief overview we mostly neglected spatial symmetries. Spatial symmetries can be - understood as transformations that translate, rotate or reflect the lattice. These kind of - symmetries thus don't act "on site" anymore. The full classification of spatial symmetry - groups is notoriously rich and beautiful, especially in higher dimensions, and exploiting - them in algorithms can result in tremendous speedup and stability. We already encountered - the example of translation symmetry. One of the benefits of exploiting this symmetry in - tensor networks is e.g. that if the ground state of an infinite one-dimensional model does - not break translation invariance, this ground state can be well modelled by a uniform - matrix product state, a matrix product state consisting of one tensor repeated - indefinitely. -- Inspired by the discovery of topological phases of matter and their anyonic excitations, - there has been a growing fascination with the exploration of non-invertible, or - categorical symmetries. These symmetries are beyond the scope of these notes. These - categorical symmetries are not described by groups but by more general and intricate - algebraic structures called fusion categories, of which (finite) groups and their - representations are specific examples. For an example of how spin chains with categorical - symmetries can be constructed, see for example {cite}`feiguin2007interacting`. TensorKit - allows for an efficient construction and storage of tensors which are symmetric with - respect to these more general kind of symmetries. - \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.ipynb b/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.ipynb deleted file mode 100644 index 1a47354e..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "05faf679", - "metadata": {}, - "source": [ - "(tensor_network_states)=\n", - "# Tensor Network States\n", - "\n", - "After our introduction on [quantum many body systems](many_body) and\n", - "[tensor networks](tensor_networks), we move on to considering how tensor networks can\n", - "characterize many-body systems. We start with a constructive approach to approximating an\n", - "arbitrary quantum state by a *tensor network state*. We then qualify in what settings such a\n", - "representation is efficient, and introduce several classes of tensor network states used in\n", - "different settings. We end this section by broadly commenting on how efficient manipulations\n", - "of tensor network states can be used to simulate quantum systems.\n", - "\n", - "## Quantum States as Tensor Networks\n", - "\n", - "Consider a quantum many body system which consists of physical spins with a local Hilbert\n", - "space $ \\mathbb H_i = \\mathbb C^d $ of dimension $ d $, which we will call the *physical\n", - "dimension*, are located at every site $ i $ of some lattice $ \\Lambda $. This gives rise to\n", - "a total Hilbert space of the system $ \\mathbb H = \\bigotimes_{i = 1}^{N} \\mathbb H_i =\n", - "\\left( \\mathbb C^d \\right)^{\\otimes N}$ where $ N = |\\Lambda| $ is the total number of sites\n", - "in the lattice. A general quantum state in this [many-body Hilbert space](many_body) can be\n", - "represented in terms a set of $d^N$ complex coefficients $C_{s_1,s_2,...,s_N} \\in \\mathbb\n", - "C$, where $s_i\\in \\{0,...,d-1\\}$, with respect to the computational basis as\n", - "\n", - "```{math}\n", - "\\ket{\\psi} = \\sum_{s_1,s_2,...,s_N} C_{s_1,s_2,...,s_N}\\ket{s_1,s_2,...,s_N}.\n", - "```\n", - "\n", - "The exponential increase in the number of coefficients with the system size means that it is\n", - "entirely impossible to store the full state vector of a quantum system of any reasonable\n", - "size in this way. For example, a system of $N=100$ spins with $d=2$ has $2^{100} \\approx\n", - "10^{30}$ coefficients, which is far more than the number of atoms in the universe.\n", - "\n", - "Instead of directly storing this full state vector, we can alternatively parametrize it as a\n", - "tensor network. Consider for example the case $N=4$. We can then represent the state vector\n", - "as a tensor $C_{s_1,s_2,s_3,s_4}$ with four indices, where each index corresponds to a\n", - "physical spin. The full state is then recovered as\n", - "\n", - "```{figure} ../_static/TensorNetworkStates/full_state.svg\n", - ":scale: 12%\n", - ":name: full_state\n", - ":align: center\n", - "```\n", - "We can now split the full tensor $C$ into separate components by consecutively applying the\n", - "SVD between pairs of physical indices. For example, splitting out the first index we can\n", - "rewrite $C$ as\n", - "\n", - " ```{figure} ../_static/TensorNetworkStates/svd1.svg\n", - ":scale: 12%\n", - ":name: svd1\n", - ":align: center\n", - "```\n", - "\n", - "In this expression we can interpret $L^{(1)}$ a a $d \\times D$ matrix, $\\lambda^{(1)}$ as a\n", - "$D \\times D$ matrix and $R^{(1)}$ as a $D$ by $d^{N-1}$ matrix. The horizontal edge in this\n", - "diagram is called a *virtual bond* and the dimension $D$ of this bond is called the *bond\n", - "dimension*. The bond dimension is a measure of the entanglement in the state, and in this\n", - "case encodes the amount of entanglement between the first site and the rest of the system.\n", - "So far we have not actually done anything significant, since this decomposition of $C$\n", - "actually increased the total number of required coefficients, instead of reducing it. The\n", - "key point is that we can reduce the number of parameters by *truncating* $\\lambda^{(1)}$ to\n", - "only keep the $D$ largest singular values. This results in a *low rank approximation* of the\n", - "original state, where the quality of the approximation is controlled by the chosen final\n", - "bond dimension $D$.\n", - "\n", - "By repeatedly applying this procedure, grouping and splitting indices in the resulting\n", - "diagrams and absorbing the bond tensors $\\lambda^{(i)}$ into the site tensors we can\n", - "decompose $C$ into a tensor network of any geometry. For example, we can approximate $C$ as\n", - "the contraction of a square network to end up with a *tensor network state* of the form\n", - "\n", - "```{figure} ../_static/TensorNetworkStates/tn_state.svg\n", - ":scale: 12%\n", - ":name: tn_state\n", - ":align: center\n", - "```\n", - "\n", - "In words, this expression means that for every basis state $ \\ket{s_1,s_2,s_3,s_4} $ its\n", - "corresponding coefficient in the superposition is obtained by indexing all of the *physical\n", - "legs* pointing downward according to the corresponding physical basis state and contracting\n", - "the resulting network.\n", - "\n", - "We can therefore parametrize an arbitrary quantum state in terms of a set of local tensors\n", - "$A^{(i)}$, where each of these tensors encodes a number of parameters that is polynomial in\n", - "its physical dimension $d$ and bond dimensions $D$ (which can in principle be different for\n", - "every virtual bond). For a general quantum state however, a good tensor network state\n", - "approximation requires a bond dimension which scales exponentially with the system size,\n", - "meaning that we have not actually gained anything in terms of efficiency. However, it turns\n", - "out that for many physically relevant states the bond dimension can be bounded by a constant\n", - "independent of the system size, in which case the tensor network representation leads to an\n", - "exponential reduction in the number of variational parameters.\n", - "\n", - "(area_laws)=\n", - "## Area Laws and Tensor Network States\n", - "\n", - "To see why this is the case, let us study the entanglement entropy of a tensor network\n", - "state. Consider the following two-dimensional network, where all physical indices have a\n", - "dimension $d$ and we assume all virtual bonds have the same dimension $D$,\n", - "\n", - "```{figure} ../_static/TensorNetworkStates/peps.svg\n", - ":scale: 12%\n", - ":name: peps\n", - ":align: center\n", - "```\n", - "\n", - "We now want to quantify the entanglement between the shaded region $ \\mathcal A$ and the\n", - "rest of the system for this specific state. To this end, we first recall the formula for the\n", - "bipartite entanglement entropy Eq. {eq}`entanglement_entropy`, and note that the number of\n", - "terms in this expression is determined by the number of non-zero Schmidt coefficients, the\n", - "latter of which is referred to as the *Schmidt rank*. Looking back now at our initial\n", - "decomposition of the full state tensor $C$ by splitting out its first index above, we see\n", - "that the Shchmidt rank is precisely given by the bond dimension $D$ across this cut. From\n", - "this, you should be able to convince yourself that the maximal entanglement entropy across\n", - "this cut is determined by the bond dimension as $S \\sim \\log(D)$. Extending this line of\n", - "reasoning to our question of the entanglement between the region $ \\mathcal A$ and the rest\n", - "of the system, we see that each virtual leg connecting $\\mathcal A$ to the rest of the\n", - "system can contribute a term $\\log(D)$ to the entanglement entropy. Therefore we arrive at\n", - "\n", - "```{math}\n", - "S(\\mathcal A) \\sim \\log(D) \\; \\partial \\mathcal A,\n", - "```\n", - "\n", - "where $ \\partial \\mathcal A $ is the size of the boundary of $\\mathcal A$ (which in this\n", - "two-dimensional case is its perimeter).\n", - "\n", - "Clearly, this tensor network state then naturally obeys an area law for its entanglement\n", - "entropy. In our discussion of the\n", - "[low temparature properties of quantum many body systems](zero_temp) however, we have\n", - "already seen that low-energy states of locally interacting Hamiltonians obey exactly such an\n", - "area law. It is this fact that tensor network states inherently encode area law entanglement\n", - "that makes them so well suited for representing low-energy states of quantum systems. They\n", - "can only target a tiny corner of the full exponentially large Hilbert space, but this corner\n", - "is precisely where the most relevant physics happens. This observation has given rise to a\n", - "large family of tensor network states which allow for an efficient parametrization of states\n", - "with varying geometries.\n", - "\n", - "\n", - "\n", - "```{note}\n", - "An equally important feature of tensor networks is that they, aside from providing an\n", - "efficient parametrization of states, also allow for efficient *manipulations* of these\n", - "states. This means that they can be used to compute interesting features of quantum systems,\n", - "and can be optimized to target states of specific interest such as ground states and\n", - "low-lying excitations. For all of the network geometries depicted above there exist\n", - "corresponding algorithms that put them to efficient use, some of which will be highlighted\n", - "in future sections of this tutorial.\n", - "```\n", - "\n", - "" - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.md b/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.md deleted file mode 100644 index 0aa55578..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworkStates.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(tensor_network_states)= -# Tensor Network States - -After our introduction on [quantum many body systems](many_body) and -[tensor networks](tensor_networks), we move on to considering how tensor networks can -characterize many-body systems. We start with a constructive approach to approximating an -arbitrary quantum state by a *tensor network state*. We then qualify in what settings such a -representation is efficient, and introduce several classes of tensor network states used in -different settings. We end this section by broadly commenting on how efficient manipulations -of tensor network states can be used to simulate quantum systems. - -## Quantum States as Tensor Networks - -Consider a quantum many body system which consists of physical spins with a local Hilbert -space $ \mathbb H_i = \mathbb C^d $ of dimension $ d $, which we will call the *physical -dimension*, are located at every site $ i $ of some lattice $ \Lambda $. This gives rise to -a total Hilbert space of the system $ \mathbb H = \bigotimes_{i = 1}^{N} \mathbb H_i = -\left( \mathbb C^d \right)^{\otimes N}$ where $ N = |\Lambda| $ is the total number of sites -in the lattice. A general quantum state in this [many-body Hilbert space](many_body) can be -represented in terms a set of $d^N$ complex coefficients $C_{s_1,s_2,...,s_N} \in \mathbb -C$, where $s_i\in \{0,...,d-1\}$, with respect to the computational basis as - -```{math} -\ket{\psi} = \sum_{s_1,s_2,...,s_N} C_{s_1,s_2,...,s_N}\ket{s_1,s_2,...,s_N}. -``` - -The exponential increase in the number of coefficients with the system size means that it is -entirely impossible to store the full state vector of a quantum system of any reasonable -size in this way. For example, a system of $N=100$ spins with $d=2$ has $2^{100} \approx -10^{30}$ coefficients, which is far more than the number of atoms in the universe. - -Instead of directly storing this full state vector, we can alternatively parametrize it as a -tensor network. Consider for example the case $N=4$. We can then represent the state vector -as a tensor $C_{s_1,s_2,s_3,s_4}$ with four indices, where each index corresponds to a -physical spin. The full state is then recovered as - -```{figure} ../_static/TensorNetworkStates/full_state.svg -:scale: 12% -:name: full_state -:align: center -``` -We can now split the full tensor $C$ into separate components by consecutively applying the -SVD between pairs of physical indices. For example, splitting out the first index we can -rewrite $C$ as - - ```{figure} ../_static/TensorNetworkStates/svd1.svg -:scale: 12% -:name: svd1 -:align: center -``` - -In this expression we can interpret $L^{(1)}$ a a $d \times D$ matrix, $\lambda^{(1)}$ as a -$D \times D$ matrix and $R^{(1)}$ as a $D$ by $d^{N-1}$ matrix. The horizontal edge in this -diagram is called a *virtual bond* and the dimension $D$ of this bond is called the *bond -dimension*. The bond dimension is a measure of the entanglement in the state, and in this -case encodes the amount of entanglement between the first site and the rest of the system. -So far we have not actually done anything significant, since this decomposition of $C$ -actually increased the total number of required coefficients, instead of reducing it. The -key point is that we can reduce the number of parameters by *truncating* $\lambda^{(1)}$ to -only keep the $D$ largest singular values. This results in a *low rank approximation* of the -original state, where the quality of the approximation is controlled by the chosen final -bond dimension $D$. - -By repeatedly applying this procedure, grouping and splitting indices in the resulting -diagrams and absorbing the bond tensors $\lambda^{(i)}$ into the site tensors we can -decompose $C$ into a tensor network of any geometry. For example, we can approximate $C$ as -the contraction of a square network to end up with a *tensor network state* of the form - -```{figure} ../_static/TensorNetworkStates/tn_state.svg -:scale: 12% -:name: tn_state -:align: center -``` - -In words, this expression means that for every basis state $ \ket{s_1,s_2,s_3,s_4} $ its -corresponding coefficient in the superposition is obtained by indexing all of the *physical -legs* pointing downward according to the corresponding physical basis state and contracting -the resulting network. - -We can therefore parametrize an arbitrary quantum state in terms of a set of local tensors -$A^{(i)}$, where each of these tensors encodes a number of parameters that is polynomial in -its physical dimension $d$ and bond dimensions $D$ (which can in principle be different for -every virtual bond). For a general quantum state however, a good tensor network state -approximation requires a bond dimension which scales exponentially with the system size, -meaning that we have not actually gained anything in terms of efficiency. However, it turns -out that for many physically relevant states the bond dimension can be bounded by a constant -independent of the system size, in which case the tensor network representation leads to an -exponential reduction in the number of variational parameters. - -(area_laws)= -## Area Laws and Tensor Network States - -To see why this is the case, let us study the entanglement entropy of a tensor network -state. Consider the following two-dimensional network, where all physical indices have a -dimension $d$ and we assume all virtual bonds have the same dimension $D$, - -```{figure} ../_static/TensorNetworkStates/peps.svg -:scale: 12% -:name: peps -:align: center -``` - -We now want to quantify the entanglement between the shaded region $ \mathcal A$ and the -rest of the system for this specific state. To this end, we first recall the formula for the -bipartite entanglement entropy Eq. {eq}`entanglement_entropy`, and note that the number of -terms in this expression is determined by the number of non-zero Schmidt coefficients, the -latter of which is referred to as the *Schmidt rank*. Looking back now at our initial -decomposition of the full state tensor $C$ by splitting out its first index above, we see -that the Shchmidt rank is precisely given by the bond dimension $D$ across this cut. From -this, you should be able to convince yourself that the maximal entanglement entropy across -this cut is determined by the bond dimension as $S \sim \log(D)$. Extending this line of -reasoning to our question of the entanglement between the region $ \mathcal A$ and the rest -of the system, we see that each virtual leg connecting $\mathcal A$ to the rest of the -system can contribute a term $\log(D)$ to the entanglement entropy. Therefore we arrive at - -```{math} -S(\mathcal A) \sim \log(D) \; \partial \mathcal A, -``` - -where $ \partial \mathcal A $ is the size of the boundary of $\mathcal A$ (which in this -two-dimensional case is its perimeter). - -Clearly, this tensor network state then naturally obeys an area law for its entanglement -entropy. In our discussion of the -[low temparature properties of quantum many body systems](zero_temp) however, we have -already seen that low-energy states of locally interacting Hamiltonians obey exactly such an -area law. It is this fact that tensor network states inherently encode area law entanglement -that makes them so well suited for representing low-energy states of quantum systems. They -can only target a tiny corner of the full exponentially large Hilbert space, but this corner -is precisely where the most relevant physics happens. This observation has given rise to a -large family of tensor network states which allow for an efficient parametrization of states -with varying geometries. - - - -```{note} -An equally important feature of tensor networks is that they, aside from providing an -efficient parametrization of states, also allow for efficient *manipulations* of these -states. This means that they can be used to compute interesting features of quantum systems, -and can be optimized to target states of specific interest such as ground states and -low-lying excitations. For all of the network geometries depicted above there exist -corresponding algorithms that put them to efficient use, some of which will be highlighted -in future sections of this tutorial. -``` - - diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.ipynb b/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.ipynb deleted file mode 100644 index 869b856c..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.ipynb +++ /dev/null @@ -1,812 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "e6f8957d", - "metadata": {}, - "source": [ - "(tensor_networks)=\n", - "# Tensor Network Theory\n", - "\n", - "```{contents} Contents\n", - ":depth: 2\n", - "```\n", - "\n", - "## Overview\n", - "\n", - "In this lecture we will introduce the basic concepts of tensor network theory. We will start\n", - "with a brief overview of the history of tensor networks and their relevance to modern\n", - "physics. We will then introduce the graphical notation that is often used to simplify\n", - "expressions, and discuss the relevant operations and decompositions along with their\n", - "computation complexity and their relevance to quantum many-body physics.\n", - "\n", - "This discussion is largely based on {cite}`bridgeman2017handwaving`.\n", - "\n", - "This lecture also serves as a brief introduction to\n", - "[TensorOperations.jl](https://github.com/Jutho/TensorOperations.jl), and showcases some more\n", - "features of [TensorKit.jl](https://github.com/Jutho/TensorKit.jl) as well. Note that\n", - "TensorKit already re-exports the `@tensor` macro from TensorOperations, so it is not\n", - "necessary to import it separately if TensorKit is already loaded." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "59007635", - "metadata": {}, - "outputs": [], - "source": [ - "using TensorKit\n", - "using Test # for showcase testing" - ] - }, - { - "cell_type": "markdown", - "id": "e6ed2fd5", - "metadata": {}, - "source": [ - "### History\n", - "\n", - "The history of tensor networks is a fascinating journey through the evolution of profound\n", - "theoretical ideas and evolutions, as well as the development of computational methods and\n", - "tools. These ideas have been developed in a variety of contexts, but have been especially\n", - "relevant to the study of quantum physics and machine learning.\n", - "\n", - "1. Early Foundations:\n", - " * The roots of tensor networks can be traced back to the early development of linear algebra and matrix notation in the 19th century, pioneered by mathematicians like Arthur Cayley and James Sylvester.\n", - " * The concept of tensors as multi-dimensional arrays of numbers began to emerge in the late 19th and early 20th centuries.\n", - "2. Matrix Product States and DMRG:\n", - " * The birth of modern tensor network theory can be attributed to the introduction of MPS in the 1960s (?).\n", - " * One of the earliest, and still most widely used tensor network algorithm is DMRG. It was developed by Steven White in 1992, and provides one of the most efficient methods for simulating one-dimensional quantum many-body systems.\n", - "3. Quantum Information Theory:\n", - " * In the 1980s and 1990s, the field of quantum information theory began to emerge, driven by (add names here)\n", - " * Concepts such as quantum entanglement and quantum information became central to the study of quantum many-body systems.\n", - "4. Higher-Dimensional Tensor Networks:\n", - " * As the field progressed, tensor network methods were extended to higher-dimensional systems, leading to the emergence of more general tensor network states (TNS)..\n", - " * Two-dimensional tensor networks such as Projected Entangled Pair States (PEPS) and Multi-scale Entanglement Renormalization Ansatz (MERA) were introduced in the early 2000s.\n", - "5. Tensor Networks in other disciplines:\n", - " * Many of the concepts and methods developed in the context of tensor networks have been applied to other disciplines, one of the most prominent being machine learning.\n", - " * Unsuprisingly, they also play a central role in quantum computing, where tensor network algorithms provide a natural language to explore quantum circuit simulations.\n", - "6. Ongoing Research and Applications\n", - " * Tensor network theory continues to be a vibrant and evolving field with ongoing research in various directions, such as the development of efficient tensor contraction algorithms, the application of tensor networks for understanding quantum phases of matter, the development of tensor network algorithms for quantum computing, and the application of tensor networks to machine learning.\n", - "\n", - "## Graphical Notation and Tensor Operations\n", - "\n", - "One of the main advantages of tensor networks is that they admit a very intuitive graphical\n", - "notation, which greatly simplifies the expressions involving numerous indices. This notation\n", - "is based on the idea of representing a single tensor as a node in a graph, where the indices\n", - "of the tensor are depicted by legs sticking out of it, one for each vector space. As an\n", - "example, a rank-four tensor $R$ can be represented as:\n", - "\n", - "```{image} /_static/TensorNetworks/R-tensor.svg\n", - ":scale: 12%\n", - ":name: R-tensor\n", - ":align: center\n", - "```\n", - "\n", - "### Indexing\n", - "\n", - "In this notation, the individual components of the tensor can be recoverd by fixing the open\n", - "legs of a diagram to some value, and the resulting diagram is then a scalar. For example,\n", - "the component $R_{i_1,i_2,i_3,i_4}$ is given by:\n", - "\n", - "```{image} /_static/TensorNetworks/indexing.svg\n", - ":scale: 12%\n", - ":name: indexing\n", - ":align: center\n", - "```\n", - "\n", - "### Grouping and Splitting of Indices\n", - "\n", - "Because of the isomorphism {eq}`eq:tensor_isomorphism`, the legs of the tensor can be freely\n", - "moved around, as long as their order is preserved. In some contexts the shape of\n", - "the node and the direction of the tensor can imply certain properties, such as making an\n", - "explicit distinction between the isomorphic representations, but in what follows we will not\n", - "make this distinction.\n", - "\n", - "Furthermore, this naturally gives a notion of grouping and splitting of indices, which is\n", - "just a reinterpretation of a set of neighbouring vector spaces as a single vector space, and\n", - "the inverse operation. For example, the following diagrams are equivalent:\n", - "\n", - "```{image} /_static/TensorNetworks/grouping.svg\n", - ":scale: 12%\n", - ":name: grouping\n", - ":align: center\n", - "```\n", - "\n", - "Owing to the freedom in choice of basis, the precise details of grouping and splitting are\n", - "not unique. One specific choice of convention is the tensor product basis, which is\n", - "precisely the one we have used in the discussion of multi-linear algebra. More concretely,\n", - "one choice that is often used is the _Kronecker product_, which in the setting of\n", - "column-major ordering is given explicitly by grouping indices as follows:\n", - "\n", - "```{math}\n", - ":label: eq:kronecker_product\n", - "I := i_1 + d_1 * (i_2 - 1) + d_1 * d_2 * (i_3 - 1) + d_1 * d_2 * d_3 * (i_4 - 1) + \\cdots\n", - "```\n", - "\n", - "Here $d_i$ is the dimension of the corresponding vector space, and $I$ is the resulting\n", - "linear index. Note again that so long as the chosen convention is consistent, the precise\n", - "method of grouping and splitting is immaterial.\n", - "\n", - "This can be conveniently illustrated by the `reshape` function in Julia, which performs\n", - "exactly this operation. For simple arrays, this operation does nothing but change the size\n", - "property of the data structure, as the underlying data necessarily needs to be stored in a\n", - "linear order in memory, as computer adresses are linear. Because of this, in tensor\n", - "networks, these operations are typically left implicit." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "704422d7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2×4×2 reshape(::UnitRange{Int64}, 2, 4, 2) with eltype Int64:\n", - "[:, :, 1] =\n", - " 1 3 5 7\n", - " 2 4 6 8\n", - "\n", - "[:, :, 2] =\n", - " 9 11 13 15\n", - " 10 12 14 16" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = reshape(1:(2^4), (2, 2, 2, 2))\n", - "B = reshape(A, (4, 2, 2))\n", - "C = reshape(A, (2, 4, 2))\n", - "# ..." - ] - }, - { - "cell_type": "markdown", - "id": "aba84797", - "metadata": {}, - "source": [ - "### Outer Products\n", - "\n", - "Of course, in order to really consider a tensor *network*, it is necessary to consider\n", - "diagrams that consist of multiple tensors, or in other words of multiple nodes. The simplest\n", - "such diagram represents the _outer product_ of two tensors. This is represented by two\n", - "tensors being placed next to each other. The value of the resulting network is simply the\n", - "product of the constituents. For example, the outer product of a rank three tensor $A$ and a\n", - "rank two tensor $B$ is given by:\n", - "\n", - "```{image} /_static/TensorNetworks/outer-product.svg\n", - ":scale: 12%\n", - ":name: outer-product\n", - ":align: center\n", - "```\n", - "\n", - "### Traces\n", - "\n", - "More complicated diagrams can be constructed by joining some of the legs of the constituent\n", - "tensors. In a matter similar to the conventional Einstein notation, this implies a summation\n", - "over the corresponding indices.\n", - "\n", - "If two legs from a single tensor are joined, this signifies a (partial) _trace_ of a tensor\n", - "over these indices. For example, the trace of a rank three tensor $A$ over two of its\n", - "indices is given by:\n", - "\n", - "```{image} /_static/TensorNetworks/trace.svg\n", - ":scale: 12%\n", - ":name: trace\n", - ":align: center\n", - "```\n", - "\n", - "In this notation, the cyclic property of the trace follows by sliding one of the matrices\n", - "around the loop of the diagram. As this only changes the placement of the tensors in the\n", - "network, and not the value, the graphic proof of $\\text{Tr}(AB) = \\text{Tr}(BA)$ is found.\n", - "\n", - "```{image} /_static/TensorNetworks/trace-cyclic.svg\n", - ":scale: 12%\n", - ":name: trace-cyclic\n", - ":align: center\n", - "```\n", - "\n", - "### Contractions\n", - "\n", - "The most common tensor operation used is _contraction_, which is the joining of legs from\n", - "different tensors. This can equivalently be thought of as a tensor product followed by a\n", - "trace. For example, the contraction between two pairs of indices of two rank-three tensors\n", - "is drawn as:\n", - "\n", - "```{image} /_static/TensorNetworks/contraction.svg\n", - ":scale: 12%\n", - ":name: contraction\n", - ":align: center\n", - "```\n", - "\n", - "Familiar examples of contraction are vector inner products, matrix-vector multiplication,\n", - "matrix-matrix multiplication, and matrix traces.\n", - "\n", - "* $\\langle \\vec{x}, \\vec{y} \\rangle = x_i y_i$\n", - " ```{image} /_static/TensorNetworks/vecvec.svg\n", - " :scale: 12%\n", - " :name: vecvec\n", - " :align: center\n", - " ```\n", - "* $A \\vec{x} = A_{ij} x_j$\n", - " ```{image} /_static/TensorNetworks/matvec.svg\n", - " :scale: 12%\n", - " :name: matvec\n", - " :align: center\n", - " ```\n", - "* $A B = A_{ij} B_{jk}$\n", - " ```{image} /_static/TensorNetworks/matmat.svg\n", - " :scale: 12%\n", - " :name: matmat\n", - " :align: center\n", - " ```\n", - "* $\\text{Tr}(A) = A_{ii}$\n", - " ```{image} /_static/TensorNetworks/tr.svg\n", - " :scale: 12%\n", - " :name: tr\n", - " :align: center\n", - " ```\n", - "\n", - "## Network Contractions\n", - "\n", - "Combining the operations defined above, it is possible to construct arbitrarily complicated\n", - "_tensor networks_, which can then be evaluated by a sequence of pair-wise operations. The\n", - "result then reduces to a tensor which has a rank equal to the number of open legs in the\n", - "network. For example, the following diagram represents a generic tensor network:\n", - "\n", - "```{image} /_static/TensorNetworks/network.svg\n", - ":scale: 12%\n", - ":name: network\n", - ":align: center\n", - "```\n", - "\n", - "### Notation\n", - "\n", - "In order to evaluate such networks, it is necessary to define a notational convention for\n", - "specifying a network with text. One of the most common conventions is that of\n", - "[Einstein notation](https://en.wikipedia.org/wiki/Einstein_notation), where each index of a\n", - "tensor is assigned a label, and repeated labels are implicitly summed over. For example, the outer product, trace, and inner product can respectively be obtained as:" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "be4de6b8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "((2, 2, 2, 2, 2), (2,), (2, 2, 2))" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = rand(2, 2, 2)\n", - "B = rand(2, 2)\n", - "@tensor C[i, j, k, l, m] := A[i, j, k] * B[l, m]\n", - "@tensor D[i] := A[i, j, j]\n", - "@tensor E[i, j, l] := A[i, j, k] * B[l, k]\n", - "size(C), size(D), size(E)" - ] - }, - { - "cell_type": "markdown", - "id": "3ed2c22b", - "metadata": {}, - "source": [ - "```{note}\n", - "The `@tensor` macro can be used to either create new tensors, using the `:=` assignment, or\n", - "to copy data into existing tensors using `=`. In the latter case, the tensor must already\n", - "exist and have the right dimensions, but less additional memory is allocated.\n", - "```\n", - "\n", - "This notation is very useful indeed, but quickly becomes unwieldy when one wishes to specify\n", - "in what order the pairwise operations should be carried out. Thus, in the same spirit but\n", - "with a minor modification, the [NCON](https://arxiv.org/abs/1402.0939) notation was\n", - "introduced. In this notation, the indices of a tensor are assigned integers, and pairwise\n", - "operations happen in increasing order. Similarly, negative integers are assigned to open\n", - "legs, which determine their resulting position. For example, the [diagram above](network)\n", - "can be written as:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "b5829e37", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2×2 Matrix{Float64}:\n", - " 2.66961 2.70201\n", - " 2.73193 2.83059" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "B = rand(2, 2, 2, 2)\n", - "C = rand(2, 2, 2, 2, 2)\n", - "D = rand(2, 2, 2)\n", - "E = rand(2, 2)\n", - "F = rand(2, 2)\n", - "@tensor begin\n", - " A[-1, -2] := B[-1, 1, 2, 3] * C[3, 5, 6, 7, -2] * D[2, 4, 5] * E[1, 4] * F[6, 7]\n", - "end" - ] - }, - { - "cell_type": "markdown", - "id": "998effc5", - "metadata": {}, - "source": [ - "(contraction_order)=\n", - "### Contraction Order and Complexity\n", - "\n", - "While tensor networks are defined in such a way that their values are independent of the\n", - "order of pairwise operations, the computational complexity of evaluating a network can vary\n", - "wildly based on the chosen order. Even for simple matrix-matrix-vector multiplication, the\n", - "problem can easily be illustrated by considering the following two equivalent operations:\n", - "\n", - "```{math}\n", - "w = A * (B * v) = (A * B) * v\n", - "```\n", - "\n", - "If both $A$ and $B$ are square matrices of size $N \\times N$, and $v$ and $w$ are vectors of\n", - "length $N$, the first operation requires $2N^2$ floating point operations (flops), while the\n", - "second requires $N^3 + N^2$ flops. This is a substantial difference, and it is clear that\n", - "the first operation is to be preferred.\n", - "\n", - "More generally, the amount of flops required for contracting a pair of tensors can be\n", - "determined by considering the fact that the amount of elements to compute is equal to the\n", - "product of the dimensions of the open indices, and the amount of flops required to compute\n", - "each element is equal to the product of the dimensions of the contracted indices. Due to\n", - "this fact, it is typically the most efficient to _minimize the surface area of contraction_,\n", - "which boils down to the heuristic of minimizing the amount of legs that are cut, also known\n", - "as _bubbling_.\n", - "\n", - "Many networks admit both efficient and inefficient contraction orders, and often it is\n", - "infeasible to compute the optimal order. Take for example a ladder-shaped network, which is\n", - "of particular relevance in the context of Matrix Product States, we can highlight a few\n", - "possible contraction orders, for which we leave it as an exercise to determine the\n", - "computational complexity:\n", - "\n", - "```{image} /_static/TensorNetworks/ladder1.svg\n", - ":scale: 12%\n", - ":name: ladder1\n", - ":align: center\n", - "```\n", - "\n", - "```{image} /_static/TensorNetworks/ladder2.svg\n", - ":scale: 12%\n", - ":name: ladder2\n", - ":align: center\n", - "```\n", - "\n", - "Determining the optimal order however is a problem that is known to be NP-hard, and thus no\n", - "algorithm exists that can efficiently compute optimal orders for larger networks.\n", - "Nevertheless, efficient implementations allows finding optimal orders for networks of up to\n", - "30-40 tensors {cite}`pfeifer2014faster`, but other methods exist that can be used to\n", - "determine good (not necessarily optimal) contraction orders.\n", - "\n", - "TensorOperations comes with some built-in tools for facilitating this process, and in\n", - "particular the `opt` keyword can be used to enable the use of the algorithm from\n", - "{cite}`pfeifer2014faster`. Because this uses the Julia macro system, this can be done at\n", - "compilation time, and in other words only needs to be computed once." - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "4bbcdbb6", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2×2 Matrix{Float64}:\n", - " 2.66961 2.70201\n", - " 2.73193 2.83059" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "@tensor opt=true begin\n", - " A[i, j] := B[i, α, β, γ] * C[γ, ϵ, ζ, η, j] * D[β, δ, ϵ] * E[α, δ] * F[ζ, η]\n", - "end" - ] - }, - { - "cell_type": "markdown", - "id": "3f8bc2fb", - "metadata": {}, - "source": [ - "(factorizations)=\n", - "## Tensor Factorizations\n", - "\n", - "Linear maps admit various kinds of factorizations, which are instrumental in a variety of\n", - "applications. They can be used to generate orthogonal bases, to find low-rank\n", - "approximations, or to find eigenvalues and vectors. In the context of tensors, the\n", - "established theory for factorizations of matrices can be generalized by interpreting tensors\n", - "as linear maps, and then applying the same factorization to the corresponding matrix\n", - "partition of the constituent vector spaces in a codomain and domain, after which everything\n", - "carries over. Thus, the only additional information that is required is the specification of\n", - "this partition. In this section we will discuss the most common factorizations of tensors,\n", - "but the reasoning can be generalized to any factorization of linear maps." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "9ac5e12b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(ℂ^2 ⊗ ℂ^3)" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "S1 = ℂ^2 ⊗ ℂ^2 ⊗ ℂ^2\n", - "S2 = ℂ^2 ⊗ ℂ^3" - ] - }, - { - "cell_type": "markdown", - "id": "407bbb45", - "metadata": {}, - "source": [ - "### Eigenvalue Decomposition\n", - "\n", - "The [Eigen decomposition of a matrix](https://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix)\n", - "$A$ is a factorization of the form:\n", - "\n", - "```{math}\n", - "A = V \\Lambda V^{-1}\n", - "```\n", - "\n", - "where $V$ is a matrix of eigenvectors, and $\\Lambda$ is a diagonal matrix of eigenvalues. In\n", - "particular, the set of eigenvectors form a basis for all possible products $Ax$, which is\n", - "the same as the image of the corresponding matrix transformation. For normal matrices, these\n", - "eigenvectors can be made orthogonal and the resulting decomposition is also called the\n", - "_spectral decomposition_.\n", - "\n", - "The eigenvalue decomposition mostly finds it use in the context of linear equations of the\n", - "form:\n", - "\n", - "```{math}\n", - "Av = \\lambda v\n", - "```\n", - "\n", - "where $v$ is an eigenvector of $A$ with eigenvalue $\\lambda$.\n", - "\n", - "For tensors, the eigenvalue decomposition is defined similarly, and the equivalent equation\n", - "is diagrammatically represented as:\n", - "\n", - "```{image} /_static/TensorNetworks/eig.svg\n", - ":scale: 12%\n", - ":name: eig\n", - ":align: center\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "c1ffc976", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[32m\u001b[1mTest Passed\u001b[22m\u001b[39m" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = TensorMap(randn, ComplexF64, S1, S1) # codomain and domain equal for eigendecomposition\n", - "D, V = eig(A)\n", - "@test A * V ≈ V * D" - ] - }, - { - "cell_type": "markdown", - "id": "7be6ae6a", - "metadata": {}, - "source": [ - "### Singular Value Decomposition\n", - "\n", - "The\n", - "[Singular Value Decomposition](https://en.wikipedia.org/wiki/Singular_value_decomposition)\n", - "(SVD) can be seen as a generalization of the eigendecomposition of a square normal matrix to\n", - "any rectangular matrix $A$. Specifically, it is a factorization of the form\n", - "$A = U \\Sigma V^\\dagger$ where $U$ and $V$ are isometric matrices\n", - "($U^\\dagger U = V^\\dagger V = \\mathbb{1}$), and $\\Sigma$ is a diagonal matrix of singular\n", - "values. The SVD is typically used to find low-rank approximations for matrices, and it was\n", - "shown {cite}`eckart1936approximation` that the best rank-$k$ approximation is given by the\n", - "SVD, where $\\Sigma$ is truncated to the first (largest) $k$ singular values.\n", - "\n", - "Again, a tensorial version is defined by first grouping indices to form a matrix, and then\n", - "applying the SVD to that matrix.\n", - "\n", - "```{image} /_static/TensorNetworks/svd.svg\n", - ":scale: 12%\n", - ":name: svd\n", - ":align: center\n", - "```\n", - "\n", - "```{image} /_static/TensorNetworks/unitary.svg\n", - ":scale: 12%\n", - ":name: unitary\n", - ":align: center\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "7fd7f465", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[32m\u001b[1mTest Passed\u001b[22m\u001b[39m" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = TensorMap(randn, ComplexF64, S1, S2)\n", - "partition = ((1, 2), (3, 4, 5))\n", - "U, S, V = tsvd(A, partition...)\n", - "@test permute(A, partition) ≈ U * S * V\n", - "@test U' * U ≈ id(domain(U))\n", - "@test V * V' ≈ id(codomain(V))" - ] - }, - { - "cell_type": "markdown", - "id": "b065f47f", - "metadata": {}, - "source": [ - "### Polar decomposition\n", - "\n", - "The [polar decomposition](https://en.wikipedia.org/wiki/Polar_decomposition) of a square\n", - "matrix $A$ is a factorization of the form $A = UP$, where $U$ is a semi-unitary matrix and $P$ is\n", - "a positive semi-definite Hermitian matrix. It can be interpreted as decomposing a linear\n", - "transformation into a rotation/reflection $U$, combined with a scaling $P$. The polar\n", - "decomposition is unique for all matrices that are full rank.\n", - "\n", - "```{image} /_static/TensorNetworks/polar.svg\n", - ":scale: 12%\n", - ":name: polar\n", - ":align: center\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "8da09b26", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[32m\u001b[1mTest Passed\u001b[22m\u001b[39m" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = TensorMap(randn, ComplexF64, S1, S2)\n", - "partition = ((1, 2), (3, 4, 5))\n", - "Q, P = leftorth(A, partition...; alg=Polar())\n", - "@test permute(A, partition) ≈ Q * P\n", - "@test Q * Q' ≈ id(codomain(Q))\n", - "@test (Q * Q')^2 ≈ (Q * Q')" - ] - }, - { - "cell_type": "markdown", - "id": "a1a2759a", - "metadata": {}, - "source": [ - "### QR Decomposition\n", - "\n", - "The [QR decomposition](https://en.wikipedia.org/wiki/QR_decomposition) is a factorization of\n", - "the form $A = QR$, where $Q$ is an orthogonal matrix and $R$ is an upper triangular matrix.\n", - "It is typically used to solve linear equations of the form $Ax = b$, which admits a solution\n", - "of the form $x = R^{-1} Q^\\dagger b$. Here $R^{-1}$ is particularly easy to compute because\n", - "of the triangular structure (for example by Gaussian elimination). Additionally, for\n", - "overdetermined linear systems, the QR decomposition can be used to find the least-squares\n", - "solution.\n", - "\n", - "```{image} /_static/TensorNetworks/qr.svg\n", - ":scale: 12%\n", - ":name: qr\n", - ":align: center\n", - "```\n", - "\n", - "```{image} /_static/TensorNetworks/leftOrth.svg\n", - ":scale: 12%\n", - ":name: leftOrth\n", - ":align: center\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "ae35064f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[32m\u001b[1mTest Passed\u001b[22m\u001b[39m" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = TensorMap(randn, ComplexF64, S1, S2)\n", - "partition = ((1, 2), (3, 4, 5))\n", - "Q, R = leftorth(A, partition...; alg=QR())\n", - "@test permute(A, partition) ≈ Q * R\n", - "@test Q' * Q ≈ id(domain(Q))" - ] - }, - { - "cell_type": "markdown", - "id": "b5429792", - "metadata": {}, - "source": [ - "The QR decomposition is unique up to a diagonal matrix of phases, and can thus be made\n", - "unique by requiring that the diagonal elements of $R$ are positive. This variant is often\n", - "called QRpos. Additional variants exist that are flipped and/or transposed, such as the RQ,\n", - "QL, and LQ decompositions.\n", - "\n", - "```{note}\n", - "Often it is useful to make a distinction between factorizations that are _rank revealing_,\n", - "and factorizations that are not. A factorization is rank revealing if the rank of the matrix\n", - "can be determined from the factorization. For example, the SVD is rank revealing, while the\n", - "QR decomposition is not. However, the trade-off being that the SVD decomposition is\n", - "substantially more expensive, the QR decomposition is often preferred in practice.\n", - "```\n", - "\n", - "### Nullspaces\n", - "\n", - "Finally, the nullspace of a matrix $A$ is the set of vectors $x$ such that $Ax = 0$. This is\n", - "typically determined via the SVD, where the nullspace is given by the right singular vectors\n", - "corresponding to zero singular values." - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "51ead43a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[32m\u001b[1mTest Passed\u001b[22m\u001b[39m" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = TensorMap(randn, ComplexF64, S1, S2)\n", - "partition = ((1, 2, 3), (4, 5))\n", - "N = leftnull(A, partition...)\n", - "@test norm(N' * permute(A, partition)) ≈ 0 atol=1e-14\n", - "@test N' * N ≈ id(domain(N))" - ] - }, - { - "cell_type": "markdown", - "id": "a15416ff", - "metadata": {}, - "source": [ - "## Conclusion\n", - "\n", - "In this lecture we have introduced the basic concepts of tensor network theory. We have\n", - "defined tensors and the operations that are commonly performed, as well as the graphical\n", - "notation that is used to represent them. We have also discussed the computational complexity\n", - "of tensor networks, and the importance of finding efficient contraction orders. Finally, we\n", - "have discussed the most common tensor factorizations, and how they can be used." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 36, - 39, - 131, - 136, - 240, - 247, - 263, - 272, - 328, - 332, - 347, - 350, - 385, - 389, - 418, - 425, - 441, - 448, - 472, - 478, - 499, - 505 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.md b/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.md deleted file mode 100644 index 9f817210..00000000 --- a/pr-preview/pr-27/_sources/2-TensorNetworks/TensorNetworks.md +++ /dev/null @@ -1,513 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(tensor_networks)= -# Tensor Network Theory - -```{contents} Contents -:depth: 2 -``` - -## Overview - -In this lecture we will introduce the basic concepts of tensor network theory. We will start -with a brief overview of the history of tensor networks and their relevance to modern -physics. We will then introduce the graphical notation that is often used to simplify -expressions, and discuss the relevant operations and decompositions along with their -computation complexity and their relevance to quantum many-body physics. - -This discussion is largely based on {cite}`bridgeman2017handwaving`. - -This lecture also serves as a brief introduction to -[TensorOperations.jl](https://github.com/Jutho/TensorOperations.jl), and showcases some more -features of [TensorKit.jl](https://github.com/Jutho/TensorKit.jl) as well. Note that -TensorKit already re-exports the `@tensor` macro from TensorOperations, so it is not -necessary to import it separately if TensorKit is already loaded. - -```{code-cell} julia -using TensorKit -using Test # for showcase testing -``` - -### History - -The history of tensor networks is a fascinating journey through the evolution of profound -theoretical ideas and evolutions, as well as the development of computational methods and -tools. These ideas have been developed in a variety of contexts, but have been especially -relevant to the study of quantum physics and machine learning. - -1. Early Foundations: - * The roots of tensor networks can be traced back to the early development of linear algebra and matrix notation in the 19th century, pioneered by mathematicians like Arthur Cayley and James Sylvester. - * The concept of tensors as multi-dimensional arrays of numbers began to emerge in the late 19th and early 20th centuries. -2. Matrix Product States and DMRG: - * The birth of modern tensor network theory can be attributed to the introduction of MPS in the 1960s (?). - * One of the earliest, and still most widely used tensor network algorithm is DMRG. It was developed by Steven White in 1992, and provides one of the most efficient methods for simulating one-dimensional quantum many-body systems. -3. Quantum Information Theory: - * In the 1980s and 1990s, the field of quantum information theory began to emerge, driven by (add names here) - * Concepts such as quantum entanglement and quantum information became central to the study of quantum many-body systems. -4. Higher-Dimensional Tensor Networks: - * As the field progressed, tensor network methods were extended to higher-dimensional systems, leading to the emergence of more general tensor network states (TNS).. - * Two-dimensional tensor networks such as Projected Entangled Pair States (PEPS) and Multi-scale Entanglement Renormalization Ansatz (MERA) were introduced in the early 2000s. -5. Tensor Networks in other disciplines: - * Many of the concepts and methods developed in the context of tensor networks have been applied to other disciplines, one of the most prominent being machine learning. - * Unsuprisingly, they also play a central role in quantum computing, where tensor network algorithms provide a natural language to explore quantum circuit simulations. -6. Ongoing Research and Applications - * Tensor network theory continues to be a vibrant and evolving field with ongoing research in various directions, such as the development of efficient tensor contraction algorithms, the application of tensor networks for understanding quantum phases of matter, the development of tensor network algorithms for quantum computing, and the application of tensor networks to machine learning. - -## Graphical Notation and Tensor Operations - -One of the main advantages of tensor networks is that they admit a very intuitive graphical -notation, which greatly simplifies the expressions involving numerous indices. This notation -is based on the idea of representing a single tensor as a node in a graph, where the indices -of the tensor are depicted by legs sticking out of it, one for each vector space. As an -example, a rank-four tensor $R$ can be represented as: - -```{image} /_static/TensorNetworks/R-tensor.svg -:scale: 12% -:name: R-tensor -:align: center -``` - -### Indexing - -In this notation, the individual components of the tensor can be recoverd by fixing the open -legs of a diagram to some value, and the resulting diagram is then a scalar. For example, -the component $R_{i_1,i_2,i_3,i_4}$ is given by: - -```{image} /_static/TensorNetworks/indexing.svg -:scale: 12% -:name: indexing -:align: center -``` - -### Grouping and Splitting of Indices - -Because of the isomorphism {eq}`eq:tensor_isomorphism`, the legs of the tensor can be freely -moved around, as long as their order is preserved. In some contexts the shape of -the node and the direction of the tensor can imply certain properties, such as making an -explicit distinction between the isomorphic representations, but in what follows we will not -make this distinction. - -Furthermore, this naturally gives a notion of grouping and splitting of indices, which is -just a reinterpretation of a set of neighbouring vector spaces as a single vector space, and -the inverse operation. For example, the following diagrams are equivalent: - -```{image} /_static/TensorNetworks/grouping.svg -:scale: 12% -:name: grouping -:align: center -``` - -Owing to the freedom in choice of basis, the precise details of grouping and splitting are -not unique. One specific choice of convention is the tensor product basis, which is -precisely the one we have used in the discussion of multi-linear algebra. More concretely, -one choice that is often used is the _Kronecker product_, which in the setting of -column-major ordering is given explicitly by grouping indices as follows: - -```{math} -:label: eq:kronecker_product -I := i_1 + d_1 * (i_2 - 1) + d_1 * d_2 * (i_3 - 1) + d_1 * d_2 * d_3 * (i_4 - 1) + \cdots -``` - -Here $d_i$ is the dimension of the corresponding vector space, and $I$ is the resulting -linear index. Note again that so long as the chosen convention is consistent, the precise -method of grouping and splitting is immaterial. - -This can be conveniently illustrated by the `reshape` function in Julia, which performs -exactly this operation. For simple arrays, this operation does nothing but change the size -property of the data structure, as the underlying data necessarily needs to be stored in a -linear order in memory, as computer adresses are linear. Because of this, in tensor -networks, these operations are typically left implicit. - -```{code-cell} julia -A = reshape(1:(2^4), (2, 2, 2, 2)) -B = reshape(A, (4, 2, 2)) -C = reshape(A, (2, 4, 2)) -# ... -``` - -### Outer Products - -Of course, in order to really consider a tensor *network*, it is necessary to consider -diagrams that consist of multiple tensors, or in other words of multiple nodes. The simplest -such diagram represents the _outer product_ of two tensors. This is represented by two -tensors being placed next to each other. The value of the resulting network is simply the -product of the constituents. For example, the outer product of a rank three tensor $A$ and a -rank two tensor $B$ is given by: - -```{image} /_static/TensorNetworks/outer-product.svg -:scale: 12% -:name: outer-product -:align: center -``` - -### Traces - -More complicated diagrams can be constructed by joining some of the legs of the constituent -tensors. In a matter similar to the conventional Einstein notation, this implies a summation -over the corresponding indices. - -If two legs from a single tensor are joined, this signifies a (partial) _trace_ of a tensor -over these indices. For example, the trace of a rank three tensor $A$ over two of its -indices is given by: - -```{image} /_static/TensorNetworks/trace.svg -:scale: 12% -:name: trace -:align: center -``` - -In this notation, the cyclic property of the trace follows by sliding one of the matrices -around the loop of the diagram. As this only changes the placement of the tensors in the -network, and not the value, the graphic proof of $\text{Tr}(AB) = \text{Tr}(BA)$ is found. - -```{image} /_static/TensorNetworks/trace-cyclic.svg -:scale: 12% -:name: trace-cyclic -:align: center -``` - -### Contractions - -The most common tensor operation used is _contraction_, which is the joining of legs from -different tensors. This can equivalently be thought of as a tensor product followed by a -trace. For example, the contraction between two pairs of indices of two rank-three tensors -is drawn as: - -```{image} /_static/TensorNetworks/contraction.svg -:scale: 12% -:name: contraction -:align: center -``` - -Familiar examples of contraction are vector inner products, matrix-vector multiplication, -matrix-matrix multiplication, and matrix traces. - -* $\langle \vec{x}, \vec{y} \rangle = x_i y_i$ - ```{image} /_static/TensorNetworks/vecvec.svg - :scale: 12% - :name: vecvec - :align: center - ``` -* $A \vec{x} = A_{ij} x_j$ - ```{image} /_static/TensorNetworks/matvec.svg - :scale: 12% - :name: matvec - :align: center - ``` -* $A B = A_{ij} B_{jk}$ - ```{image} /_static/TensorNetworks/matmat.svg - :scale: 12% - :name: matmat - :align: center - ``` -* $\text{Tr}(A) = A_{ii}$ - ```{image} /_static/TensorNetworks/tr.svg - :scale: 12% - :name: tr - :align: center - ``` - -## Network Contractions - -Combining the operations defined above, it is possible to construct arbitrarily complicated -_tensor networks_, which can then be evaluated by a sequence of pair-wise operations. The -result then reduces to a tensor which has a rank equal to the number of open legs in the -network. For example, the following diagram represents a generic tensor network: - -```{image} /_static/TensorNetworks/network.svg -:scale: 12% -:name: network -:align: center -``` - -### Notation - -In order to evaluate such networks, it is necessary to define a notational convention for -specifying a network with text. One of the most common conventions is that of -[Einstein notation](https://en.wikipedia.org/wiki/Einstein_notation), where each index of a -tensor is assigned a label, and repeated labels are implicitly summed over. For example, the outer product, trace, and inner product can respectively be obtained as: - -```{code-cell} julia -A = rand(2, 2, 2) -B = rand(2, 2) -@tensor C[i, j, k, l, m] := A[i, j, k] * B[l, m] -@tensor D[i] := A[i, j, j] -@tensor E[i, j, l] := A[i, j, k] * B[l, k] -size(C), size(D), size(E) -``` - -```{note} -The `@tensor` macro can be used to either create new tensors, using the `:=` assignment, or -to copy data into existing tensors using `=`. In the latter case, the tensor must already -exist and have the right dimensions, but less additional memory is allocated. -``` - -This notation is very useful indeed, but quickly becomes unwieldy when one wishes to specify -in what order the pairwise operations should be carried out. Thus, in the same spirit but -with a minor modification, the [NCON](https://arxiv.org/abs/1402.0939) notation was -introduced. In this notation, the indices of a tensor are assigned integers, and pairwise -operations happen in increasing order. Similarly, negative integers are assigned to open -legs, which determine their resulting position. For example, the [diagram above](network) -can be written as: - -```{code-cell} julia -B = rand(2, 2, 2, 2) -C = rand(2, 2, 2, 2, 2) -D = rand(2, 2, 2) -E = rand(2, 2) -F = rand(2, 2) -@tensor begin - A[-1, -2] := B[-1, 1, 2, 3] * C[3, 5, 6, 7, -2] * D[2, 4, 5] * E[1, 4] * F[6, 7] -end -``` - -(contraction_order)= -### Contraction Order and Complexity - -While tensor networks are defined in such a way that their values are independent of the -order of pairwise operations, the computational complexity of evaluating a network can vary -wildly based on the chosen order. Even for simple matrix-matrix-vector multiplication, the -problem can easily be illustrated by considering the following two equivalent operations: - -```{math} -w = A * (B * v) = (A * B) * v -``` - -If both $A$ and $B$ are square matrices of size $N \times N$, and $v$ and $w$ are vectors of -length $N$, the first operation requires $2N^2$ floating point operations (flops), while the -second requires $N^3 + N^2$ flops. This is a substantial difference, and it is clear that -the first operation is to be preferred. - -More generally, the amount of flops required for contracting a pair of tensors can be -determined by considering the fact that the amount of elements to compute is equal to the -product of the dimensions of the open indices, and the amount of flops required to compute -each element is equal to the product of the dimensions of the contracted indices. Due to -this fact, it is typically the most efficient to _minimize the surface area of contraction_, -which boils down to the heuristic of minimizing the amount of legs that are cut, also known -as _bubbling_. - -Many networks admit both efficient and inefficient contraction orders, and often it is -infeasible to compute the optimal order. Take for example a ladder-shaped network, which is -of particular relevance in the context of Matrix Product States, we can highlight a few -possible contraction orders, for which we leave it as an exercise to determine the -computational complexity: - -```{image} /_static/TensorNetworks/ladder1.svg -:scale: 12% -:name: ladder1 -:align: center -``` - -```{image} /_static/TensorNetworks/ladder2.svg -:scale: 12% -:name: ladder2 -:align: center -``` - -Determining the optimal order however is a problem that is known to be NP-hard, and thus no -algorithm exists that can efficiently compute optimal orders for larger networks. -Nevertheless, efficient implementations allows finding optimal orders for networks of up to -30-40 tensors {cite}`pfeifer2014faster`, but other methods exist that can be used to -determine good (not necessarily optimal) contraction orders. - -TensorOperations comes with some built-in tools for facilitating this process, and in -particular the `opt` keyword can be used to enable the use of the algorithm from -{cite}`pfeifer2014faster`. Because this uses the Julia macro system, this can be done at -compilation time, and in other words only needs to be computed once. - -```{code-cell} julia -@tensor opt=true begin - A[i, j] := B[i, α, β, γ] * C[γ, ϵ, ζ, η, j] * D[β, δ, ϵ] * E[α, δ] * F[ζ, η] -end -``` - -(factorizations)= -## Tensor Factorizations - -Linear maps admit various kinds of factorizations, which are instrumental in a variety of -applications. They can be used to generate orthogonal bases, to find low-rank -approximations, or to find eigenvalues and vectors. In the context of tensors, the -established theory for factorizations of matrices can be generalized by interpreting tensors -as linear maps, and then applying the same factorization to the corresponding matrix -partition of the constituent vector spaces in a codomain and domain, after which everything -carries over. Thus, the only additional information that is required is the specification of -this partition. In this section we will discuss the most common factorizations of tensors, -but the reasoning can be generalized to any factorization of linear maps. - -```{code-cell} julia -S1 = ℂ^2 ⊗ ℂ^2 ⊗ ℂ^2 -S2 = ℂ^2 ⊗ ℂ^3 -``` - -### Eigenvalue Decomposition - -The [Eigen decomposition of a matrix](https://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix) -$A$ is a factorization of the form: - -```{math} -A = V \Lambda V^{-1} -``` - -where $V$ is a matrix of eigenvectors, and $\Lambda$ is a diagonal matrix of eigenvalues. In -particular, the set of eigenvectors form a basis for all possible products $Ax$, which is -the same as the image of the corresponding matrix transformation. For normal matrices, these -eigenvectors can be made orthogonal and the resulting decomposition is also called the -_spectral decomposition_. - -The eigenvalue decomposition mostly finds it use in the context of linear equations of the -form: - -```{math} -Av = \lambda v -``` - -where $v$ is an eigenvector of $A$ with eigenvalue $\lambda$. - -For tensors, the eigenvalue decomposition is defined similarly, and the equivalent equation -is diagrammatically represented as: - -```{image} /_static/TensorNetworks/eig.svg -:scale: 12% -:name: eig -:align: center -``` - -```{code-cell} julia -A = TensorMap(randn, ComplexF64, S1, S1) # codomain and domain equal for eigendecomposition -D, V = eig(A) -@test A * V ≈ V * D -``` - -### Singular Value Decomposition - -The -[Singular Value Decomposition](https://en.wikipedia.org/wiki/Singular_value_decomposition) -(SVD) can be seen as a generalization of the eigendecomposition of a square normal matrix to -any rectangular matrix $A$. Specifically, it is a factorization of the form -$A = U \Sigma V^\dagger$ where $U$ and $V$ are isometric matrices -($U^\dagger U = V^\dagger V = \mathbb{1}$), and $\Sigma$ is a diagonal matrix of singular -values. The SVD is typically used to find low-rank approximations for matrices, and it was -shown {cite}`eckart1936approximation` that the best rank-$k$ approximation is given by the -SVD, where $\Sigma$ is truncated to the first (largest) $k$ singular values. - -Again, a tensorial version is defined by first grouping indices to form a matrix, and then -applying the SVD to that matrix. - -```{image} /_static/TensorNetworks/svd.svg -:scale: 12% -:name: svd -:align: center -``` - -```{image} /_static/TensorNetworks/unitary.svg -:scale: 12% -:name: unitary -:align: center -``` - -```{code-cell} julia -A = TensorMap(randn, ComplexF64, S1, S2) -partition = ((1, 2), (3, 4, 5)) -U, S, V = tsvd(A, partition...) -@test permute(A, partition) ≈ U * S * V -@test U' * U ≈ id(domain(U)) -@test V * V' ≈ id(codomain(V)) -``` - -### Polar decomposition - -The [polar decomposition](https://en.wikipedia.org/wiki/Polar_decomposition) of a square -matrix $A$ is a factorization of the form $A = UP$, where $U$ is a semi-unitary matrix and $P$ is -a positive semi-definite Hermitian matrix. It can be interpreted as decomposing a linear -transformation into a rotation/reflection $U$, combined with a scaling $P$. The polar -decomposition is unique for all matrices that are full rank. - -```{image} /_static/TensorNetworks/polar.svg -:scale: 12% -:name: polar -:align: center -``` - -```{code-cell} julia -A = TensorMap(randn, ComplexF64, S1, S2) -partition = ((1, 2), (3, 4, 5)) -Q, P = leftorth(A, partition...; alg=Polar()) -@test permute(A, partition) ≈ Q * P -@test Q * Q' ≈ id(codomain(Q)) -@test (Q * Q')^2 ≈ (Q * Q') -``` - -### QR Decomposition - -The [QR decomposition](https://en.wikipedia.org/wiki/QR_decomposition) is a factorization of -the form $A = QR$, where $Q$ is an orthogonal matrix and $R$ is an upper triangular matrix. -It is typically used to solve linear equations of the form $Ax = b$, which admits a solution -of the form $x = R^{-1} Q^\dagger b$. Here $R^{-1}$ is particularly easy to compute because -of the triangular structure (for example by Gaussian elimination). Additionally, for -overdetermined linear systems, the QR decomposition can be used to find the least-squares -solution. - -```{image} /_static/TensorNetworks/qr.svg -:scale: 12% -:name: qr -:align: center -``` - -```{image} /_static/TensorNetworks/leftOrth.svg -:scale: 12% -:name: leftOrth -:align: center -``` - -```{code-cell} julia -A = TensorMap(randn, ComplexF64, S1, S2) -partition = ((1, 2), (3, 4, 5)) -Q, R = leftorth(A, partition...; alg=QR()) -@test permute(A, partition) ≈ Q * R -@test Q' * Q ≈ id(domain(Q)) -``` - -The QR decomposition is unique up to a diagonal matrix of phases, and can thus be made -unique by requiring that the diagonal elements of $R$ are positive. This variant is often -called QRpos. Additional variants exist that are flipped and/or transposed, such as the RQ, -QL, and LQ decompositions. - -```{note} -Often it is useful to make a distinction between factorizations that are _rank revealing_, -and factorizations that are not. A factorization is rank revealing if the rank of the matrix -can be determined from the factorization. For example, the SVD is rank revealing, while the -QR decomposition is not. However, the trade-off being that the SVD decomposition is -substantially more expensive, the QR decomposition is often preferred in practice. -``` - -### Nullspaces - -Finally, the nullspace of a matrix $A$ is the set of vectors $x$ such that $Ax = 0$. This is -typically determined via the SVD, where the nullspace is given by the right singular vectors -corresponding to zero singular values. - -```{code-cell} julia -A = TensorMap(randn, ComplexF64, S1, S2) -partition = ((1, 2, 3), (4, 5)) -N = leftnull(A, partition...) -@test norm(N' * permute(A, partition)) ≈ 0 atol=1e-14 -@test N' * N ≈ id(domain(N)) -``` - -## Conclusion - -In this lecture we have introduced the basic concepts of tensor network theory. We have -defined tensors and the operations that are commonly performed, as well as the graphical -notation that is used to represent them. We have also discussed the computational complexity -of tensor networks, and the importance of finding efficient contraction orders. Finally, we -have discussed the most common tensor factorizations, and how they can be used. diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.ipynb b/pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.ipynb deleted file mode 100644 index c9b23b3a..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.ipynb +++ /dev/null @@ -1,218 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "6c91e714", - "metadata": {}, - "source": [ - "# A Simple Tensor Network Algorithm\n", - "\n", - "Having introduced tensor networks in general, with a focus on the case of MPS, we now turn\n", - "to the question of how to use them to solve specific problems. While a large number of\n", - "tensor network algorithms have been developed, many of them more advanced and/or efficient\n", - "than the ones we will discuss here, we will focus on a few simple algorithms that are easy\n", - "to understand and implement. Importantly, these algorithms are also the building blocks of\n", - "more advanced algorithms, for example in higher spatial dimensions.\n", - "\n", - "Effectively, we have already seen how to use MPS to compute expectation values or\n", - "correlation functions, or derive all kind of properties. Here, we focus on how to obtain the\n", - "desired MPS in the first place. In other words, given a certain problem, how can we optimize\n", - "an MPS, or a more general tensor network, to solve it?\n", - "\n", - "## Simulating Quantum Systems\n", - "\n", - "As a first example, let us consider the problem of simulating a quantum system. We can\n", - "formalize this idea as follows: Given a Hamiltonian $H$, and some initial state\n", - "$\\ket{\\psi_0}$ at time $t=0$, is there a way to compute the _time-evolved state_\n", - "$\\ket{\\psi(t)} = e^{-i H t} \\ket{\\psi_0}$ at some later time $t$.\n", - "\n", - "In general, this is a very hard problem. For example, one could naively try to\n", - "[compute the matrix exponential](https://en.wikipedia.org/wiki/Matrix_exponential#Computing_the_matrix_exponential),\n", - "but this quickly becomes prohibitively expensive, as the dimension of the Hamiltonian scales\n", - "exponentially with the number of particles. However, for physically relevant systems the\n", - "Hamiltonian does not consist of a random matrix, but rather exhibits additional structure\n", - "that can be used to simplify the problem.\n", - "\n", - "(tebd)=\n", - "## Time-Evolving Block Decimation (TEBD)\n", - "\n", - "A particularly powerful example can be found for systems with local interactions, where the\n", - "Hamiltonian is of the form:\n", - "\n", - "```{math}\n", - "H = \\sum_{i,j} h_{ij}\n", - "```\n", - "\n", - "where $h_{ij}$ denotes a local operator, acting only on a small number of sites. In this\n", - "case, although $e^{-i H t}$ is unfeasible to compute, each of the constituent terms act only\n", - "on a much smaller subsystem and therefore $e^{-ih_{ij}t}$ can be computed efficiently.\n", - "However, as these terms generally do not commute, we cannot simply apply them one after the\n", - "other. Instead, we can use the first-order Suzuki-Trotter decomposition to approximate the\n", - "time-evolution operator, which states that for any two Hermitian operators $A$ and $B$, and\n", - "any real number $\\Delta t$, we have:\n", - "\n", - "```{math}\n", - ":label: trotter_first\n", - "e^{(A + B) \\Delta t} = e^{A \\Delta t} e^{B \\Delta t} + \\mathcal O(\\Delta t^2).\n", - "```\n", - "\n", - "If we now split the full time interval $t$ into $m$ steps, we obtain the approximation\n", - "\n", - "```{math}\n", - "e^{-i H t} = \\left( e^{-i H_e \\frac{t}{m}} e^{-i H_o \\frac{t}{m}} \\right)^m + \\mathcal O\n", - "\\left( \\frac{t^2}{m}\\right)\n", - "```\n", - "\n", - "where the approximation error can be managed by choosing a sufficiently large $m$.\n", - "\n", - "```{note}\n", - "There actually exist entire families of such exponential product approximations up to a\n", - "given order {cite}`hatano2005finding`. For our purposes however, it is sufficient to\n", - "illustrate a simulation procedure using this first-order approximation.\n", - "```\n", - "\n", - "### Example: One-Dimensional Nearest-Neighbor Hamiltonians\n", - "\n", - "We can put the discussion above into practice by applying it to the example of a nearest-neighbour Hamiltonian on a one-dimensional lattice:\n", - "\n", - "```{math}\n", - "H = \\sum_{n=1}^N h_{n,n+1}\n", - "```\n", - "\n", - "where $N$ is the number of sites and we are assuming periodic boundary conditions. We now\n", - "want to simulate the dynamics of this Hamiltonian in an efficient way using the\n", - "aforementioned approximation Eq. {eq}`trotter_first`. The simplest way to do this is to\n", - "split the local terms into two groups, where terms within a group commute with each other,\n", - "but not with terms in the other group. For example, we could split the Hamiltonian into even\n", - "($H_e$) and odd terms ($H_o$):\n", - "\n", - "```{math} \n", - ":label: hamsplit\n", - "H_e = \\sum_n h_{(2n, 2n+1)}, \\qquad H_o = \\sum_n h_{(2n+1, 2n+2)}.\n", - "```\n", - "\n", - "It is a simple exercise to show that the local terms within a group commute, as they act on\n", - "non-overlapping sites. Therefore, if we can find a MPS representation of the initial state,\n", - "the procedure for simulating the time evolution is as follows:\n", - "\n", - "```{image} /_static/figures/alg/tebd_mps.svg\n", - ":scale: 10%\n", - ":name: tebd_mps\n", - ":align: center\n", - "```\n", - "\n", - "This procedure does not solve the problem as-is, as evaluating this network exactly would\n", - "still require a bond dimension which grows exponentially with the number of layers $m$.\n", - "Instead, we can retain an efficient description by locally truncating the bond dimension, by\n", - "computing an SVD an retaining only the largest $\\chi$ singular values.\n", - "\n", - "```{figure} /_static/figures/alg/tebd_trunc.svg\n", - ":scale: 10%\n", - ":name: tebd_trunc\n", - ":align: center\n", - "```\n", - "\n", - "## Groundstate Search\n", - "\n", - "Another important problem in quantum physics is the determination of the groundstate of a\n", - "given Hamiltonian. Again, this can be made more formal as follows: Given a Hamiltonian $H$,\n", - "is there a way to find the state $\\ket{\\psi_0}$ that minimizes the expectation value\n", - "$\\bra{\\psi} H \\ket{\\psi}$.\n", - "\n", - "In fact, this problem faces the same difficulty as the one discussed above, namely that the\n", - "naive solution strategy involves finding the eigenvector of the Hamiltonian matrix with the\n", - "smallest eigenvalue, which again scales exponentially with the number of particles. However,\n", - "as before, we can exploit the structure of the Hamiltonian to find a more efficient\n", - "solution.\n", - "\n", - "### Imaginary Time Evolution\n", - "\n", - "In fact, the problem of finding groundstates can be mapped to the problem of simulating\n", - "dynamics, by making use of a trick known as _imaginary time evolution_. The idea is to\n", - "consider the time evolution operator $e^{-i H t}$, but to replace the real time $t$ by an\n", - "imaginary time $\\tau = i t$. If we now consider the limit $\\tau \\to \\infty$ and deal with\n", - "the normalization appropriately, we can see that applying the evolution operator to a state\n", - "$\\ket{\\psi_0}$ will effectively project it on its lowest energy eigenstate, as all other\n", - "eigenstates will be damped out exponentially. In other words, we can find the groundstate of\n", - "a Hamiltonian by simulating its dynamics for a sufficiently long imaginary time.\n", - "\n", - "```{math}\n", - "\\lim_{\\tau \\to \\infty} e^{-i H \\tau} &= \\lim_{\\tau \\to \\infty} \\sum_{i=0}^\\infty e^{-E_i\n", - " \\tau} \\ket{\\psi_i} \\bra{\\psi_i} \\\\ \n", - "&= \\lim_{\\tau \\to \\infty} e^{- E_0 \\tau} \\left(\\ket{\\psi_0} \\bra{\\psi_0} + \n", - " \\sum_{i>0}^\\infty e^{(-E_i + E_0) \\tau}\\ket{\\psi_i}\\bra{\\psi_i} \\right) \\\\\n", - "&\\approx e^{-E_0 \\tau} \\ket{\\psi_0} \\bra{\\psi_0}\n", - "```\n", - "\n", - "where we have made use of the fact that all but the first term in the sum are damped out. In\n", - "this regard, the groundstate search problem can also be tackled with the TEBD algorithm\n", - "discussed above, by simply replacing the real time $t$ by an imaginary time $\\tau$ and\n", - "continuing time-evolution until convergence is reached.\n", - "\n", - "## Conclusion\n", - "\n", - "We have now seen a first example of algorithms that can be used for optimizing tensor\n", - "networks, either to simulate dynamics or to find groundstates. We conclude by mentioning\n", - "that this is only the tip of the iceberg, and that there exist many more algorithms that can\n", - "be used to solve a variety of problems.\n", - "\n", - "````{admonition} Outlook\n", - "To close out this lecture, we briefly comment on the higher dimensional generalizations of\n", - "the TEBD procedure and the difficulties this brings with it. For local quantum Hamiltonians\n", - "in higher dimensions we can follow a similar procedure, where we split the full Hamiltonian\n", - "into sum of parts that each only contain non-overlapping local terms. Time evolution can\n", - "then be simulated by applying a similar sequence of layers, where in each layer we evolve\n", - "with all local operators in a given Hamiltonian part in parallel.\n", - "\n", - "The problem with this approach however is that the local update step {ref}`tebd_trunc` is\n", - "ill-conditioned for higher-dimensional networks if the full quantum state is is not taken\n", - "into account for the truncation. Indeed, while in the one-dimensional case the rest of the\n", - "network surrounding the sites we want to update can be brought into account exactly by\n", - "working in appropriate gauge, this is not possible in general. Consider for example a\n", - "general network where want to apply some update to the central site,\n", - "```{image} /_static/figures/alg/tensor_network.svg\n", - ":scale: 6%\n", - ":name: tensor_network\n", - ":align: center\n", - "```\n", - "\n", - "Since this network contains loops, there is no way to exactly capture the surrounding\n", - "network in general. One instead has to resort to approximation techniques for the\n", - "*environments* of a given update site, where the quality of the environment approximations\n", - "directly affects the stability of the local update. The simplest way of doing this is to use\n", - "the so-called *simple update* procedure {cite}`jiang2008accurate` where all loops in the\n", - "network are simply ignored and the environment is approximated by a product state,\n", - "```{image} /_static/figures/alg/simple_update.svg\n", - ":scale: 6%\n", - ":name: simple_update\n", - ":align: center\n", - "```\n", - "\n", - "More accurate results can be obtained by taking into account the full quantum state of the\n", - "system in each local update by means of the *full update* procedure\n", - "{cite}`jordan2008classical`. However, this gain in accuracy comes with a substantial\n", - "increase in computational cost due to the full environment approximation at each step.\n", - "````" - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.md b/pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.md deleted file mode 100644 index 1e41e2ac..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/Algorithms.md +++ /dev/null @@ -1,200 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -# A Simple Tensor Network Algorithm - -Having introduced tensor networks in general, with a focus on the case of MPS, we now turn -to the question of how to use them to solve specific problems. While a large number of -tensor network algorithms have been developed, many of them more advanced and/or efficient -than the ones we will discuss here, we will focus on a few simple algorithms that are easy -to understand and implement. Importantly, these algorithms are also the building blocks of -more advanced algorithms, for example in higher spatial dimensions. - -Effectively, we have already seen how to use MPS to compute expectation values or -correlation functions, or derive all kind of properties. Here, we focus on how to obtain the -desired MPS in the first place. In other words, given a certain problem, how can we optimize -an MPS, or a more general tensor network, to solve it? - -## Simulating Quantum Systems - -As a first example, let us consider the problem of simulating a quantum system. We can -formalize this idea as follows: Given a Hamiltonian $H$, and some initial state -$\ket{\psi_0}$ at time $t=0$, is there a way to compute the _time-evolved state_ -$\ket{\psi(t)} = e^{-i H t} \ket{\psi_0}$ at some later time $t$. - -In general, this is a very hard problem. For example, one could naively try to -[compute the matrix exponential](https://en.wikipedia.org/wiki/Matrix_exponential#Computing_the_matrix_exponential), -but this quickly becomes prohibitively expensive, as the dimension of the Hamiltonian scales -exponentially with the number of particles. However, for physically relevant systems the -Hamiltonian does not consist of a random matrix, but rather exhibits additional structure -that can be used to simplify the problem. - -(tebd)= -## Time-Evolving Block Decimation (TEBD) - -A particularly powerful example can be found for systems with local interactions, where the -Hamiltonian is of the form: - -```{math} -H = \sum_{i,j} h_{ij} -``` - -where $h_{ij}$ denotes a local operator, acting only on a small number of sites. In this -case, although $e^{-i H t}$ is unfeasible to compute, each of the constituent terms act only -on a much smaller subsystem and therefore $e^{-ih_{ij}t}$ can be computed efficiently. -However, as these terms generally do not commute, we cannot simply apply them one after the -other. Instead, we can use the first-order Suzuki-Trotter decomposition to approximate the -time-evolution operator, which states that for any two Hermitian operators $A$ and $B$, and -any real number $\Delta t$, we have: - -```{math} -:label: trotter_first -e^{(A + B) \Delta t} = e^{A \Delta t} e^{B \Delta t} + \mathcal O(\Delta t^2). -``` - -If we now split the full time interval $t$ into $m$ steps, we obtain the approximation - -```{math} -e^{-i H t} = \left( e^{-i H_e \frac{t}{m}} e^{-i H_o \frac{t}{m}} \right)^m + \mathcal O -\left( \frac{t^2}{m}\right) -``` - -where the approximation error can be managed by choosing a sufficiently large $m$. - -```{note} -There actually exist entire families of such exponential product approximations up to a -given order {cite}`hatano2005finding`. For our purposes however, it is sufficient to -illustrate a simulation procedure using this first-order approximation. -``` - -### Example: One-Dimensional Nearest-Neighbor Hamiltonians - -We can put the discussion above into practice by applying it to the example of a nearest-neighbour Hamiltonian on a one-dimensional lattice: - -```{math} -H = \sum_{n=1}^N h_{n,n+1} -``` - -where $N$ is the number of sites and we are assuming periodic boundary conditions. We now -want to simulate the dynamics of this Hamiltonian in an efficient way using the -aforementioned approximation Eq. {eq}`trotter_first`. The simplest way to do this is to -split the local terms into two groups, where terms within a group commute with each other, -but not with terms in the other group. For example, we could split the Hamiltonian into even -($H_e$) and odd terms ($H_o$): - -```{math} -:label: hamsplit -H_e = \sum_n h_{(2n, 2n+1)}, \qquad H_o = \sum_n h_{(2n+1, 2n+2)}. -``` - -It is a simple exercise to show that the local terms within a group commute, as they act on -non-overlapping sites. Therefore, if we can find a MPS representation of the initial state, -the procedure for simulating the time evolution is as follows: - -```{image} /_static/figures/alg/tebd_mps.svg -:scale: 10% -:name: tebd_mps -:align: center -``` - -This procedure does not solve the problem as-is, as evaluating this network exactly would -still require a bond dimension which grows exponentially with the number of layers $m$. -Instead, we can retain an efficient description by locally truncating the bond dimension, by -computing an SVD an retaining only the largest $\chi$ singular values. - -```{figure} /_static/figures/alg/tebd_trunc.svg -:scale: 10% -:name: tebd_trunc -:align: center -``` - -## Groundstate Search - -Another important problem in quantum physics is the determination of the groundstate of a -given Hamiltonian. Again, this can be made more formal as follows: Given a Hamiltonian $H$, -is there a way to find the state $\ket{\psi_0}$ that minimizes the expectation value -$\bra{\psi} H \ket{\psi}$. - -In fact, this problem faces the same difficulty as the one discussed above, namely that the -naive solution strategy involves finding the eigenvector of the Hamiltonian matrix with the -smallest eigenvalue, which again scales exponentially with the number of particles. However, -as before, we can exploit the structure of the Hamiltonian to find a more efficient -solution. - -### Imaginary Time Evolution - -In fact, the problem of finding groundstates can be mapped to the problem of simulating -dynamics, by making use of a trick known as _imaginary time evolution_. The idea is to -consider the time evolution operator $e^{-i H t}$, but to replace the real time $t$ by an -imaginary time $\tau = i t$. If we now consider the limit $\tau \to \infty$ and deal with -the normalization appropriately, we can see that applying the evolution operator to a state -$\ket{\psi_0}$ will effectively project it on its lowest energy eigenstate, as all other -eigenstates will be damped out exponentially. In other words, we can find the groundstate of -a Hamiltonian by simulating its dynamics for a sufficiently long imaginary time. - -```{math} -\lim_{\tau \to \infty} e^{-i H \tau} &= \lim_{\tau \to \infty} \sum_{i=0}^\infty e^{-E_i - \tau} \ket{\psi_i} \bra{\psi_i} \\ -&= \lim_{\tau \to \infty} e^{- E_0 \tau} \left(\ket{\psi_0} \bra{\psi_0} + - \sum_{i>0}^\infty e^{(-E_i + E_0) \tau}\ket{\psi_i}\bra{\psi_i} \right) \\ -&\approx e^{-E_0 \tau} \ket{\psi_0} \bra{\psi_0} -``` - -where we have made use of the fact that all but the first term in the sum are damped out. In -this regard, the groundstate search problem can also be tackled with the TEBD algorithm -discussed above, by simply replacing the real time $t$ by an imaginary time $\tau$ and -continuing time-evolution until convergence is reached. - -## Conclusion - -We have now seen a first example of algorithms that can be used for optimizing tensor -networks, either to simulate dynamics or to find groundstates. We conclude by mentioning -that this is only the tip of the iceberg, and that there exist many more algorithms that can -be used to solve a variety of problems. - -````{admonition} Outlook -To close out this lecture, we briefly comment on the higher dimensional generalizations of -the TEBD procedure and the difficulties this brings with it. For local quantum Hamiltonians -in higher dimensions we can follow a similar procedure, where we split the full Hamiltonian -into sum of parts that each only contain non-overlapping local terms. Time evolution can -then be simulated by applying a similar sequence of layers, where in each layer we evolve -with all local operators in a given Hamiltonian part in parallel. - -The problem with this approach however is that the local update step {ref}`tebd_trunc` is -ill-conditioned for higher-dimensional networks if the full quantum state is is not taken -into account for the truncation. Indeed, while in the one-dimensional case the rest of the -network surrounding the sites we want to update can be brought into account exactly by -working in appropriate gauge, this is not possible in general. Consider for example a -general network where want to apply some update to the central site, -```{image} /_static/figures/alg/tensor_network.svg -:scale: 6% -:name: tensor_network -:align: center -``` - -Since this network contains loops, there is no way to exactly capture the surrounding -network in general. One instead has to resort to approximation techniques for the -*environments* of a given update site, where the quality of the environment approximations -directly affects the stability of the local update. The simplest way of doing this is to use -the so-called *simple update* procedure {cite}`jiang2008accurate` where all loops in the -network are simply ignored and the environment is approximated by a product state, -```{image} /_static/figures/alg/simple_update.svg -:scale: 6% -:name: simple_update -:align: center -``` - -More accurate results can be obtained by taking into account the full quantum state of the -system in each local update by means of the *full update* procedure -{cite}`jordan2008classical`. However, this gain in accuracy comes with a substantial -increase in computational cost due to the full environment approximation at each step. -```` \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.ipynb b/pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.ipynb deleted file mode 100644 index 7c1d35cc..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.ipynb +++ /dev/null @@ -1,604 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "a51eb8d4", - "metadata": {}, - "source": [ - "# Infinite Matrix Product States\n", - "\n", - "This section discusses matrix product states (MPS) in the thermodynamic limit and their\n", - "properties. Our discussion is mostly based on the excellent review\n", - "{cite}`vanderstraeten2019tangentspace`, which provides a thorough technical overview of\n", - "tangent-space methods for uniform MPS. The formal exposition is supplemented with some very\n", - "basic code examples on working with infinite MPS using\n", - "[MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) at the end of this section. For more\n", - "details on the numerical implementation of routines for uniform MPS we refer to the Julia\n", - "version of the [tutorials on uniform MPS](https://github.com/leburgel/uniformMpsTutorial),\n", - "which is again based on {cite}`vanderstraeten2019tangentspace`.\n", - "\n", - "```{contents} Contents\n", - ":depth: 3\n", - "```\n", - "\n", - "## Matrix Product States in the Thermodynamic Limit\n", - "\n", - "### Representation\n", - "\n", - "The finite MPS representation introduced in the previous previous section can be readily\n", - "extended to the thermodynamic limit by constructing a quantum state of an infinite spin system as a product of an infinite chain of tensors. For infinite systems which are invariant under translations, it is natural to also impose transation-invariance on the corresponding MPS. This leads to a *uniform* MPS which has the same tensor $A^{(i)} := A$ at every site, where $A$ again has a physical dimension $d$ and bond dimension $D$. In diagramatic notation, a uniform MPS can be represented as\n", - "\n", - "```{image} /_static/InfiniteMPS/umps.svg\n", - ":scale: 12%\n", - ":name: umps\n", - ":align: center\n", - "```\n", - "\n", - "````{note}\n", - "In some cases, instead of assuming an MPS has the same tensor at each site it is more\n", - "natural to use a state with a non-trivial repeating unit cell. A uniform MPS with a unit\n", - "cell of size three would for example correspond to the state\n", - "\n", - "```{image} /_static/InfiniteMPS/umps3.svg\n", - ":scale: 12%\n", - ":name: umps3\n", - ":align: center\n", - "```\n", - "\n", - "While we will restrict our discussion to MPS with a single-site unit cell, most concepts and\n", - "techniques apply just as well to the multi-site unit cell case.\n", - "````\n", - "\n", - "One of the central objects when working with MPS in the thermodynamic limit is the transfer operator or\n", - "*transfer matrix*, defined in our case as\n", - "\n", - "```{image} /_static/InfiniteMPS/tm.svg\n", - ":scale: 12%\n", - ":name: transfer_matrix\n", - ":align: center\n", - "```\n", - "\n", - "The transfer matrix corresponds to an operator acting on the space of $D\\times D$ matrices,\n", - "and can be interpreted as a 4-leg tensor $\\mathbb C^D \\otimes \\mathbb C^D \\leftarrow \\mathbb\n", - "C^D \\otimes \\mathbb C^D$. The transfer matrix can be shown to be a completely positive map,\n", - "such that its leading eigenvalue is a positive number. The eigenvalues of the transfer\n", - "matrix characterize the normalization and correlation length of a uniform MPS, while its\n", - "eigenvectors can be used to evaluate expectation values of local observables.\n", - "\n", - "\n", - "### Normalization\n", - "\n", - "The norm of a uniform MPS corresponds to a contraction of the form\n", - "\n", - "```{image} /_static/InfiniteMPS/mpsNorm.svg\n", - ":scale: 12%\n", - ":name: mps_norm\n", - ":align: center\n", - "```\n", - "\n", - "Clearly, this norm is nothing more than an infinite product of MPS transfer matrices defined\n", - "above. Consider the spectral decomposition of the $n$th power $\\mathbb E^n$,\n", - "\n", - "```{image} /_static/InfiniteMPS/tmPower.svg\n", - ":scale: 12%\n", - ":name: tm_decomp\n", - ":align: center\n", - "```\n", - "\n", - "where $l$ and $r$ are the left and right fixed points which correspond to the largest\n", - "magnitude eigenvalue $\\lambda_0$ of $\\mathbb E$,\n", - "\n", - "```{image} /_static/InfiniteMPS/fixedPoints.svg\n", - ":scale: 12%\n", - ":name: fixed_points\n", - ":align: center\n", - "```\n", - "\n", - "and the $\\lambda_i$ represent the remaining eigenvalues of smaller mangitude, where writing the spectral decomposition we have implicitly assumed that the fixed points are properly normalized as\n", - "\n", - "```{image} /_static/InfiniteMPS/traceNorm.svg\n", - ":scale: 12%\n", - ":name: trace_norm\n", - ":align: center\n", - "```\n", - "\n", - "Taking the\n", - "limit of this spectral decomposition, it follows that the infinite product of transfer matrices reduces\n", - "to a projector onto the fixed points corresponding to the leading eigenvalue $\\lambda_0$,\n", - "\n", - "```{image} /_static/InfiniteMPS/tmLimit.svg\n", - ":scale: 12%\n", - ":name: tm_power\n", - ":align: center\n", - "```\n", - "\n", - "To ensure a properly normalized state we should therefore rescale the leading eigenvalue\n", - "$\\lambda_0$ to one by rescaling the MPS tensor as $A \\leftarrow A / \\sqrt{\\lambda_0}$.\n", - "\n", - "With these properties in place, the norm of an MPS reduces to the overlap between the\n", - "boundary vectors and the fixed points. Since there is no effect of the boundary vectors on\n", - "the bulk properties of the MPS, we can always choose these such that MPS is properly\n", - "normalized as $ \\left \\langle \\psi(\\bar{A})\\middle | \\psi(A) \\right \\rangle = 1$.\n", - "\n", - "\n", - "### Expectation Values\n", - "\n", - "The fixed points of the transfer matrix can for example be used to compute expectation values of\n", - "operators. Suppose we wish to evaluate expectation values of an extensive operator,\n", - "\n", - "```{math}\n", - "O = \\frac{1}{\\mathbb{Z}} \\sum_{n \\in \\mathbb{Z}} O_n.\n", - "```\n", - "\n", - "If we assume that each $O_n$ acts on a single site and we are working with a properly\n", - "normalized MPS, translation invariance dictates that the expectation value of $O$ is given\n", - "by the contraction\n", - "\n", - "```{image} /_static/InfiniteMPS/expVal.svg\n", - ":scale: 12%\n", - ":name: exp_val\n", - ":align: center\n", - "```\n", - "\n", - "In the uniform gauge, we can use the fixed points of the transfer matrix to contract\n", - "everything to the left and to the right of the operator, such that we are left with the\n", - "contraction\n", - "\n", - "```{image} /_static/InfiniteMPS/expVal2.svg\n", - ":scale: 12%\n", - ":name: exp_val2\n", - ":align: center\n", - "```\n", - "\n", - "(imps_correlation)=\n", - "### Correlation Functions\n", - "\n", - "Correlation functions are computed similarly. Let us look at\n", - "\n", - "```{math}\n", - "c^{\\alpha\\beta}(m,n) = \\bra{\\psi(\\bar A)} (O^\\beta_m)^\\dagger O^\\alpha_n \\ket{\\psi(A)},\n", - "```\n", - "\n", - "where $m$ and $n$ are abritrary locations in the chain, and, because of translation\n", - "invariance, the correlation function only depends on the difference $m-n$. Again, we\n", - "contract everything to the left and right of the operators by inserting the fixed points $l$\n", - "and $r$, so that\n", - "\n", - "```{image} /_static/InfiniteMPS/corrFunc.svg\n", - ":scale: 12%\n", - ":name: corr_func\n", - ":align: center\n", - "```\n", - "\n", - "From this expression, we learn that it is the transfer matrix that determines the\n", - "correlations in the ground state. Indeed, if we again use the spectral decomposition of the\n", - "transfer matrix, recalling that now $\\lambda_0 = 1$, we can see that the correlation\n", - "function reduces to\n", - "\n", - "```{image} /_static/InfiniteMPS/corrFunc2.svg\n", - ":scale: 12%\n", - ":name: corr_func2\n", - ":align: center\n", - "```\n", - "\n", - "The first part is just the product of the expectation values of $O^\\alpha$ and $O^\\beta$,\n", - "called the disconnected part of the correlation function, and the rest is an exponentially\n", - "decaying part. This expression implies that connected correlation functions of an MPS\n", - "*always* decay exponentially, which is one of the reasons why MPS generally have a harder\n", - "time dealing with critical states. The correlation length $\\xi$ is determined by the second\n", - "largest eigenvalue of the transfer matrix $\\lambda_1$ as\n", - "\n", - "```{math}\n", - "\\xi = -\\frac{1}{\\log|\\lambda_\\mathrm{max}|}.\n", - "```\n", - "\n", - "```{note}\n", - "The subleading eigenvalues of the transfer matrix typically also have a physical meaning,\n", - "because they correspond to subleading correlations in the system. For example, by focussing\n", - "on eigenvalues in a specific symmetry sector one can target the correlations associated to\n", - "exitations corresponding to that particular symmetry. The subleading eigenvalues also play a\n", - "crucial role in the powerful technique of *finite entanglement scaling* for infinite MPS\n", - "{cite}`rams2018precise`. Using this framework we can accurately capture critical phenomena\n", - "using MPS, despite the ansatz inherently having exponentially decaying correlations.\n", - "```\n", - "\n", - "\n", - "## Gauging Revisited\n", - "\n", - "### Gauging in the Thermodynamic Limit\n", - "\n", - "\n", - "\n", - "While a given MPS tensor $A$ corresponds to a unique state $\\left | \\psi(A) \\right \\rangle$,\n", - "the converse is not true, as different tensors may give rise to the same state. This is\n", - "easily seen by noting that the gauge transform\n", - "\n", - "```{image} /_static/InfiniteMPS/gaugeTransform.svg\n", - ":scale: 12%\n", - ":name: gauge_transform\n", - ":align: center\n", - "```\n", - "\n", - "leaves the physical state invariant. We may use this freedom in parametrization to impose\n", - "canonical forms on the MPS tensor $A$.\n", - "\n", - "We start by considering the *left-orthonormal form* of an MPS, which is defined in terms of\n", - "a tensor $A_L$ that satisfies the condition\n", - "\n", - "```{image} /_static/InfiniteMPS/leftOrth.svg\n", - ":scale: 12%\n", - ":name: left_orthonormal\n", - ":align: center\n", - "```\n", - "\n", - "We can find the gauge transform $L$ that brings $A$ into this form\n", - "\n", - "```{image} /_static/InfiniteMPS/leftGauge.svg\n", - ":scale: 12%\n", - ":name: left_gauge\n", - ":align: center\n", - "```\n", - "\n", - "using an iterative procedure based on the QR docomposition, where starting from some initial\n", - "guess $L^0$ we repeatedly perform the QR-based update\n", - "\n", - "```{image} /_static/InfiniteMPS/qrStep.svg\n", - ":scale: 12%\n", - ":name: qr_step\n", - ":align: center\n", - "```\n", - "\n", - "This iterative procedure is bound to converge to a fixed point for which\n", - "$L^{(i+1)}=L^{(i)}=L$ and $A_L$ is left orthonormal by construction:\n", - "\n", - "```{image} /_static/InfiniteMPS/qrConv.svg\n", - ":scale: 12%\n", - ":name: qr_convergence\n", - ":align: center\n", - "```\n", - "\n", - "Note that this left gauge choice still leaves room for unitary gauge transformations\n", - "\n", - "```{image} /_static/InfiniteMPS/unitaryGauge.svg\n", - ":scale: 12%\n", - ":name: unitary_gauge\n", - ":align: center\n", - "```\n", - "\n", - "which can be used to bring the right fixed point $r$ into diagonal form. Similarly, we can\n", - "find the gauge transform that brings $A$ into *right-orthonormal form*\n", - "\n", - "```{image} /_static/InfiniteMPS/rightGauge.svg\n", - ":scale: 12%\n", - ":name: right_gauge\n", - ":align: center\n", - "```\n", - "\n", - "such that\n", - "\n", - "```{image} /_static/InfiniteMPS/rightOrth.svg\n", - ":scale: 12%\n", - ":name: right_orthonormal\n", - ":align: center\n", - "```\n", - "\n", - "and the left fixed point $l$ is diagonal. A right-orthonormal tensor $A_R$ and a matrix $R$\n", - "such that $A R = R A_R$ can be found using a similar iterative procedure.\n", - "\n", - "Finally, we can define a *mixed gauge* for the uniform MPS by choosing one site, the 'center\n", - "site', and bringing all tensors to the left of it in the left-orthonormal form and all the\n", - "tensors to the right of it in the right-orthonormal form. Defining a new tensor $A_C$ on the\n", - "center site, we obtain the form\n", - "\n", - "```{image} /_static/InfiniteMPS/mixedGauge.svg\n", - ":scale: 12%\n", - ":name: mixed_gauge\n", - ":align: center\n", - "```\n", - "\n", - "By contrast, the original representation using the same tensor at every site is commonly\n", - "referred to as the *uniform gauge*. The mixed gauge has an intuitive interpretation.\n", - "Defining $C = LR$, this tensor then implements the gauge transform that maps the\n", - "left-orthonormal tensor to the right-orthonormal one, thereby defining the center-site\n", - "tensor $A_C$:\n", - "\n", - "```{image} /_static/InfiniteMPS/mixedGauge2.svg\n", - ":scale: 12%\n", - ":name: mixed_gauge2\n", - ":align: center\n", - "```\n", - "\n", - "This relation is called the mixed gauge condition and allows us to freely move the center\n", - "tensor $A_C$ through the MPS, linking the left- and right orthonormal tensors.\n", - "\n", - "Finally we may bring $C$ into diagonal form by performing a singular value decomposition $C\n", - "= USV^\\dagger$ and absorbing $U$ and $V^\\dagger$ into the definition of $A_L$ and $A_R$\n", - "using the residual unitary gauge freedom\n", - "\n", - "```{image} /_static/InfiniteMPS/diagC.svg\n", - ":scale: 12%\n", - ":name: mixed_gauge3\n", - ":align: center\n", - "```\n", - "\n", - "````{note}\n", - "When working in the mixed gauge, the normalization of the MPS is entirely determined by that\n", - "of the center tensors $A_C$ and $C$. Indeed, it is easily seen that requiring that an MPS is\n", - "normalized now reduces to\n", - "```{image} /_static/InfiniteMPS/normAC.svg\n", - ":scale: 12%\n", - ":name: norm_mixed\n", - ":align: center\n", - "```\n", - "or alternatively to ${\\rm tr}(C^\\dagger C) = 1$.\n", - "````\n", - "\n", - "### Expectation Values Revisited\n", - "\n", - "In the mixed gauge, we can locate the center site where the operator is acting, and then\n", - "contract everything to the left and right to the identity to arrive at the particularly\n", - "simple expression for the expectation value\n", - "\n", - "```{image} /_static/InfiniteMPS/expVal3.svg\n", - ":scale: 12%\n", - ":name: exp_val3\n", - ":align: center\n", - "```\n", - "\n", - "### Entanglement Entropy\n", - "\n", - "The mixed canonical form with a diagonal $C$ now allows to straightforwardly write down a\n", - "Schmidt decomposition of the state across an arbitrary bond in the chain\n", - "\n", - "```{math}\n", - "\\left | \\psi(A) \\right \\rangle = \\sum_{i=1}^{D} C_i \\left | \\psi^i_L(A_L) \\right \\rangle \\otimes \\left | \\psi^i_R(A_R) \\right \\rangle,\n", - "```\n", - "\n", - "where the states $\\left | \\psi^i_L(A_L) \\right \\rangle$ and $\\left | \\psi^i_R(A_R) \\right\n", - "\\rangle$ are orthogonal states on half the lattice. The diagonal elements $C_i$ are exactly\n", - "the Schmidt coefficient of any bipartition of the MPS, and as such determine its bipartite\n", - "entanglement entropy\n", - "\n", - "```{math}\n", - "S = -\\sum_i C_i^2 \\log(C_i^2) .\n", - "```\n", - "\n", - "### Truncation\n", - "\n", - "The mixed canonical form also enables efficient truncatation of an MPS. The sum in the above\n", - "Schmidt decomposition can be truncated, giving rise to a new MPS that has a reduced bond\n", - "dimension for that bond. This truncation is optimal in the sense that the norm between the\n", - "original and the truncated MPS is maximized. To arrive at a translation invariant truncated\n", - "MPS, we can truncate the columns of the absorbed isometries $U$ and $V^\\dagger$\n", - "correspondingly, thereby transforming *every* tensor $A_L$ or $A_R$. The truncated MPS in\n", - "the mixed gauge is then given by\n", - "\n", - "```{image} /_static/InfiniteMPS/truncMPS.svg\n", - ":scale: 12%\n", - ":name: truncate_mps\n", - ":align: center\n", - "```\n", - "\n", - "We note that the resulting state based on this local truncation is not guaranteed to\n", - "correspond to the MPS with a lower bond dimension that is globally optimal. This would\n", - "require a variational optimization of the cost function.\n", - "\n", - "```{math}\n", - "\\left | \\left | ~\\left | \\psi(A) \\right \\rangle - \\left | \\psi(\\tilde{A}) \\right \\rangle ~\\right | \\right |^2.\n", - "```\n", - "\n", - "\n", - "### Code Example: `MPSKit.InfiniteMPS`\n", - "\n", - "The Julia package [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) provides many tools\n", - "for working with infinite MPS. Without going into much detail, we can already check some\n", - "aspects of our discussion above with this numerical implementation.\n", - "\n", - "We can construct an\n", - "[`MPSKit.InfiniteMPS`](https://maartenvd.github.io/MPSKit.jl/dev/lib/lib/#MPSKit.InfiniteMPS)\n", - "by specifying the physical and virtual vector spaces of the MPS. We will use standard\n", - "complex vector spaces as specified by a\n", - "[`TensorKit.ComplexSpace`](https://jutho.github.io/TensorKit.jl/latest/lib/spaces/#TensorKit.ComplexSpace),\n", - "and choose a physical dimension $d = 3$ and bond dimension $D = 5$." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "37f897be", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "single site InfiniteMPS:\n", - "│ ⋮\n", - "│ CR[1]: TensorMap(ℂ^5 ← ℂ^5)\n", - "├── AL[1]: TensorMap((ℂ^5 ⊗ ℂ^3) ← ℂ^5)\n", - "│ ⋮\n" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "using MPSKit, TensorKit\n", - "\n", - "d = 3 # physical dimension\n", - "D = 5 # bond dimension\n", - "mps = InfiniteMPS(ℂ^d, ℂ^D)" - ] - }, - { - "cell_type": "markdown", - "id": "34e32e54", - "metadata": {}, - "source": [ - "The infinite MPS is automatically stored in the mixed canonical form introduced above. For\n", - "example, we can check that its normalization is indeed characterized by the center gauge\n", - "tensors $A_C$ and $C$." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "05ee46be", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "norm(mps) = 0.9999999999999999\n", - "norm(mps.AC[1]) = 0.9999999999999999\n", - "norm(mps.CR[1]) = 1.0\n" - ] - } - ], - "source": [ - "using LinearAlgebra\n", - "\n", - "@show norm(mps)\n", - "@show norm(mps.AC[1])\n", - "@show norm(mps.CR[1]);" - ] - }, - { - "cell_type": "markdown", - "id": "565375ae", - "metadata": {}, - "source": [ - "We can also explicitly verify the mixed gauge conditions on $A_L$, $A_R$, $A_C$ and $C$ by\n", - "evaluating the corresponding tensor network diagrams using the\n", - "[`TensorOperations.@tensor` macro](https://jutho.github.io/TensorOperations.jl/stable/man/indexnotation/#The-@tensor-macro)." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "e7edc053", - "metadata": {}, - "outputs": [], - "source": [ - "using TensorOperations\n", - "\n", - "@tensor AL_id[-1; -2] := mps.AL[1][1 2; -2] * conj(mps.AL[1][1 2; -1])\n", - "@tensor AR_id[-1; -2] := mps.AR[1][-1 1; 2] * conj(mps.AR[1][-2 1; 2])\n", - "\n", - "@assert AL_id ≈ id(space(mps.AL[1], 3)') \"AL not in left-orthonormal form!\"\n", - "@assert AR_id ≈ id(space(mps.AR[1], 1)) \"Ar not in right-orthonormal form!\"\n", - "\n", - "@tensor LHS[-1 -2; -3] := mps.AL[1][-1 -2; 1] * mps.CR[1][1; -3]\n", - "@tensor RHS[-1 -2; -3] := mps.CR[1][-1; 1] * mps.AR[1][1 -2; -3]\n", - "\n", - "@assert LHS ≈ RHS && RHS ≈ mps.AC[1] \"Center gauge MPS tensor not consistent!\"" - ] - }, - { - "cell_type": "markdown", - "id": "0f240c3f", - "metadata": {}, - "source": [ - "We can also easily evaluate the expectation value of local operators" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "0bf06939", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1-element Vector{ComplexF64}:\n", - " 0.12559307141051923 + 0.10955622901083523im" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "O = TensorMap(randn, ℂ^d ← ℂ^d)\n", - "expectation_value(mps, O)" - ] - }, - { - "cell_type": "markdown", - "id": "fbe51024", - "metadata": {}, - "source": [ - "as well as compute the correlation length encoded in the MPS." - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "2e9e29e8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.40097713703530957" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "correlation_length(mps)" - ] - }, - { - "cell_type": "markdown", - "id": "283ebba1", - "metadata": {}, - "source": [ - "MPSKit.jl exports a variety of infinite MPS algorithms, some of which will be discussed in\n", - "the next section." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 409, - 415, - 421, - 427, - 433, - 446, - 450, - 453, - 457, - 459 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.md b/pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.md deleted file mode 100644 index a04f629e..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/InfiniteMPS.md +++ /dev/null @@ -1,462 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -# Infinite Matrix Product States - -This section discusses matrix product states (MPS) in the thermodynamic limit and their -properties. Our discussion is mostly based on the excellent review -{cite}`vanderstraeten2019tangentspace`, which provides a thorough technical overview of -tangent-space methods for uniform MPS. The formal exposition is supplemented with some very -basic code examples on working with infinite MPS using -[MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) at the end of this section. For more -details on the numerical implementation of routines for uniform MPS we refer to the Julia -version of the [tutorials on uniform MPS](https://github.com/leburgel/uniformMpsTutorial), -which is again based on {cite}`vanderstraeten2019tangentspace`. - -```{contents} Contents -:depth: 3 -``` - -## Matrix Product States in the Thermodynamic Limit - -### Representation - -The finite MPS representation introduced in the previous previous section can be readily -extended to the thermodynamic limit by constructing a quantum state of an infinite spin system as a product of an infinite chain of tensors. For infinite systems which are invariant under translations, it is natural to also impose transation-invariance on the corresponding MPS. This leads to a *uniform* MPS which has the same tensor $A^{(i)} := A$ at every site, where $A$ again has a physical dimension $d$ and bond dimension $D$. In diagramatic notation, a uniform MPS can be represented as - -```{image} /_static/InfiniteMPS/umps.svg -:scale: 12% -:name: umps -:align: center -``` - -````{note} -In some cases, instead of assuming an MPS has the same tensor at each site it is more -natural to use a state with a non-trivial repeating unit cell. A uniform MPS with a unit -cell of size three would for example correspond to the state - -```{image} /_static/InfiniteMPS/umps3.svg -:scale: 12% -:name: umps3 -:align: center -``` - -While we will restrict our discussion to MPS with a single-site unit cell, most concepts and -techniques apply just as well to the multi-site unit cell case. -```` - -One of the central objects when working with MPS in the thermodynamic limit is the transfer operator or -*transfer matrix*, defined in our case as - -```{image} /_static/InfiniteMPS/tm.svg -:scale: 12% -:name: transfer_matrix -:align: center -``` - -The transfer matrix corresponds to an operator acting on the space of $D\times D$ matrices, -and can be interpreted as a 4-leg tensor $\mathbb C^D \otimes \mathbb C^D \leftarrow \mathbb -C^D \otimes \mathbb C^D$. The transfer matrix can be shown to be a completely positive map, -such that its leading eigenvalue is a positive number. The eigenvalues of the transfer -matrix characterize the normalization and correlation length of a uniform MPS, while its -eigenvectors can be used to evaluate expectation values of local observables. - - -### Normalization - -The norm of a uniform MPS corresponds to a contraction of the form - -```{image} /_static/InfiniteMPS/mpsNorm.svg -:scale: 12% -:name: mps_norm -:align: center -``` - -Clearly, this norm is nothing more than an infinite product of MPS transfer matrices defined -above. Consider the spectral decomposition of the $n$th power $\mathbb E^n$, - -```{image} /_static/InfiniteMPS/tmPower.svg -:scale: 12% -:name: tm_decomp -:align: center -``` - -where $l$ and $r$ are the left and right fixed points which correspond to the largest -magnitude eigenvalue $\lambda_0$ of $\mathbb E$, - -```{image} /_static/InfiniteMPS/fixedPoints.svg -:scale: 12% -:name: fixed_points -:align: center -``` - -and the $\lambda_i$ represent the remaining eigenvalues of smaller mangitude, where writing the spectral decomposition we have implicitly assumed that the fixed points are properly normalized as - -```{image} /_static/InfiniteMPS/traceNorm.svg -:scale: 12% -:name: trace_norm -:align: center -``` - -Taking the -limit of this spectral decomposition, it follows that the infinite product of transfer matrices reduces -to a projector onto the fixed points corresponding to the leading eigenvalue $\lambda_0$, - -```{image} /_static/InfiniteMPS/tmLimit.svg -:scale: 12% -:name: tm_power -:align: center -``` - -To ensure a properly normalized state we should therefore rescale the leading eigenvalue -$\lambda_0$ to one by rescaling the MPS tensor as $A \leftarrow A / \sqrt{\lambda_0}$. - -With these properties in place, the norm of an MPS reduces to the overlap between the -boundary vectors and the fixed points. Since there is no effect of the boundary vectors on -the bulk properties of the MPS, we can always choose these such that MPS is properly -normalized as $ \left \langle \psi(\bar{A})\middle | \psi(A) \right \rangle = 1$. - - -### Expectation Values - -The fixed points of the transfer matrix can for example be used to compute expectation values of -operators. Suppose we wish to evaluate expectation values of an extensive operator, - -```{math} -O = \frac{1}{\mathbb{Z}} \sum_{n \in \mathbb{Z}} O_n. -``` - -If we assume that each $O_n$ acts on a single site and we are working with a properly -normalized MPS, translation invariance dictates that the expectation value of $O$ is given -by the contraction - -```{image} /_static/InfiniteMPS/expVal.svg -:scale: 12% -:name: exp_val -:align: center -``` - -In the uniform gauge, we can use the fixed points of the transfer matrix to contract -everything to the left and to the right of the operator, such that we are left with the -contraction - -```{image} /_static/InfiniteMPS/expVal2.svg -:scale: 12% -:name: exp_val2 -:align: center -``` - -(imps_correlation)= -### Correlation Functions - -Correlation functions are computed similarly. Let us look at - -```{math} -c^{\alpha\beta}(m,n) = \bra{\psi(\bar A)} (O^\beta_m)^\dagger O^\alpha_n \ket{\psi(A)}, -``` - -where $m$ and $n$ are abritrary locations in the chain, and, because of translation -invariance, the correlation function only depends on the difference $m-n$. Again, we -contract everything to the left and right of the operators by inserting the fixed points $l$ -and $r$, so that - -```{image} /_static/InfiniteMPS/corrFunc.svg -:scale: 12% -:name: corr_func -:align: center -``` - -From this expression, we learn that it is the transfer matrix that determines the -correlations in the ground state. Indeed, if we again use the spectral decomposition of the -transfer matrix, recalling that now $\lambda_0 = 1$, we can see that the correlation -function reduces to - -```{image} /_static/InfiniteMPS/corrFunc2.svg -:scale: 12% -:name: corr_func2 -:align: center -``` - -The first part is just the product of the expectation values of $O^\alpha$ and $O^\beta$, -called the disconnected part of the correlation function, and the rest is an exponentially -decaying part. This expression implies that connected correlation functions of an MPS -*always* decay exponentially, which is one of the reasons why MPS generally have a harder -time dealing with critical states. The correlation length $\xi$ is determined by the second -largest eigenvalue of the transfer matrix $\lambda_1$ as - -```{math} -\xi = -\frac{1}{\log|\lambda_\mathrm{max}|}. -``` - -```{note} -The subleading eigenvalues of the transfer matrix typically also have a physical meaning, -because they correspond to subleading correlations in the system. For example, by focussing -on eigenvalues in a specific symmetry sector one can target the correlations associated to -exitations corresponding to that particular symmetry. The subleading eigenvalues also play a -crucial role in the powerful technique of *finite entanglement scaling* for infinite MPS -{cite}`rams2018precise`. Using this framework we can accurately capture critical phenomena -using MPS, despite the ansatz inherently having exponentially decaying correlations. -``` - - -## Gauging Revisited - -### Gauging in the Thermodynamic Limit - - - -While a given MPS tensor $A$ corresponds to a unique state $\left | \psi(A) \right \rangle$, -the converse is not true, as different tensors may give rise to the same state. This is -easily seen by noting that the gauge transform - -```{image} /_static/InfiniteMPS/gaugeTransform.svg -:scale: 12% -:name: gauge_transform -:align: center -``` - -leaves the physical state invariant. We may use this freedom in parametrization to impose -canonical forms on the MPS tensor $A$. - -We start by considering the *left-orthonormal form* of an MPS, which is defined in terms of -a tensor $A_L$ that satisfies the condition - -```{image} /_static/InfiniteMPS/leftOrth.svg -:scale: 12% -:name: left_orthonormal -:align: center -``` - -We can find the gauge transform $L$ that brings $A$ into this form - -```{image} /_static/InfiniteMPS/leftGauge.svg -:scale: 12% -:name: left_gauge -:align: center -``` - -using an iterative procedure based on the QR docomposition, where starting from some initial -guess $L^0$ we repeatedly perform the QR-based update - -```{image} /_static/InfiniteMPS/qrStep.svg -:scale: 12% -:name: qr_step -:align: center -``` - -This iterative procedure is bound to converge to a fixed point for which -$L^{(i+1)}=L^{(i)}=L$ and $A_L$ is left orthonormal by construction: - -```{image} /_static/InfiniteMPS/qrConv.svg -:scale: 12% -:name: qr_convergence -:align: center -``` - -Note that this left gauge choice still leaves room for unitary gauge transformations - -```{image} /_static/InfiniteMPS/unitaryGauge.svg -:scale: 12% -:name: unitary_gauge -:align: center -``` - -which can be used to bring the right fixed point $r$ into diagonal form. Similarly, we can -find the gauge transform that brings $A$ into *right-orthonormal form* - -```{image} /_static/InfiniteMPS/rightGauge.svg -:scale: 12% -:name: right_gauge -:align: center -``` - -such that - -```{image} /_static/InfiniteMPS/rightOrth.svg -:scale: 12% -:name: right_orthonormal -:align: center -``` - -and the left fixed point $l$ is diagonal. A right-orthonormal tensor $A_R$ and a matrix $R$ -such that $A R = R A_R$ can be found using a similar iterative procedure. - -Finally, we can define a *mixed gauge* for the uniform MPS by choosing one site, the 'center -site', and bringing all tensors to the left of it in the left-orthonormal form and all the -tensors to the right of it in the right-orthonormal form. Defining a new tensor $A_C$ on the -center site, we obtain the form - -```{image} /_static/InfiniteMPS/mixedGauge.svg -:scale: 12% -:name: mixed_gauge -:align: center -``` - -By contrast, the original representation using the same tensor at every site is commonly -referred to as the *uniform gauge*. The mixed gauge has an intuitive interpretation. -Defining $C = LR$, this tensor then implements the gauge transform that maps the -left-orthonormal tensor to the right-orthonormal one, thereby defining the center-site -tensor $A_C$: - -```{image} /_static/InfiniteMPS/mixedGauge2.svg -:scale: 12% -:name: mixed_gauge2 -:align: center -``` - -This relation is called the mixed gauge condition and allows us to freely move the center -tensor $A_C$ through the MPS, linking the left- and right orthonormal tensors. - -Finally we may bring $C$ into diagonal form by performing a singular value decomposition $C -= USV^\dagger$ and absorbing $U$ and $V^\dagger$ into the definition of $A_L$ and $A_R$ -using the residual unitary gauge freedom - -```{image} /_static/InfiniteMPS/diagC.svg -:scale: 12% -:name: mixed_gauge3 -:align: center -``` - -````{note} -When working in the mixed gauge, the normalization of the MPS is entirely determined by that -of the center tensors $A_C$ and $C$. Indeed, it is easily seen that requiring that an MPS is -normalized now reduces to -```{image} /_static/InfiniteMPS/normAC.svg -:scale: 12% -:name: norm_mixed -:align: center -``` -or alternatively to ${\rm tr}(C^\dagger C) = 1$. -```` - -### Expectation Values Revisited - -In the mixed gauge, we can locate the center site where the operator is acting, and then -contract everything to the left and right to the identity to arrive at the particularly -simple expression for the expectation value - -```{image} /_static/InfiniteMPS/expVal3.svg -:scale: 12% -:name: exp_val3 -:align: center -``` - -### Entanglement Entropy - -The mixed canonical form with a diagonal $C$ now allows to straightforwardly write down a -Schmidt decomposition of the state across an arbitrary bond in the chain - -```{math} -\left | \psi(A) \right \rangle = \sum_{i=1}^{D} C_i \left | \psi^i_L(A_L) \right \rangle \otimes \left | \psi^i_R(A_R) \right \rangle, -``` - -where the states $\left | \psi^i_L(A_L) \right \rangle$ and $\left | \psi^i_R(A_R) \right -\rangle$ are orthogonal states on half the lattice. The diagonal elements $C_i$ are exactly -the Schmidt coefficient of any bipartition of the MPS, and as such determine its bipartite -entanglement entropy - -```{math} -S = -\sum_i C_i^2 \log(C_i^2) . -``` - -### Truncation - -The mixed canonical form also enables efficient truncatation of an MPS. The sum in the above -Schmidt decomposition can be truncated, giving rise to a new MPS that has a reduced bond -dimension for that bond. This truncation is optimal in the sense that the norm between the -original and the truncated MPS is maximized. To arrive at a translation invariant truncated -MPS, we can truncate the columns of the absorbed isometries $U$ and $V^\dagger$ -correspondingly, thereby transforming *every* tensor $A_L$ or $A_R$. The truncated MPS in -the mixed gauge is then given by - -```{image} /_static/InfiniteMPS/truncMPS.svg -:scale: 12% -:name: truncate_mps -:align: center -``` - -We note that the resulting state based on this local truncation is not guaranteed to -correspond to the MPS with a lower bond dimension that is globally optimal. This would -require a variational optimization of the cost function. - -```{math} -\left | \left | ~\left | \psi(A) \right \rangle - \left | \psi(\tilde{A}) \right \rangle ~\right | \right |^2. -``` - - -### Code Example: `MPSKit.InfiniteMPS` - -The Julia package [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) provides many tools -for working with infinite MPS. Without going into much detail, we can already check some -aspects of our discussion above with this numerical implementation. - -We can construct an -[`MPSKit.InfiniteMPS`](https://maartenvd.github.io/MPSKit.jl/dev/lib/lib/#MPSKit.InfiniteMPS) -by specifying the physical and virtual vector spaces of the MPS. We will use standard -complex vector spaces as specified by a -[`TensorKit.ComplexSpace`](https://jutho.github.io/TensorKit.jl/latest/lib/spaces/#TensorKit.ComplexSpace), -and choose a physical dimension $d = 3$ and bond dimension $D = 5$. - -```{code-cell} julia -using MPSKit, TensorKit - -d = 3 # physical dimension -D = 5 # bond dimension -mps = InfiniteMPS(ℂ^d, ℂ^D) -``` - -The infinite MPS is automatically stored in the mixed canonical form introduced above. For -example, we can check that its normalization is indeed characterized by the center gauge -tensors $A_C$ and $C$. - -```{code-cell} julia -using LinearAlgebra - -@show norm(mps) -@show norm(mps.AC[1]) -@show norm(mps.CR[1]); -``` - -We can also explicitly verify the mixed gauge conditions on $A_L$, $A_R$, $A_C$ and $C$ by -evaluating the corresponding tensor network diagrams using the -[`TensorOperations.@tensor` macro](https://jutho.github.io/TensorOperations.jl/stable/man/indexnotation/#The-@tensor-macro). - -```{code-cell} julia -using TensorOperations - -@tensor AL_id[-1; -2] := mps.AL[1][1 2; -2] * conj(mps.AL[1][1 2; -1]) -@tensor AR_id[-1; -2] := mps.AR[1][-1 1; 2] * conj(mps.AR[1][-2 1; 2]) - -@assert AL_id ≈ id(space(mps.AL[1], 3)') "AL not in left-orthonormal form!" -@assert AR_id ≈ id(space(mps.AR[1], 1)) "Ar not in right-orthonormal form!" - -@tensor LHS[-1 -2; -3] := mps.AL[1][-1 -2; 1] * mps.CR[1][1; -3] -@tensor RHS[-1 -2; -3] := mps.CR[1][-1; 1] * mps.AR[1][1 -2; -3] - -@assert LHS ≈ RHS && RHS ≈ mps.AC[1] "Center gauge MPS tensor not consistent!" -``` - -We can also easily evaluate the expectation value of local operators - -```{code-cell} julia -O = TensorMap(randn, ℂ^d ← ℂ^d) -expectation_value(mps, O) -``` - -as well as compute the correlation length encoded in the MPS. - -```{code-cell} julia -correlation_length(mps) -``` - -MPSKit.jl exports a variety of infinite MPS algorithms, some of which will be discussed in -the next section. diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.ipynb b/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.ipynb deleted file mode 100644 index 27dd6846..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.ipynb +++ /dev/null @@ -1,2799 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "06ca7f9a", - "metadata": {}, - "source": [ - "# Matrix Product Operators and Applications\n", - "\n", - "If Matrix Product States are a tensor network way of representing quantum states in one\n", - "dimension, we can similarly use tensor networks to represent the operators that act on\n", - "these states. Matrix Product Operators (MPOs) form a structured and convenient description\n", - "of such operators, that can capture most (if not all) relevant operators. Additionally, they\n", - "also form a natural way of representing the transfer matrix of a 2D statistical mechanical\n", - "system, and can even be used to study higher dimensional systems by mapping them to quasi-1D\n", - "systems. \n", - "\n", - "In this lecture, we will discuss the construction of MPOs, as well as showcase their use\n", - "through [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) and\n", - "[MPSKitModels.jl](https://github.com/maartenvd/MPSKitModels.jl)." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "d305a053", - "metadata": {}, - "outputs": [], - "source": [ - "using TensorKit\n", - "using MPSKit\n", - "using MPSKitModels" - ] - }, - { - "cell_type": "markdown", - "id": "91d2583a", - "metadata": {}, - "source": [ - "In general, an MPO is a chain of tensors, where each tensor has two physical indices and two\n", - "virtual indices:\n", - "\n", - "```{image} /_static/MPO/mpo.svg\n", - ":scale: 12%\n", - ":name: mpo\n", - ":align: center\n", - "```\n", - "\n", - "(statmech_mpo)=\n", - "## Statistical Mechanics in 2D\n", - "\n", - "Before discussing one-dimensional transfer matrices, let us first consider how partition\n", - "functions of two-dimensional classical many-body systems can be naturally represented as a\n", - "tensor network. To this end, consider the partition function of the\n", - "[classical Ising model](https://en.wikipedia.org/wiki/Ising_model),\n", - "\n", - "```{math}\n", - "\\mathcal Z = \\sum_{\\{s_i\\}} \\text{e}^{-\\beta H(\\{s_i\\})},\n", - "```\n", - "\n", - "where $s_i$ denotes a configuration of spins, and $H(\\{s_i\\})$ is the corresponding\n", - "energy, as determined by the Hamiltonian:\n", - "\n", - "```{math}\n", - "H(\\{s_i\\}) = -J \\sum_{\\langle i,j \\rangle} s_i s_j\n", - "```\n", - "\n", - "where the first sum is over nearest neighbors. \n", - "\n", - "### Partition Functions as Tensor Networks\n", - "\n", - "As the expression for the partition function is an exponential of a sum, we can also write\n", - "it as a product of exponentials, which can be reduced to the following network:\n", - "\n", - "```{image} /_static/MPO/partition_function_1.svg\n", - ":scale: 12%\n", - ":name: partfunc1\n", - ":align: center\n", - "```\n", - "\n", - "Here, the black dots at the vertices represent Kronecker $\\delta$-tensors,\n", - "\n", - "```{image} /_static/MPO/kronecker.svg\n", - ":scale: 12%\n", - ":name: kronecker\n", - ":align: center\n", - "```\n", - "\n", - "and the matrices $t$ encode the Boltzmann weights associated to each nearest-neighbor interaction,\n", - "\n", - "```{image} /_static/MPO/boltzmann.svg\n", - ":scale: 12%\n", - ":name: boltzmann\n", - ":align: center\n", - "```\n", - "\n", - "It is then simple, albeit somewhat involved to check that contracting this network gives\n", - "rise to the partition function, where the sum over all configurations is converted into the\n", - "summations in the contractions of the network. Finally, it is more common to absorb the edge\n", - "tensors into the vertex tensors by explicitly contracting them, such that the remaining\n", - "network consists of tensors at the vertices only:\n", - "\n", - "```{image} /_static/MPO/partition_function.svg\n", - ":scale: 12%\n", - ":name: partfunc\n", - ":align: center\n", - "```\n", - "\n", - "````{note}\n", - "Because there are two edges per vertex, an intuitive way of absorbing the edge tensors is to\n", - "absorb for example the left and bottom edge tensors into the vertex tensor. However, this\n", - "leads to a slightly asymmetric form, and more commonly the square root $q$ of the Boltzmann\n", - "matrices is taken, such that each vertex tensor absorbs such a factor from each of the\n", - "edges, resulting in a rotation-invariant form.\n", - "\n", - "```{image} /_static/MPO/boltzmann_mpo.svg\n", - ":scale: 12%\n", - ":name: boltzmann_mpo\n", - ":align: center\n", - "```\n", - "````\n", - "\n", - "In particular, the construction of the operator that makes up the MPO can be achieved in a\n", - "few lines of code, through the use of TensorKit:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "4fa787df", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):\n", - "[:, :, 1, 1] =\n", - " 7.321388457312336 + 0.0im 0.49999999999999895 + 0.0im\n", - " 0.49999999999999895 + 0.0im 0.06766764161830616 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.49999999999999906 + 0.0im 0.06766764161830614 + 0.0im\n", - " 0.06766764161830614 + 0.0im 0.49999999999999906 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.499999999999999 + 0.0im 0.06766764161830616 + 0.0im\n", - " 0.06766764161830616 + 0.0im 0.49999999999999906 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.06766764161830616 + 0.0im 0.499999999999999 + 0.0im\n", - " 0.499999999999999 + 0.0im 7.321388457312336 + 0.0im\n" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "β = 1.0\n", - "\n", - "# construct edge tensors\n", - "t = TensorMap(ComplexF64[exp(β) exp(-β); exp(-β) exp(β)], ℂ^2, ℂ^2)\n", - "q = sqrt(t)\n", - "\n", - "# construct vertex tensors\n", - "δ = TensorMap(zeros, ComplexF64, ℂ^2 ⊗ ℂ^2, ℂ^2 ⊗ ℂ^2)\n", - "δ[1, 1, 1, 1] = 1.0\n", - "δ[2, 2, 2, 2] = 1.0\n", - "\n", - "# absorb edge tensors\n", - "@tensor O[-1 -2; -3 -4] := δ[1 2; 3 4] * q[-1; 1] * q[-2; 2] * q[3; -3] * q[4; -4]" - ] - }, - { - "cell_type": "markdown", - "id": "4c3f7cc4", - "metadata": {}, - "source": [ - "### Transfer Matrices\n", - "\n", - "In order to then evaluate the partition function, we can use the\n", - "[Transfer-matrix method](https://en.wikipedia.org/wiki/Transfer-matrix_method), which is a\n", - "technique that splits the two-dimensional network into rows (or columns) of so-called\n", - "transfer matrices, which are already represented as MPOs. In fact, this method has even led\n", - "to the famous exact solution of the two-dimensional Ising model by Onsager.\n", - "{cite}`onsager1944crystal`.\n", - "\n", - "```{image} /_static/MPO/transfer.svg\n", - ":scale: 12%\n", - ":name: transfer\n", - ":align: center\n", - "```\n", - "\n", - "In the context of tensor networks, this technique is even useful beyond exactly solvable\n", - "cases, as efficient algorithms exist to determine the product of an MPO with an MPS in an\n", - "approximate manner. This allows us to efficiently split the computation of the partition\n", - "function in a sequence of one-dimensional contractions, thus reducing the complexity of the\n", - "problem by solving it layer by layer. \n", - "\n", - "### Thermodynamic Limit\n", - "\n", - "Importantly, this technique is not limited to finite systems, and in fact allows for the\n", - "computation of the partition function of systems directly in the thermodynamic limit,\n", - "alleviating the need to consider finite-size effects and extrapolation techniques. The key\n", - "insight that allows for this is that the partition function may be written as\n", - "\n", - "```{math}\n", - "\\mathcal Z = \\lim_{N \\to \\infty} \\mathrm{Tr} \\left( T^N \\right)\n", - "```\n", - "\n", - "where $T$ is the row-to-row transfer matrix, and $N$ is the number of rows (or columns) in\n", - "the network. If we then consider the spectral decomposition of the transfer matrix, we can\n", - "easily show that as the number of rows goes to infinity, the largest eigenvalue of the\n", - "transfer matrix dominates, and the partition function is given by\n", - "\n", - "```{math}\n", - "\\mathcal Z = \\lim_{N \\to \\infty} \\lambda_{\\mathrm{max}}^N \\braket{\\psi}{\\psi}\n", - "```\n", - "\n", - "where $\\lambda_{\\mathrm{max}}$ is the largest eigenvalue of the transfer matrix, and\n", - "$\\ket{\\psi}$ is the corresponding (MPS) eigenvector. In other words, the partition function\n", - "can be computed if it is possible to find the largest eigenvalue of the transfer matrix, for\n", - "which efficient algorithms exist.\n", - "\n", - "For example, one can resort to many types of _boundary MPS techniques_\n", - "{cite}`zauner-stauber2018variational`, which are a generic class of algorithms to\n", - "numerically solve these kinds of problems. In particular, they all rely on an efficient way\n", - "of finding an (approximate) solution to the following problem:\n", - "\n", - "```{image} /_static/MPO/boundary_mps.svg\n", - ":scale: 12%\n", - ":name: boundary_mps\n", - ":align: center\n", - "```\n", - "\n", - "### Expectation Values\n", - "\n", - "In order to compute relevant quantities for such systems, we can verify that the expectation\n", - "value of an operator $O$ is given by the weighing the value of that operator for a given\n", - "microstate, with the probability of that microstate:\n", - "\n", - "```{math}\n", - "\\langle O \\rangle = \\frac{1}{\\mathcal Z} \\sum_{\\{s_i\\}} O(\\{s_i\\})\\text{e}^{-\\beta\n", - "H(\\{s_i\\})}\n", - "```\n", - "\n", - "For a local operator $O_i$, this can again be written as a tensor network, where a single\n", - "Kronecker tensor at a vertex is replaced with a tensor measuring the operator, and then\n", - "absorbing the remaining edge tensors:\n", - "\n", - "```{image} /_static/MPO/expectation_value.svg\n", - ":scale: 12%\n", - ":name: expectation_value\n", - ":align: center\n", - "```\n", - "\n", - "For example, in the case of the magnetisation $O = \\sigma_z$, the tensor $M$ can be\n", - "explicitly constructed as follows:" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "4a029aa1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):\n", - "[:, :, 1, 1] =\n", - " 7.3210757428908035 + 0.0im 0.4953999296304103 + 0.0im\n", - " 0.4953999296304103 + 0.0im -1.0097568878600302e-17 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.4953999296304104 + 0.0im -3.8901691517473414e-18 + 0.0im\n", - " -3.8901691517473414e-18 + 0.0im -0.49539992963041035 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.49539992963041035 + 0.0im 3.993515140140208e-18 + 0.0im\n", - " 3.993515140140208e-18 + 0.0im -0.4953999296304104 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 3.993515140140208e-18 + 0.0im -0.4953999296304103 + 0.0im\n", - " -0.4953999296304103 + 0.0im -7.3210757428908035 + 0.0im\n" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Z = TensorMap(ComplexF64[1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2)\n", - "@tensor M[-1 -2; -3 -4] := δ[1 2; 3 4] * Z[4; 5] * q[-1; 1] * q[-2; 2] * q[3; -3] * q[5; -4]" - ] - }, - { - "cell_type": "markdown", - "id": "c404c5c3", - "metadata": {}, - "source": [ - "Using this network, the expectation value can be computed by first contracting the top and\n", - "bottom part, replacing them by their fixed-point MPS representations, and then contracting\n", - "the remaining MPS-MPO-MPS sandwich. This is achieved by similarly contracting the left and\n", - "right part, replacing them by their fixed-point tensors, which are commonly called the\n", - "_environments_ $G_L$ and $G_R$, respectively. The final resulting network is then just a\n", - "local network, which can be contracted efficiently.\n", - "\n", - "```{image} /_static/MPO/expectation_value2.svg\n", - ":scale: 12%\n", - ":name: expectation_value2\n", - ":align: center\n", - "```\n", - "\n", - "```{note}\n", - "This process of sequentally reducing the dimensionality of the network can even be further\n", - "extended, where 3D systems can be studied by first determining a 2D boundary PEPS, for which\n", - "a 1D boundary MPS can be determined, which admits 0D boundary tensors. This kind of\n", - "algorithms are commonly referred to as _boundary methods_.\n", - "```\n", - "\n", - "(hamiltonian_mpo)=\n", - "## Quantum Mechanics in 1+1D\n", - "\n", - "For quantum systems in one spatial dimension, the construction of MPOs boils down to the\n", - "ability to write a sum of local operators in MPO-form. The resulting operator has a very\n", - "specific structure, and is often referred to as a _Jordan block MPO_.\n", - "\n", - "### Jordan Block MPOs\n", - "\n", - "For example, if we consider the\n", - "[Transverse-field Ising model](https://en.wikipedia.org/wiki/Transverse-field_Ising_model),\n", - "\n", - "```{math}\n", - "H = -J \\sum X_j X_{j+1} - h \\sum Z_j\n", - "```\n", - "\n", - "it can be represented as an MPO through the (operator-valued) matrix, \n", - "\n", - "```{math}\n", - "W = \\begin{pmatrix}\n", - "1 & X & -hZ \\\\ \n", - "0 & 0 & -JX \\\\\n", - "0 & 0 & 1\n", - "\\end{pmatrix}\n", - "```\n", - "\n", - "along with the boundary vectors,\n", - "\n", - "```{math}\n", - "v_L = \\begin{pmatrix}\n", - "1 & 0 & 0\n", - "\\end{pmatrix}\n", - ", \\qquad \n", - "v_R = \\begin{pmatrix}\n", - "0 \\\\ 0 \\\\ 1\n", - "\\end{pmatrix}\n", - "```\n", - "\n", - "The Hamiltonian on $N$ sites is then given by the contraction\n", - "\n", - "```{math}\n", - "H = V_L W^{\\otimes N} V_R\n", - "```\n", - "\n", - "```{note}\n", - "While the above example can be constructed from building blocks that are strictly local\n", - "operators, this is not always the case, especially when symmetries are involved. In those\n", - "cases, the elements of the matrix $W$ have additional virtual legs that are contracted\n", - "between different sites.\n", - "```\n", - "\n", - "### Finite-State Machines\n", - "\n", - "An intuitive approach to construct such MPOs is to consider the sum of local\n", - "terms by virtue of a\n", - "[finite-state machine](https://en.wikipedia.org/wiki/Finite-state_machine). This is a\n", - "mathematical model of computation that consists of a finite set of states, and a set of\n", - "transitions between those states. In the context of MPOs, this is realised by associating\n", - "each _virtual level_ with a state, and each transition then corresponds to applying a local\n", - "operator. In that regard, the MPO is then a representation of the state of the finite-state\n", - "machine, and the matrix $W$ is the transition matrix of the machine.\n", - "\n", - "In general, the matrix $W$ can then be thought of as a block matrix with entries\n", - "\n", - "```{math}\n", - "\\begin{pmatrix}\n", - "1 & C & D \\\\\n", - "0 & A & B \\\\\n", - "0 & 0 & 1\n", - "\\end{pmatrix}\n", - "```\n", - "\n", - "which corresponds to the finite-state diagram:\n", - "\n", - "\n", - "\n", - "It can then be shown that this MPO generates all single-site local operators $D$, two-site\n", - "operators $CB$, three-site operators $CAB$, and so on. In other words, the MPO is a\n", - "representation of the sum of all local operators, and by carefully extending the structure\n", - "of the blocks $A$, $B$, $C$, and $D$, it is possible to construct MPOs that represent sums\n", - "of generic local terms, and even approximate long-range interactions by a sum of\n", - "exponentials.\n", - "\n", - "To gain a bit more understanding of this, we can use the following code to reconstruct the\n", - "total sum of local terms, starting from the Jordan MPO construction:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "81ea8083", - "metadata": {}, - "outputs": [ - { - "data": { - "text/latex": [ - "$$ \\begin{equation}\n", - "D_1 + D_2 + D_3 + D_4 + B_2 C_1 + B_3 C_2 + B_4 C_3 + A_2 B_3 C_1 + A_3 B_4 C_2 + A_2 A_3 B_4 C_1\n", - "\\end{equation}\n", - " $$" - ], - "text/plain": [ - "D[1] + D[2] + D[3] + D[4] + B[2]*C[1] + B[3]*C[2] + B[4]*C[3] + A[2]*B[3]*C[1] + A[3]*B[4]*C[2] + A[2]*A[3]*B[4]*C[1]" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "using Symbolics\n", - "\n", - "L = 4\n", - "# generate W matrices\n", - "@variables A[1:L] B[1:L] C[1:L] D[1:L]\n", - "Ws = map(1:L) do l\n", - " return [1 C[l] D[l]\n", - " 0 A[l] B[l]\n", - " 0 0 1]\n", - "end\n", - "\n", - "# generate boundary vectors\n", - "Vₗ = [1, 0, 0]'\n", - "Vᵣ = [0, 0, 1]\n", - "\n", - "# expand the MPO\n", - "expand(Vₗ * prod(Ws) * Vᵣ)" - ] - }, - { - "cell_type": "markdown", - "id": "52900a59", - "metadata": {}, - "source": [ - "### Expectation Values\n", - "\n", - "In order to compute expectation values of such MPOs, we can use the same technique as\n", - "before, and sandwich the MPO between two MPSs.\n", - "\n", - "\n", - "\n", - "However, care must be taken when the goal is to determine a local expectation value density,\n", - "as this is not necessarily well-defined. In fact, the MPO represents the sum of all local\n", - "terms, and sandwiching it will always lead to the total energy. In order to consistently\n", - "define local contributions, a choice must be made how to *distribute* this among the sites.\n", - "For example, even in the case of two-site local operators, it is unclear if this local\n", - "expectation value should be accredited to the left, or right site, or even split between\n", - "both sites. In the implementation of MPSKit, the chosen convention is to distribute the\n", - "expectation value evenly among its starting and ending point, in order to not overcount\n", - "contributions of long-range interactions.\n", - "\n", - "Typically this is achieved by renormalizing the environment tensors in a particular way,\n", - "such that then local expectation values can be obtained by either contracting the first row\n", - "of $W$ with the right regularized environment, or the last column of $W$ with the left\n", - "regularized environment. This respectively yields the expectation value of all terms\n", - "starting at that site, or all terms ending at that site.\n", - "\n", - "Again, it can prove instructive to write this out explicitly for some small examples to gain\n", - "some intuition. Doing this programatically, we get all terms starting at some site as\n", - "follows:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "d22eede2", - "metadata": {}, - "outputs": [ - { - "data": { - "text/latex": [ - "$$ \\begin{equation}\n", - "D_2 + B_3 C_2 + A_3 B_4 C_2\n", - "\\end{equation}\n", - " $$" - ], - "text/plain": [ - "D[2] + B[3]*C[2] + A[3]*B[4]*C[2]" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Ws_reg_right = Ws .- Ref([1 0 0; 0 0 0; 0 0 0])\n", - "expand(Vₗ * Ws_reg_right[end-2] * Ws_reg_right[end-1] * Ws_reg_right[end] * Vᵣ)" - ] - }, - { - "cell_type": "markdown", - "id": "be635b73", - "metadata": {}, - "source": [ - "and similarly all terms ending at some site as follows:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "3a6ddea9", - "metadata": {}, - "outputs": [ - { - "data": { - "text/latex": [ - "$$ \\begin{equation}\n", - "D_3 + B_3 C_2 + A_2 B_3 C_1\n", - "\\end{equation}\n", - " $$" - ], - "text/plain": [ - "D[3] + B[3]*C[2] + A[2]*B[3]*C[1]" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Ws_reg_left = Ws .- Ref([0 0 0; 0 0 0; 0 0 1])\n", - "expand(Vₗ * Ws_reg_left[1] * Ws_reg_left[2] * Ws_reg_left[3] * Vᵣ)" - ] - }, - { - "cell_type": "markdown", - "id": "d7851070", - "metadata": {}, - "source": [ - "### Jordan MPOs in the Thermodynamic Limit\n", - "\n", - "In the thermodynamic limit, the same MPO construction can be used to represent the infinite\n", - "sum of local terms. However, special care must be taken when considering expectation values,\n", - "as now only local expectation values are well-defined, and the total energy diverges with\n", - "the system size.\n", - "\n", - "This is achieved by considering the same regularization of the environment tensors, such\n", - "that the divergent parts are automatically removed. This construction can be found in more\n", - "detail in {cite}`hubig17generic`.\n", - "\n", - "### Quasi-1D Systems\n", - "\n", - "Finally, it is worth noting that the MPO construction can also be used to study\n", - "two-dimensional systems, by mapping them to quasi-one-dimensional systems. This is typically\n", - "achieved by imposing periodic boundary conditions in one of the spatial directions, and then\n", - "_snaking_ an MPS through the resulting lattice. In effect, this leads to a one-dimensional\n", - "model with longer-range interactions, which can then be studied using the standard MPS\n", - "techniques. However, the\n", - "[no free lunch theorem](https://en.wikipedia.org/wiki/No_free_lunch_theorem) applies here as\n", - "well, and the resulting model will typically require a bond dimension that grows\n", - "exponentially with the periodic system size, in order to achieve the area law of\n", - "entanglement in two-dimensional systems.\n", - "\n", - "\n", - "### MPSKitModels and the `@mpoham` Macro\n", - "\n", - "While the above construction of MPOs is quite general, it is also quite cumbersome to\n", - "manually construct, especially when dealing with complicated lattices or non-trivial unit\n", - "cells. To this end, the package\n", - "[MPSKitModels.jl](https://github.com/maartenvd/MPSKitModels.jl) offers a convenient way of\n", - "constructing these MPOs automatically, by virtue of the `@mpoham` macro. This macro allows\n", - "for the construction of MPOs by specifying the local operators that are present in the\n", - "Hamiltonian, and the lattice on which they act. For example, we can construct the MPO for\n", - "the Heisenberg models with nearest- or next-nearest-neighbor interactions as follows:" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "c1496c8e", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.6 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.6 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " -0.42426406871192834 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.42426406871192845 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -0.7071067811865476 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.7071067811865475 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "]])" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "J₁ = 1.2\n", - "SS = S_exchange() # predefined operator in MPSKitModels\n", - "\n", - "lattice = InfiniteChain(1)\n", - "H₁ = @mpoham begin\n", - " sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice))\n", - "end" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "e15c80f8", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.6 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.6 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " -0.42426406871192834 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.42426406871192845 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.6 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.6 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " -0.42426406871192834 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.42426406871192845 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -0.7071067811865476 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.7071067811865475 + 0.0im\n", - "; … ; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -0.7071067811865476 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.7071067811865475 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "]])" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "lattice = InfiniteCylinder(4)\n", - "H₂ = @mpoham begin\n", - " sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice))\n", - "end" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "681fe7c2", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.6 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.6 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " -0.42426406871192834 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.42426406871192845 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -0.7071067811865476 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.7071067811865475 + 0.0im\n", - "; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -0.7071067811865476 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.7071067811865475 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.4 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.4 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " -0.2828427124746189 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.282842712474619 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -0.7071067811865476 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.7071067811865475 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "], [TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; … ; TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^3 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " … TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "]])" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "J₂ = 0.8\n", - "lattice = InfiniteCylinder(4)\n", - "H₃ = @mpoham begin\n", - " sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice)) +\n", - " sum(J₂ * SS{i, j} for (i, j) in next_nearest_neighbours(lattice))\n", - "end" - ] - }, - { - "cell_type": "markdown", - "id": "fc983a7b", - "metadata": {}, - "source": [ - "## Conclusion\n", - "\n", - "In conclusion, Matrix Product Operators are a powerful tool to represent quantum operators\n", - "as well as transfer matrices. They allow for efficient and versatile expressions of\n", - "expectation values, and form the building block for many tensor network algorithms, both in\n", - "(1+1) or (2+0) dimensions, as well as in higher dimensions." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 27, - 31, - 119, - 133, - 216, - 219, - 327, - 345, - 374, - 377, - 381, - 384, - 423, - 434, - 442, - 450 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.md b/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.md deleted file mode 100644 index ac017544..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductOperators.md +++ /dev/null @@ -1,457 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -# Matrix Product Operators and Applications - -If Matrix Product States are a tensor network way of representing quantum states in one -dimension, we can similarly use tensor networks to represent the operators that act on -these states. Matrix Product Operators (MPOs) form a structured and convenient description -of such operators, that can capture most (if not all) relevant operators. Additionally, they -also form a natural way of representing the transfer matrix of a 2D statistical mechanical -system, and can even be used to study higher dimensional systems by mapping them to quasi-1D -systems. - -In this lecture, we will discuss the construction of MPOs, as well as showcase their use -through [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) and -[MPSKitModels.jl](https://github.com/maartenvd/MPSKitModels.jl). - -```{code-cell} -using TensorKit -using MPSKit -using MPSKitModels -``` - -In general, an MPO is a chain of tensors, where each tensor has two physical indices and two -virtual indices: - -```{image} /_static/MPO/mpo.svg -:scale: 12% -:name: mpo -:align: center -``` - -(statmech_mpo)= -## Statistical Mechanics in 2D - -Before discussing one-dimensional transfer matrices, let us first consider how partition -functions of two-dimensional classical many-body systems can be naturally represented as a -tensor network. To this end, consider the partition function of the -[classical Ising model](https://en.wikipedia.org/wiki/Ising_model), - -```{math} -\mathcal Z = \sum_{\{s_i\}} \text{e}^{-\beta H(\{s_i\})}, -``` - -where $s_i$ denotes a configuration of spins, and $H(\{s_i\})$ is the corresponding -energy, as determined by the Hamiltonian: - -```{math} -H(\{s_i\}) = -J \sum_{\langle i,j \rangle} s_i s_j -``` - -where the first sum is over nearest neighbors. - -### Partition Functions as Tensor Networks - -As the expression for the partition function is an exponential of a sum, we can also write -it as a product of exponentials, which can be reduced to the following network: - -```{image} /_static/MPO/partition_function_1.svg -:scale: 12% -:name: partfunc1 -:align: center -``` - -Here, the black dots at the vertices represent Kronecker $\delta$-tensors, - -```{image} /_static/MPO/kronecker.svg -:scale: 12% -:name: kronecker -:align: center -``` - -and the matrices $t$ encode the Boltzmann weights associated to each nearest-neighbor interaction, - -```{image} /_static/MPO/boltzmann.svg -:scale: 12% -:name: boltzmann -:align: center -``` - -It is then simple, albeit somewhat involved to check that contracting this network gives -rise to the partition function, where the sum over all configurations is converted into the -summations in the contractions of the network. Finally, it is more common to absorb the edge -tensors into the vertex tensors by explicitly contracting them, such that the remaining -network consists of tensors at the vertices only: - -```{image} /_static/MPO/partition_function.svg -:scale: 12% -:name: partfunc -:align: center -``` - -````{note} -Because there are two edges per vertex, an intuitive way of absorbing the edge tensors is to -absorb for example the left and bottom edge tensors into the vertex tensor. However, this -leads to a slightly asymmetric form, and more commonly the square root $q$ of the Boltzmann -matrices is taken, such that each vertex tensor absorbs such a factor from each of the -edges, resulting in a rotation-invariant form. - -```{image} /_static/MPO/boltzmann_mpo.svg -:scale: 12% -:name: boltzmann_mpo -:align: center -``` -```` - -In particular, the construction of the operator that makes up the MPO can be achieved in a -few lines of code, through the use of TensorKit: - -```{code-cell} julia -β = 1.0 - -# construct edge tensors -t = TensorMap(ComplexF64[exp(β) exp(-β); exp(-β) exp(β)], ℂ^2, ℂ^2) -q = sqrt(t) - -# construct vertex tensors -δ = TensorMap(zeros, ComplexF64, ℂ^2 ⊗ ℂ^2, ℂ^2 ⊗ ℂ^2) -δ[1, 1, 1, 1] = 1.0 -δ[2, 2, 2, 2] = 1.0 - -# absorb edge tensors -@tensor O[-1 -2; -3 -4] := δ[1 2; 3 4] * q[-1; 1] * q[-2; 2] * q[3; -3] * q[4; -4] -``` - -### Transfer Matrices - -In order to then evaluate the partition function, we can use the -[Transfer-matrix method](https://en.wikipedia.org/wiki/Transfer-matrix_method), which is a -technique that splits the two-dimensional network into rows (or columns) of so-called -transfer matrices, which are already represented as MPOs. In fact, this method has even led -to the famous exact solution of the two-dimensional Ising model by Onsager. -{cite}`onsager1944crystal`. - -```{image} /_static/MPO/transfer.svg -:scale: 12% -:name: transfer -:align: center -``` - -In the context of tensor networks, this technique is even useful beyond exactly solvable -cases, as efficient algorithms exist to determine the product of an MPO with an MPS in an -approximate manner. This allows us to efficiently split the computation of the partition -function in a sequence of one-dimensional contractions, thus reducing the complexity of the -problem by solving it layer by layer. - -### Thermodynamic Limit - -Importantly, this technique is not limited to finite systems, and in fact allows for the -computation of the partition function of systems directly in the thermodynamic limit, -alleviating the need to consider finite-size effects and extrapolation techniques. The key -insight that allows for this is that the partition function may be written as - -```{math} -\mathcal Z = \lim_{N \to \infty} \mathrm{Tr} \left( T^N \right) -``` - -where $T$ is the row-to-row transfer matrix, and $N$ is the number of rows (or columns) in -the network. If we then consider the spectral decomposition of the transfer matrix, we can -easily show that as the number of rows goes to infinity, the largest eigenvalue of the -transfer matrix dominates, and the partition function is given by - -```{math} -\mathcal Z = \lim_{N \to \infty} \lambda_{\mathrm{max}}^N \braket{\psi}{\psi} -``` - -where $\lambda_{\mathrm{max}}$ is the largest eigenvalue of the transfer matrix, and -$\ket{\psi}$ is the corresponding (MPS) eigenvector. In other words, the partition function -can be computed if it is possible to find the largest eigenvalue of the transfer matrix, for -which efficient algorithms exist. - -For example, one can resort to many types of _boundary MPS techniques_ -{cite}`zauner-stauber2018variational`, which are a generic class of algorithms to -numerically solve these kinds of problems. In particular, they all rely on an efficient way -of finding an (approximate) solution to the following problem: - -```{image} /_static/MPO/boundary_mps.svg -:scale: 12% -:name: boundary_mps -:align: center -``` - -### Expectation Values - -In order to compute relevant quantities for such systems, we can verify that the expectation -value of an operator $O$ is given by the weighing the value of that operator for a given -microstate, with the probability of that microstate: - -```{math} -\langle O \rangle = \frac{1}{\mathcal Z} \sum_{\{s_i\}} O(\{s_i\})\text{e}^{-\beta -H(\{s_i\})} -``` - -For a local operator $O_i$, this can again be written as a tensor network, where a single -Kronecker tensor at a vertex is replaced with a tensor measuring the operator, and then -absorbing the remaining edge tensors: - -```{image} /_static/MPO/expectation_value.svg -:scale: 12% -:name: expectation_value -:align: center -``` - -For example, in the case of the magnetisation $O = \sigma_z$, the tensor $M$ can be -explicitly constructed as follows: - -```{code-cell} julia -Z = TensorMap(ComplexF64[1.0 0.0; 0.0 -1.0], ℂ^2, ℂ^2) -@tensor M[-1 -2; -3 -4] := δ[1 2; 3 4] * Z[4; 5] * q[-1; 1] * q[-2; 2] * q[3; -3] * q[5; -4] -``` - -Using this network, the expectation value can be computed by first contracting the top and -bottom part, replacing them by their fixed-point MPS representations, and then contracting -the remaining MPS-MPO-MPS sandwich. This is achieved by similarly contracting the left and -right part, replacing them by their fixed-point tensors, which are commonly called the -_environments_ $G_L$ and $G_R$, respectively. The final resulting network is then just a -local network, which can be contracted efficiently. - -```{image} /_static/MPO/expectation_value2.svg -:scale: 12% -:name: expectation_value2 -:align: center -``` - -```{note} -This process of sequentally reducing the dimensionality of the network can even be further -extended, where 3D systems can be studied by first determining a 2D boundary PEPS, for which -a 1D boundary MPS can be determined, which admits 0D boundary tensors. This kind of -algorithms are commonly referred to as _boundary methods_. -``` - -(hamiltonian_mpo)= -## Quantum Mechanics in 1+1D - -For quantum systems in one spatial dimension, the construction of MPOs boils down to the -ability to write a sum of local operators in MPO-form. The resulting operator has a very -specific structure, and is often referred to as a _Jordan block MPO_. - -### Jordan Block MPOs - -For example, if we consider the -[Transverse-field Ising model](https://en.wikipedia.org/wiki/Transverse-field_Ising_model), - -```{math} -H = -J \sum X_j X_{j+1} - h \sum Z_j -``` - -it can be represented as an MPO through the (operator-valued) matrix, - -```{math} -W = \begin{pmatrix} -1 & X & -hZ \\ -0 & 0 & -JX \\ -0 & 0 & 1 -\end{pmatrix} -``` - -along with the boundary vectors, - -```{math} -v_L = \begin{pmatrix} -1 & 0 & 0 -\end{pmatrix} -, \qquad -v_R = \begin{pmatrix} -0 \\ 0 \\ 1 -\end{pmatrix} -``` - -The Hamiltonian on $N$ sites is then given by the contraction - -```{math} -H = V_L W^{\otimes N} V_R -``` - -```{note} -While the above example can be constructed from building blocks that are strictly local -operators, this is not always the case, especially when symmetries are involved. In those -cases, the elements of the matrix $W$ have additional virtual legs that are contracted -between different sites. -``` - -### Finite-State Machines - -An intuitive approach to construct such MPOs is to consider the sum of local -terms by virtue of a -[finite-state machine](https://en.wikipedia.org/wiki/Finite-state_machine). This is a -mathematical model of computation that consists of a finite set of states, and a set of -transitions between those states. In the context of MPOs, this is realised by associating -each _virtual level_ with a state, and each transition then corresponds to applying a local -operator. In that regard, the MPO is then a representation of the state of the finite-state -machine, and the matrix $W$ is the transition matrix of the machine. - -In general, the matrix $W$ can then be thought of as a block matrix with entries - -```{math} -\begin{pmatrix} -1 & C & D \\ -0 & A & B \\ -0 & 0 & 1 -\end{pmatrix} -``` - -which corresponds to the finite-state diagram: - - - -It can then be shown that this MPO generates all single-site local operators $D$, two-site -operators $CB$, three-site operators $CAB$, and so on. In other words, the MPO is a -representation of the sum of all local operators, and by carefully extending the structure -of the blocks $A$, $B$, $C$, and $D$, it is possible to construct MPOs that represent sums -of generic local terms, and even approximate long-range interactions by a sum of -exponentials. - -To gain a bit more understanding of this, we can use the following code to reconstruct the -total sum of local terms, starting from the Jordan MPO construction: - -```{code-cell} julia -using Symbolics - -L = 4 -# generate W matrices -@variables A[1:L] B[1:L] C[1:L] D[1:L] -Ws = map(1:L) do l - return [1 C[l] D[l] - 0 A[l] B[l] - 0 0 1] -end - -# generate boundary vectors -Vₗ = [1, 0, 0]' -Vᵣ = [0, 0, 1] - -# expand the MPO -expand(Vₗ * prod(Ws) * Vᵣ) -``` - -### Expectation Values - -In order to compute expectation values of such MPOs, we can use the same technique as -before, and sandwich the MPO between two MPSs. - - - -However, care must be taken when the goal is to determine a local expectation value density, -as this is not necessarily well-defined. In fact, the MPO represents the sum of all local -terms, and sandwiching it will always lead to the total energy. In order to consistently -define local contributions, a choice must be made how to *distribute* this among the sites. -For example, even in the case of two-site local operators, it is unclear if this local -expectation value should be accredited to the left, or right site, or even split between -both sites. In the implementation of MPSKit, the chosen convention is to distribute the -expectation value evenly among its starting and ending point, in order to not overcount -contributions of long-range interactions. - -Typically this is achieved by renormalizing the environment tensors in a particular way, -such that then local expectation values can be obtained by either contracting the first row -of $W$ with the right regularized environment, or the last column of $W$ with the left -regularized environment. This respectively yields the expectation value of all terms -starting at that site, or all terms ending at that site. - -Again, it can prove instructive to write this out explicitly for some small examples to gain -some intuition. Doing this programatically, we get all terms starting at some site as -follows: - -```{code-cell} julia -Ws_reg_right = Ws .- Ref([1 0 0; 0 0 0; 0 0 0]) -expand(Vₗ * Ws_reg_right[end-2] * Ws_reg_right[end-1] * Ws_reg_right[end] * Vᵣ) -``` - -and similarly all terms ending at some site as follows: - -```{code-cell} julia -Ws_reg_left = Ws .- Ref([0 0 0; 0 0 0; 0 0 1]) -expand(Vₗ * Ws_reg_left[1] * Ws_reg_left[2] * Ws_reg_left[3] * Vᵣ) -``` - - -### Jordan MPOs in the Thermodynamic Limit - -In the thermodynamic limit, the same MPO construction can be used to represent the infinite -sum of local terms. However, special care must be taken when considering expectation values, -as now only local expectation values are well-defined, and the total energy diverges with -the system size. - -This is achieved by considering the same regularization of the environment tensors, such -that the divergent parts are automatically removed. This construction can be found in more -detail in {cite}`hubig17generic`. - -### Quasi-1D Systems - -Finally, it is worth noting that the MPO construction can also be used to study -two-dimensional systems, by mapping them to quasi-one-dimensional systems. This is typically -achieved by imposing periodic boundary conditions in one of the spatial directions, and then -_snaking_ an MPS through the resulting lattice. In effect, this leads to a one-dimensional -model with longer-range interactions, which can then be studied using the standard MPS -techniques. However, the -[no free lunch theorem](https://en.wikipedia.org/wiki/No_free_lunch_theorem) applies here as -well, and the resulting model will typically require a bond dimension that grows -exponentially with the periodic system size, in order to achieve the area law of -entanglement in two-dimensional systems. - - -### MPSKitModels and the `@mpoham` Macro - -While the above construction of MPOs is quite general, it is also quite cumbersome to -manually construct, especially when dealing with complicated lattices or non-trivial unit -cells. To this end, the package -[MPSKitModels.jl](https://github.com/maartenvd/MPSKitModels.jl) offers a convenient way of -constructing these MPOs automatically, by virtue of the `@mpoham` macro. This macro allows -for the construction of MPOs by specifying the local operators that are present in the -Hamiltonian, and the lattice on which they act. For example, we can construct the MPO for -the Heisenberg models with nearest- or next-nearest-neighbor interactions as follows: - -```{code-cell} julia -:tags: ["hide-output"] -J₁ = 1.2 -SS = S_exchange() # predefined operator in MPSKitModels - -lattice = InfiniteChain(1) -H₁ = @mpoham begin - sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice)) -end -``` - -```{code-cell} julia -:tags: ["hide-output"] -lattice = InfiniteCylinder(4) -H₂ = @mpoham begin - sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice)) -end -``` - -```{code-cell} julia -:tags: ["hide-output"] -J₂ = 0.8 -lattice = InfiniteCylinder(4) -H₃ = @mpoham begin - sum(J₁ * SS{i, j} for (i, j) in nearest_neighbours(lattice)) + - sum(J₂ * SS{i, j} for (i, j) in next_nearest_neighbours(lattice)) -end -``` - -## Conclusion - -In conclusion, Matrix Product Operators are a powerful tool to represent quantum operators -as well as transfer matrices. They allow for efficient and versatile expressions of -expectation values, and form the building block for many tensor network algorithms, both in -(1+1) or (2+0) dimensions, as well as in higher dimensions. diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.ipynb b/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.ipynb deleted file mode 100644 index c074706a..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.ipynb +++ /dev/null @@ -1,261 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "134e56ad", - "metadata": {}, - "source": [ - "# Matrix Product States\n", - "\n", - "Having introduced tensor network states in general in the previous section, we now turn to\n", - "the specific case of a single spatial dimension. In this setting we will discuss matrix\n", - "product states and their properties.\n", - "\n", - "## A Matrix Product State\n", - "\n", - "We work in the same setting as the section on\n", - "[tensor network states](tensor_network_states), where now our physical spins of local\n", - "physical dimension $d$ are laid out on a linear chain with $N$ sites. As before, we can\n", - "decompose the full tensor of coefficients $C$ of a given quantum state $\\ket{\\psi}$\n", - "\n", - "```{math}\n", - "\\ket{\\psi} = \\sum_{s_1,s_2,...,s_N} C_{s_1,s_2,...,s_N}\\ket{s_1,s_2,...,s_N}.\n", - "```\n", - "\n", - "into a network of local tensors by consecutive SVDs, where each time we only keep some\n", - "suitable number of singular values $D_i$ for every cut. For the case of $N=4$ we can\n", - "explicitly carry out this full procedure in the following way: \n", - "\n", - "```{image} /_static/FiniteMPS/svd.svg\n", - ":scale: 12%\n", - ":name: svd\n", - ":align: center\n", - "```\n", - "\n", - "Absorbing the bond tensors $\\lambda^{(i)}$ into the neighboring site tensor we end up with a\n", - "*matrix product state* (MPS),\n", - "\n", - "```{image} /_static/FiniteMPS/fmps.svg\n", - ":scale: 12%\n", - ":name: fmps\n", - ":align: center\n", - "```\n", - "\n", - "Once again, the horizontal edges connecting the different site tensors are called *virtual\n", - "bonds* and the dimension $D_i$ of these bonds is called the *bond dimension*. This bond\n", - "dimension controls the precision of our low-rank approximation, where in the limit of\n", - "increasing bond dimension an MPS can approximate any quantum state to arbitrary precision.\n", - "However, in accordance with our [previous discussion](area_laws) we expect to be able to\n", - "describe low-energy states of local Hamiltonians using a maximal bond dimension $D$ that\n", - "scales with the boundary of the system, which in one dimension is just *constant in the\n", - "system size*.\n", - "\n", - "To see where the 'matrix product' in the name comes from, we can write out such a state in a\n", - "more explicit form as\n", - "\n", - "```{math}\n", - "\\ket{\\psi} = \\sum_{s_1,s_2,...,s_N} \\sum_{k,l,...,z\\in{0,D-1}} A^{(1)}_{s_1,k}A^{(2)}_{k,s_2,l}...A^{(N)}_{z,s_2,l} \\ket{s_1,s_2,...,s_N}\n", - "```\n", - "\n", - "Interpreting the $A_{s_i}^{(i)}$ as $D \\times D$ matrices, we indeed recognize that the\n", - "corresponding coefficient in the computational basis is given by their matrix product. This\n", - "becomes even more explicit if we consider periodic boundary conditions $N \\sim 1$, where we\n", - "can write a corresponding MPS\n", - "\n", - "```{image} /_static/FiniteMPS/pfmps.svg\n", - ":scale: 12%\n", - ":name: pfmps\n", - ":align: center\n", - "```\n", - "\n", - "as\n", - "\n", - "```{math}\n", - "\\ket{\\psi} = \\sum_{s_1,s_2,...,s_N} {\\rm Tr} \\left[A^{(1)}_{s_1}A^{(2)}_{s_2}...A^{(N)}_{s_N}\\right] \\ket{s_1,s_2,...,s_N}.\n", - "```\n", - "\n", - "This class of states can be used as a variational anzatz to for example perform\n", - "[time evolution](time_evolution) or [find ground states](fixed_point_algorithms) within the\n", - "manifold of MPS of a given bond dimension $D$. Before moving on to MPS algorithms, we first\n", - "summarize some of the key properties that make these states so easy to work with.\n", - "\n", - "````{note}\n", - "Alternatively, one could introduce MPS as a so-called *projected entangled-pair state*\n", - "(PEPS) in the following way. Consider again our chain of length $N$, where we now place two\n", - "ancillary spins of dimension $D$ on every site. We then maximally entangle each of these\n", - "ancillary spins with the corresponding spin on the neighboring site, resulting in a chain of\n", - "entangled pairs of the form $\\ket{\\phi}=\\sum_{j=0}^{d-1}\\ket{j,j}$. Finally, we project the\n", - "two spins at each site onto the local physical Hilbert space of dimension $d$, resulting in\n", - "a state\n", - "\n", - "```{image} /_static/FiniteMPS/peps.svg\n", - ":scale: 12%\n", - ":name: peps\n", - ":align: center\n", - "```\n", - "\n", - "If we write the projectors $\\mathcal P^{(i)}: \\mathbb {C}^D \\otimes \\mathbb{C}^D \\rightarrow\n", - "\\mathbb{C}^d$ as\n", - "\n", - "```{math}\n", - "\\mathcal{P}^{(i)} = \\sum_{s_i,\\alpha,\\beta}A_{k, s_i, l}^{(i)}\\ket{s_i}\\bra{kl},\n", - "```\n", - "\n", - "you should be able to see that the resulting state is precisely an MPS with tensors\n", - "$A^{(i)}$. This construction originates from ideas in quantum information theory\n", - "regarding entanglement and teleportation. While it may seem a bit involved, this\n", - "construction has a very natural generalization to two and more spatial dimensions,\n", - "where it has been put to extensive use.\n", - "````\n", - "\n", - "## Entanglement in MPS\n", - "\n", - "As a first property we study the entanglement structure of an MPS. Consider an MPS with a\n", - "fixed bond dimension $D$. We can choose any bond of the MPS to make a bipartition of the\n", - "system, where all sites to the left of the bond belong to one subsystem and all sites to the\n", - "right of the bond belong to the other subsystem. Performing an SVD across this bond,\n", - "just as we have done in our initial construction, gives us a corresponding set of singular\n", - "values $s_i$. As we have seen [before](entanglement), the squares of these singular values\n", - "are the Schmidt coefficients of the bipartition, and make up the *entanglement spectrum* of\n", - "the MPS. The entanglement spectrum of a given low-energy state encodes many interesting\n", - "properties of the corresponding system, and can for example be used to recognize symmetries\n", - "and detect phase transitions.\n", - "\n", - "The same Schmidt coefficients can be used to compute the bipartite entanglement entropy\n", - "across the cut as\n", - "\n", - "```{math}\n", - "S = -\\sum_i s_i^2 \\log(s_i^2).\n", - "```\n", - "\n", - "For one-dimensional states which obey an area law, the maximum entropy across a cut is\n", - "bounded by a constant. Again we see that by increasing the bond dimension sufficiently, we\n", - "will always be able to saturate this value of $S$, confirming our previous statement that\n", - "MPS faithfully capture these states. Furthermore, even for states that do not satisfy an\n", - "area law, such as critical states, carefully relating entanglement properties such as the\n", - "entanglement entropy to the correlation length (which are then both controlled by the bond\n", - "dimension) allows to derive many key properties of the critical system.\n", - "\n", - "## Gauge Freedom\n", - "\n", - "Not all MPS describe different physical states. One can perform a set of transformations on\n", - "an MPS to change the local tensors, but that leave the physical state unchanged. These\n", - "transformations are called *gauge transformations*. The freedom to choose a particular MPS\n", - "representation when describing a given physical state is also called a *gauge freedom*. The\n", - "gauge transformations that leave an MPS invariant are given by basis transforms on the\n", - "virtual level. Given such a basis transform $M$ as a $D\\times D$ invertible matrix, it is\n", - "easy to see that the following procedure relates two different MPS which encode the same\n", - "physical state,\n", - "\n", - "```{image} /_static/FiniteMPS/gauge.svg\n", - ":scale: 12%\n", - ":name: gauge\n", - ":align: center\n", - "```\n", - "\n", - "where the $B^{(i)}$ tensors are obtained by absorbing $M^{-1}$ and $M$ on the left and right\n", - "virtual index of $A^{(i)}$ respectively.\n", - "\n", - "Since a physical state can be described by many different MPS by virtue of the gauge\n", - "freedom, one can wonder if the same state can be described by two MPS that are not related\n", - "by a gauge transform. This question is answered by the *fundamental theorem of MPS*, which\n", - "states that any two translationally invariant MPS are equal if and only if their tensors are\n", - "related by a gauge transform. So the gauge freedom is the only freedom we have in describing\n", - "a physical state by an MPS.\n", - "\n", - "From a more practical point of view, this gauge freedom is exploited in various algorithms\n", - "by making use of so-called *canonical forms*. One common canonical form for example is the\n", - "*left-canonical form*, where we gauge transform a given MPS tensor $A$ to a different tenor\n", - "$A_L$ which satisfies the condition $\\sum_{s_i=0}^{d-1}(A_L)^\\dagger_{s_i}(A_L)_{s_i} = \\mathbb\n", - "1_{D\\times D}$, or in pictures,\n", - "\n", - "```{image} /_static/FiniteMPS/leftOrth.svg\n", - ":scale: 12%\n", - ":name: leftOrth\n", - ":align: center\n", - "```\n", - "\n", - "A similar form can be imposed to obtain the *right-canonical form* in a finite MPS, we can\n", - "bring the tensors in left- or right canonical form as we wish by factorizing them into\n", - "appropriate isometries using the [QR or polar decomposition](factorizations). This moving of\n", - "the gauge center has proved essential in finite MPS algorithms, as we will see\n", - "[later](fixed_point_algorithms).\n", - "\n", - "\n", - "## Expectation Values\n", - "\n", - "Another key feature of MPS is that expectation values of local operators can be computed\n", - "efficiently. Consider an operator $O_i$ acting on site $i$ of a state given by an MPS\n", - "$\\ket{\\psi[A]}$. To calculate this expectation value we introduce the object\n", - "\n", - "```{image} /_static/FiniteMPS/transfer.svg\n", - ":scale: 12%\n", - ":name: transfer\n", - ":align: center\n", - "```\n", - "\n", - "which we will call the $O$-transfer matrix. In the case of $O=\\mathbb 1$ we just call it the\n", - "transfer matrix. For a finite MPS with periodic boundary conditions, this can be written\n", - "succinctly as\n", - "\n", - "```{math}\n", - "\\braket{\\psi|O_i|\\psi} = Tr\\left(\\mathbb{E}^{i}\\mathbb{E}_O\\mathbb{E}^{N-i-1}\\right).\n", - "```\n", - "\n", - "This quantity can be evaluated\n", - "[efficiently by contracting the corresponding diagram from end to end](contraction_order).\n", - "\n", - "## Correlation Functions\n", - "\n", - "The method to calculate expectation values can be easily generalized to calculate two-point\n", - "correlation functions of an MPS. Consider two operators $O_i$ and $Q_j$ each acting on\n", - "respectively site $i$ and $j$. The correlator between these two operators is denoted by\n", - "$\\braket{\\psi|O_i O_j|\\psi}$, and corresponds to the contraction\n", - "\n", - "```{image} /_static/FiniteMPS/corrFunc.svg\n", - ":scale: 12%\n", - ":name: corrFunc\n", - ":align: center\n", - "```\n", - "\n", - "Adopting the transfer matrix notation this becomes\n", - "\n", - "```{math}\n", - "\\braket{\\psi|O_i O_j|\\psi} = {\\rm Tr}\\left(\\mathbb{E}^{i}\\mathbb{E}_O\\mathbb{E}^{j-i-1}\\mathbb{E}_O\\mathbb{E}^{N-j-1}\\right).\n", - "```\n", - "\n", - "The dependence of the correlator on $i$ and $j$, for large separations between the two, is\n", - "dominated by the factor $\\mathbb{E}$, taken to some large power. This operator is in fact a\n", - "completely positive map (CP map), and one can always normalize the state $\\ket{\\psi}$ such\n", - "that the dominant eigenvalue of $\\mathbb{E}$ is 1 and the others lie within the unit disk.\n", - "Making use of the spectral decomposition, we can show that the exponential dependence on the\n", - "eigenvalues corresponds to an exponential decay in the correlation functions, meaning that\n", - "an MPS always has exponentially decaying correlations. We will return to this point in more\n", - "detail when [considering infinite systems in the next section](imps_correlation).\n", - "\n", - "## Code Example: `MPSKit.FiniteMPS`\n", - "\n", - "To be added." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.md b/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.md deleted file mode 100644 index 5302ce5b..00000000 --- a/pr-preview/pr-27/_sources/3-MatrixProductStates/MatrixProductStates.md +++ /dev/null @@ -1,243 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -# Matrix Product States - -Having introduced tensor network states in general in the previous section, we now turn to -the specific case of a single spatial dimension. In this setting we will discuss matrix -product states and their properties. - -## A Matrix Product State - -We work in the same setting as the section on -[tensor network states](tensor_network_states), where now our physical spins of local -physical dimension $d$ are laid out on a linear chain with $N$ sites. As before, we can -decompose the full tensor of coefficients $C$ of a given quantum state $\ket{\psi}$ - -```{math} -\ket{\psi} = \sum_{s_1,s_2,...,s_N} C_{s_1,s_2,...,s_N}\ket{s_1,s_2,...,s_N}. -``` - -into a network of local tensors by consecutive SVDs, where each time we only keep some -suitable number of singular values $D_i$ for every cut. For the case of $N=4$ we can -explicitly carry out this full procedure in the following way: - -```{image} /_static/FiniteMPS/svd.svg -:scale: 12% -:name: svd -:align: center -``` - -Absorbing the bond tensors $\lambda^{(i)}$ into the neighboring site tensor we end up with a -*matrix product state* (MPS), - -```{image} /_static/FiniteMPS/fmps.svg -:scale: 12% -:name: fmps -:align: center -``` - -Once again, the horizontal edges connecting the different site tensors are called *virtual -bonds* and the dimension $D_i$ of these bonds is called the *bond dimension*. This bond -dimension controls the precision of our low-rank approximation, where in the limit of -increasing bond dimension an MPS can approximate any quantum state to arbitrary precision. -However, in accordance with our [previous discussion](area_laws) we expect to be able to -describe low-energy states of local Hamiltonians using a maximal bond dimension $D$ that -scales with the boundary of the system, which in one dimension is just *constant in the -system size*. - -To see where the 'matrix product' in the name comes from, we can write out such a state in a -more explicit form as - -```{math} -\ket{\psi} = \sum_{s_1,s_2,...,s_N} \sum_{k,l,...,z\in{0,D-1}} A^{(1)}_{s_1,k}A^{(2)}_{k,s_2,l}...A^{(N)}_{z,s_2,l} \ket{s_1,s_2,...,s_N} -``` - -Interpreting the $A_{s_i}^{(i)}$ as $D \times D$ matrices, we indeed recognize that the -corresponding coefficient in the computational basis is given by their matrix product. This -becomes even more explicit if we consider periodic boundary conditions $N \sim 1$, where we -can write a corresponding MPS - -```{image} /_static/FiniteMPS/pfmps.svg -:scale: 12% -:name: pfmps -:align: center -``` - -as - -```{math} -\ket{\psi} = \sum_{s_1,s_2,...,s_N} {\rm Tr} \left[A^{(1)}_{s_1}A^{(2)}_{s_2}...A^{(N)}_{s_N}\right] \ket{s_1,s_2,...,s_N}. -``` - -This class of states can be used as a variational anzatz to for example perform -[time evolution](time_evolution) or [find ground states](fixed_point_algorithms) within the -manifold of MPS of a given bond dimension $D$. Before moving on to MPS algorithms, we first -summarize some of the key properties that make these states so easy to work with. - -````{note} -Alternatively, one could introduce MPS as a so-called *projected entangled-pair state* -(PEPS) in the following way. Consider again our chain of length $N$, where we now place two -ancillary spins of dimension $D$ on every site. We then maximally entangle each of these -ancillary spins with the corresponding spin on the neighboring site, resulting in a chain of -entangled pairs of the form $\ket{\phi}=\sum_{j=0}^{d-1}\ket{j,j}$. Finally, we project the -two spins at each site onto the local physical Hilbert space of dimension $d$, resulting in -a state - -```{image} /_static/FiniteMPS/peps.svg -:scale: 12% -:name: peps -:align: center -``` - -If we write the projectors $\mathcal P^{(i)}: \mathbb {C}^D \otimes \mathbb{C}^D \rightarrow -\mathbb{C}^d$ as - -```{math} -\mathcal{P}^{(i)} = \sum_{s_i,\alpha,\beta}A_{k, s_i, l}^{(i)}\ket{s_i}\bra{kl}, -``` - -you should be able to see that the resulting state is precisely an MPS with tensors -$A^{(i)}$. This construction originates from ideas in quantum information theory -regarding entanglement and teleportation. While it may seem a bit involved, this -construction has a very natural generalization to two and more spatial dimensions, -where it has been put to extensive use. -```` - -## Entanglement in MPS - -As a first property we study the entanglement structure of an MPS. Consider an MPS with a -fixed bond dimension $D$. We can choose any bond of the MPS to make a bipartition of the -system, where all sites to the left of the bond belong to one subsystem and all sites to the -right of the bond belong to the other subsystem. Performing an SVD across this bond, -just as we have done in our initial construction, gives us a corresponding set of singular -values $s_i$. As we have seen [before](entanglement), the squares of these singular values -are the Schmidt coefficients of the bipartition, and make up the *entanglement spectrum* of -the MPS. The entanglement spectrum of a given low-energy state encodes many interesting -properties of the corresponding system, and can for example be used to recognize symmetries -and detect phase transitions. - -The same Schmidt coefficients can be used to compute the bipartite entanglement entropy -across the cut as - -```{math} -S = -\sum_i s_i^2 \log(s_i^2). -``` - -For one-dimensional states which obey an area law, the maximum entropy across a cut is -bounded by a constant. Again we see that by increasing the bond dimension sufficiently, we -will always be able to saturate this value of $S$, confirming our previous statement that -MPS faithfully capture these states. Furthermore, even for states that do not satisfy an -area law, such as critical states, carefully relating entanglement properties such as the -entanglement entropy to the correlation length (which are then both controlled by the bond -dimension) allows to derive many key properties of the critical system. - -## Gauge Freedom - -Not all MPS describe different physical states. One can perform a set of transformations on -an MPS to change the local tensors, but that leave the physical state unchanged. These -transformations are called *gauge transformations*. The freedom to choose a particular MPS -representation when describing a given physical state is also called a *gauge freedom*. The -gauge transformations that leave an MPS invariant are given by basis transforms on the -virtual level. Given such a basis transform $M$ as a $D\times D$ invertible matrix, it is -easy to see that the following procedure relates two different MPS which encode the same -physical state, - -```{image} /_static/FiniteMPS/gauge.svg -:scale: 12% -:name: gauge -:align: center -``` - -where the $B^{(i)}$ tensors are obtained by absorbing $M^{-1}$ and $M$ on the left and right -virtual index of $A^{(i)}$ respectively. - -Since a physical state can be described by many different MPS by virtue of the gauge -freedom, one can wonder if the same state can be described by two MPS that are not related -by a gauge transform. This question is answered by the *fundamental theorem of MPS*, which -states that any two translationally invariant MPS are equal if and only if their tensors are -related by a gauge transform. So the gauge freedom is the only freedom we have in describing -a physical state by an MPS. - -From a more practical point of view, this gauge freedom is exploited in various algorithms -by making use of so-called *canonical forms*. One common canonical form for example is the -*left-canonical form*, where we gauge transform a given MPS tensor $A$ to a different tenor -$A_L$ which satisfies the condition $\sum_{s_i=0}^{d-1}(A_L)^\dagger_{s_i}(A_L)_{s_i} = \mathbb -1_{D\times D}$, or in pictures, - -```{image} /_static/FiniteMPS/leftOrth.svg -:scale: 12% -:name: leftOrth -:align: center -``` - -A similar form can be imposed to obtain the *right-canonical form* in a finite MPS, we can -bring the tensors in left- or right canonical form as we wish by factorizing them into -appropriate isometries using the [QR or polar decomposition](factorizations). This moving of -the gauge center has proved essential in finite MPS algorithms, as we will see -[later](fixed_point_algorithms). - - -## Expectation Values - -Another key feature of MPS is that expectation values of local operators can be computed -efficiently. Consider an operator $O_i$ acting on site $i$ of a state given by an MPS -$\ket{\psi[A]}$. To calculate this expectation value we introduce the object - -```{image} /_static/FiniteMPS/transfer.svg -:scale: 12% -:name: transfer -:align: center -``` - -which we will call the $O$-transfer matrix. In the case of $O=\mathbb 1$ we just call it the -transfer matrix. For a finite MPS with periodic boundary conditions, this can be written -succinctly as - -```{math} -\braket{\psi|O_i|\psi} = Tr\left(\mathbb{E}^{i}\mathbb{E}_O\mathbb{E}^{N-i-1}\right). -``` - -This quantity can be evaluated -[efficiently by contracting the corresponding diagram from end to end](contraction_order). - -## Correlation Functions - -The method to calculate expectation values can be easily generalized to calculate two-point -correlation functions of an MPS. Consider two operators $O_i$ and $Q_j$ each acting on -respectively site $i$ and $j$. The correlator between these two operators is denoted by -$\braket{\psi|O_i O_j|\psi}$, and corresponds to the contraction - -```{image} /_static/FiniteMPS/corrFunc.svg -:scale: 12% -:name: corrFunc -:align: center -``` - -Adopting the transfer matrix notation this becomes - -```{math} -\braket{\psi|O_i O_j|\psi} = {\rm Tr}\left(\mathbb{E}^{i}\mathbb{E}_O\mathbb{E}^{j-i-1}\mathbb{E}_O\mathbb{E}^{N-j-1}\right). -``` - -The dependence of the correlator on $i$ and $j$, for large separations between the two, is -dominated by the factor $\mathbb{E}$, taken to some large power. This operator is in fact a -completely positive map (CP map), and one can always normalize the state $\ket{\psi}$ such -that the dominant eigenvalue of $\mathbb{E}$ is 1 and the others lie within the unit disk. -Making use of the spectral decomposition, we can show that the exponential dependence on the -eigenvalues corresponds to an exponential decay in the correlation functions, meaning that -an MPS always has exponentially decaying correlations. We will return to this point in more -detail when [considering infinite systems in the next section](imps_correlation). - -## Code Example: `MPSKit.FiniteMPS` - -To be added. diff --git a/pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.ipynb b/pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.ipynb deleted file mode 100644 index de3be540..00000000 --- a/pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.ipynb +++ /dev/null @@ -1,548 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "70ed092e", - "metadata": {}, - "source": [ - "(fixed_point_algorithms)=\n", - "# Fixed-Point algorithms\n", - "\n", - "In this section we introduce two algorithms for approximating the ground state of local gapped Hamiltonians using matrix product state techniques. Approximating ground states in a variational manner boils down to minimizing\n", - "```{math}\n", - " \\min_{\\ket{\\psi}\\in D} \\frac{\\braket{\\psi|H|\\psi}}{\\braket{\\psi|\\psi}},\n", - "```\n", - "over a restricted class of states $D$. For simplicity, we will assume the Hamiltonian under consideration has an MPO representation of the form \n", - "```{image} /_static/FixedpointAlgorithms/mpoHam.svg\n", - ":scale: 12%\n", - ":name: mpoHam\n", - ":align: center\n", - "```\n", - "which can encode interactions of arbitrary range as discussed in the previous section. In this formulation, approximating the ground state of $H$ is equivalent to finding the MPS fixed point the MPO Hamiltonian corresponding to the eigenvalue $\\Lambda$ with the smallest real part,\n", - "```{image} /_static/FixedpointAlgorithms/fixedpoint.svg\n", - ":scale: 12%\n", - ":name: fixedpoint\n", - ":align: center\n", - "```\n", - "\n", - "In the algorithms discussed below we optimize over matrix product states of a fixed finite bond dimension. In the first algorithm known as DMRG (density matrix renormalization group) the states we consider are finite MPS, whereas the second algorithm VUMPS (variational uniform matrix product state algorithm), as the name suggests, optimizes over uniform MPS. Hence, VUMPS enables direct optimization in the thermodynamic limit, without breaking translation invariance.\n", - "\n", - "Our exposition of DMRG closes follows the one in {cite}`bridgeman2017handwaving`, and that of VUMPS closely follows the excellent set of lecture notes {cite}`vanderstraeten2019tangentspace`.\n", - "\n", - "## DMRG\n", - "Starting from a random MPS ansatz, DMRG tries to approximate the ground state by sequentially optimizing over all the MPS tensors one by one and sweeping through the chain, until convergence is reached. Let us discuss this algorithm in a bit more detail step by step.\n", - "\n", - "### Algorithm\n", - "\n", - "Let us consider a random ansatz, by taking random tensors $\\{A_1,A_2,...,A_L\\}$, $L$ being the number of sites. Fixing all tensors but the one at site $i$, the local tensor $A_i$ is updated according to\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/localUpdate.svg\n", - ":scale: 12%\n", - ":name: localUpdate\n", - ":align: center\n", - "```\n", - "\n", - "Though seemingly daunting we can turn this problem in a simple eigenvalue problem by making full use of the mixed gauge. By bringing all tensors on the right of $A_i$ in the right canonical form and those to the left in left canonical form the denominator simply becomes $\\braket{A_i|A_i}$ and the update reduces to\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/localUpdate2.svg\n", - ":scale: 12%\n", - ":name: localUpdate2\n", - ":align: center\n", - "```\n", - "\n", - "\n", - "Here the *effective Hamiltonian* $\\mathcal H_i$, defined as\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/effHam.svg\n", - ":scale: 12%\n", - ":name: effHam\n", - ":align: center\n", - "```\n", - "\n", - "encodes the effect of the full system Hamiltonian on the current center site $i$. The variational problem of the local update can then be solved by finding the eigenvector of $\\mathcal{H}_i$ corresponding to the smallest real eigenvalue, and this repeatedly for every site sweeping back and forth through the chain, each time moving the orthogonality center of the MPS. At each update step a large part of the effective Hamiltonian can simply be reused, making the routine very efficient. Notice however that DMRG manifestly breaks translation invariance by updating one tensor at a time. As we will see, VUMPS does not suffer from this artefact.\n", - "\n", - "From this brief explanation it should be clear that DMRG is a surprisingly simple algorithm. Nevertheless DMRG has proven itself time and time again, and is the most successful algorithm for variationally approximating the ground state of local gapped (1+1)d Hamiltonians. DMRG is implemented in MPSKit and can be called by `DMRG()`.\n", - "\n", - "### Example\n", - "\n", - "Let us illustrate the use of DMRG in MPSKit by approximating the ground state of the transverse field Ising model. The Ising model is implemented in MPSKitModels as follows\n", - "```{math}\n", - " H = -J\\left(\\sum_{} Z_i Z_j + \\sum_i h_x X_i + h_z Z_i\\right),\n", - "```\n", - "where we are free to choose the parameters $J$, $h_x$ and $h_z$, and $X$ and $Z$ are the generators of $\\mathfrak{su}(2)$, and thus differ from the usual Pauli matrices by a factor of $\\frac{1}{2}$.\n", - "\n", - "Let us consider 16 lattice sites, bond dimension 12, open boundary conditions and let's stick to the default critical values of $h_x=0.5$ and $h_z=0$. Finding the ground state using DMRG then only takes a handful of iterations!" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "9347313d", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 1\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.0005326848329962604\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.01638790045522 - 1.69387690237017e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.646787812\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 2\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.3447595970721666e-7\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460202 + 2.3832857257682006e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.082970472\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 3\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 3.2547213592364735e-8\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460266 - 5.933982876424318e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.022579385\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 4\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.2051191981316597e-8\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460273 - 8.779908258550268e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.024247745\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 5\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 4.468305529377547e-9\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.01638790046028 - 2.2329965386914683e-15im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.015626563\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 6\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.6576613024032395e-9\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.01638790046028 + 1.9513234593767897e-15im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.018433804\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 7\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 6.154532192441363e-10\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460302 + 1.923899804039612e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.013056537\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 8\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 2.2868822183759553e-10\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460288 - 4.195021525164557e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.011804665\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 9\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 8.504255231816188e-11\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460266 + 9.980536216141623e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.01104208\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 10\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 3.164944418490319e-11\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460277 + 3.711808572814786e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.010065283\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 11\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.1787761332126287e-11\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460273 + 8.868584677716098e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.009222207\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 4.392374800389212e-12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460266 + 1.2190353089600007e-15im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.008492783\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 13\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.6394607745955364e-12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460273 - 5.28239256777398e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.007997797\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 14\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 6.110346266128261e-13\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460266 + 1.532956536656155e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.007693257\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mDMRG summary:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 2.0e-12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -20.016387900460266 + 1.532956536656155e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 1.144352462\n" - ] - } - ], - "source": [ - "using TensorKit, MPSKit, MPSKitModels\n", - "\n", - "d = 2 # Physical dimension\n", - "L = 16 # Length spin chain\n", - "D = 12 # Bond dimension\n", - "\n", - "H = transverse_field_ising()\n", - "\n", - "algorithm = DMRG(); # Summon DMRG\n", - "Ψ = FiniteMPS(L, ℂ^d, ℂ^D) # Random MPS ansatz with bond dimension D\n", - "Ψ₀,_ = find_groundstate(Ψ, H, algorithm);" - ] - }, - { - "cell_type": "markdown", - "id": "b3deeab5", - "metadata": {}, - "source": [ - "## VUMPS\n", - "\n", - "As mentioned above, VUMPS optimizes uniform MPS directly in the thermodynamic limit. Since the total energy becomes unbounded in this limit, our objective should be to rather minimize the energy density. When working in the mixed gauge, this minimization problem can be represented diagrammatically as\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/energyOpt.svg\n", - ":scale: 12%\n", - ":name: energyOpt\n", - ":align: center\n", - "```\n", - "\n", - "where we have introduced the left- and right fixed points $F_L$ and $F_R$ defined as\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/env.svg\n", - ":scale: 12%\n", - ":name: env\n", - ":align: center\n", - "```\n", - "\n", - "which obey the normalization condition\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/envNorm.svg\n", - ":scale: 12%\n", - ":name: envNorm\n", - ":align: center\n", - "```\n", - "\n", - "The VUMPS algorithm offers the advantage of global optimalization by design, since the algorithm, contrary to DMRG, does not rely on individual updates of local tensors.\n", - "\n", - "Given a Hamiltonian of the form mentioned above and an intial random uniform MPS defined by $\\{A_L, A_R,C\\}$, VUMPS approximates the ground state by finding an approximate solution to the fixed-point equations\n", - "```{math}\n", - " A_C' = H_{A_C}(A_C), \\\\\n", - " C' = H_C(C), \\\\\n", - " A_C = A_LC = CA_R.\n", - "```\n", - "A detailed derivation that these equations characterize the variational minimum in the manifold of uniform MPS is beyond the scope of these notes, but see {cite}`vanderstraeten2019tangentspace`.\n", - "\n", - "In these equations the effective Hamiltonians $H_{A_C}$ and $H_{C}$ acting on $A_C$ and $C$ respectively are given by is given by\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/H_AC.svg\n", - ":scale: 12%\n", - ":name: H_AC\n", - ":align: center\n", - "```\n", - "\n", - "```{image} /_static/FixedpointAlgorithms/H_C.svg\n", - ":scale: 12%\n", - ":name: H_C\n", - ":align: center\n", - "```\n", - "\n", - "The last equation then simply states that $C$ intertwines the left - and right-orthonormal form of the tensor $A$.\n", - "\n", - "\n", - "### Algorithm\n", - "\n", - "Let us now explain step-by-step how VUMPS finds an approximate solution to the fixed-point equations in an iterative way.\n", - "\n", - "\n", - "1. We initialize the algorithm with the random guess $\\{A_L, A_R,C\\}$, and chose a tolerance $\\eta$.\n", - "\n", - "2. We first solve the first two eigenvalue equations\n", - " ```{math}\n", - " A_C = H_{A_C}(A_C), \\\\\n", - " C = H_C(C),\n", - " ```\n", - " using for example an Arnoldi algorithm with the previous approximations of $A_C$ and $C$ as initial guess. This yields two tensors $\\tilde A_C$ and $\\tilde C$.\n", - "\n", - "3. From $\\tilde A_C$ and $\\tilde C$ we compute $\\tilde A_L$ and $\\tilde A_R$ that minimize following two-norms\n", - " \n", - " ```{math}\n", - " \\epsilon_L = \\min_{A_L^\\dagger A_L=1} ||\\tilde A_C-\\tilde A_L\\tilde C||_2, \\\\\n", - " \\epsilon_R = \\min_{A_R A_R^\\dagger=1} ||\\tilde A_C-\\tilde C\\tilde A_R||_2,\n", - " ```\n", - " and thus approximately solve the last equation. Note that the minimum is taken over respectively left - and right isometric matrices. We comment below on the analytic soltuion of these equations and how this analytic solution can be approximated efficiently.\n", - "\n", - "4. Update $A_L\\leftarrow\\tilde A_L$, $A_R\\leftarrow\\tilde A_R$ and $C\\leftarrow\\tilde C$.\n", - "\n", - "5. Evaluate $\\epsilon=\\max(\\epsilon_L,\\epsilon_R)$ and repeat until $\\epsilon$ is below the tolerance $\\eta$.\n", - "\n", - "Let us finally comment on solving the minimization problem to approximate $\\tilde A_{L/R}$.\n", - "\n", - "A beautiful result in linear algebra states that the minimum is exactly given by $\\tilde A_L=U_lV_l^\\dagger$ where $U_l$ and $V_l$ are the isometries arising from the singular value decomposition of $\\tilde A_C\\tilde C^\\dagger=U_l\\Sigma_lV_l^\\dagger$, and similarly $\\tilde A_R=U_rV_r^\\dagger$, where $\\tilde C^\\dagger\\tilde A_C=U_r\\Sigma_rV_r^\\dagger$. Even though this approach will work well for the first iteration steps, this might not be the best solution close to convergence. When approaching the exact solution $A^s_C=A^s_LC=CA^s_R$ the singular values in $\\Sigma_{l/r}$ become really small so that in finite precision arithmetic the singular vector in the isometries $U_{l/r}$ and $V_{l/r}$ are poor approximations of the exact singular vectors. A robust and close to optimal solution turns out to be\n", - "```{math}\n", - " \\tilde A_L = U^l_{A_C}(U^l_C)^\\dagger,\\qquad \\tilde A_R = (U^r_C)^\\dagger U^r_{A_C},\n", - "```\n", - "where the $U$'s are the unitaries appearing in the polar decomposition of\n", - "```{math}\n", - " \\tilde A_C = U^l_{A_C}P^l_{A_C},\\qquad \\tilde C = U^l_CP^l_C,\\\\\n", - " \\tilde A^r_C = P^r_{A_C}U^r_{A_C},\\qquad \\tilde C = P^r_CU^r_C.\n", - "```\n", - "\n", - "### Example\n", - "\n", - "Let us demonstrate the algorithm using MPSKit by estimating the ground state energy density of the spin 1 XXX model. The VUMPS algorithm is called in the same way as we called DMRG. We initialize a random initial MPS with bond dimension 12 and physical dimension 3 (because the spin 1 representation of SU(2) is $2\\cdot1+1=3$-dimensional). Obviously we don't have to specify a system size because we work directly in the thermodynamic limit." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "cd0e38eb", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 1\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.4719404564358398\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -0.09959695122131748 - 1.3040636633559757e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.053156709\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 2\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.4506152025399737\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -0.5583932234087311 + 5.553135352688308e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.010223283\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 3\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.3629368844908232\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -0.993574501246331 + 7.795711024065943e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.024041981\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 4\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.13370307456046374\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.3549047523508608 + 6.284940422381764e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.007571753\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 5\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.01582598186552914\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4008384693488047 - 1.9982973682606948e-16im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.007492494\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 6\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.007459679693948124\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4012988366021029 - 5.764860989061647e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.008910909\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 7\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.00399154578462199\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013561841111188 - 2.1883569012788706e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.008854833\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 8\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.0011455497777277282\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013783791455072 - 5.5190095310059743e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.016109313\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 9\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.000401541135649868\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013803528079771 - 9.954377398999163e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006348695\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 10\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 0.00013514788004829803\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806079316597 - 2.3677164203916684e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006413757\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 11\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 4.793582818793851e-5\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806388259225 + 9.400567752639473e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006579898\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.6853849012249328e-5\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806428928055 + 4.663267041884612e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006457859\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 13\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 6.14302972102875e-6\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.40138064343216 - 3.9411673633208964e-18im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.011694586\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 14\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 2.2191341201556632e-6\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.401380643506309 - 2.71145561760739e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006486793\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 15\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 8.247539552814379e-7\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435165632 + 6.27746085727569e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006606467\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 16\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 3.0381270697001354e-7\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435180085 - 7.360988577709973e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006506651\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 17\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.1439909425967689e-7\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182143 + 4.740638298943028e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006377809\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 18\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 4.274157397995229e-8\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182454 + 8.230437511059935e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.011077852\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 19\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.6237952207617785e-8\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182474 + 1.7286444964567578e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006469751\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 20\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 6.130775774164611e-9\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.401380643518249 - 4.388913559151589e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006485772\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 21\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 2.3439697211408005e-9\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182496 + 9.076610585685075e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006400072\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 22\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 8.921580512534823e-10\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182496 - 3.543113964500985e-18im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.007674595\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 23\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 3.427344780625515e-10\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.401380643518248 + 1.6912865276329293e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.011840929\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 24\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.3129414037177357e-10\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182494 - 2.264590234517779e-18im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006903282\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 25\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 5.0630289785976875e-11\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.401380643518249 - 1.3308398136231881e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006563748\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 26\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.949807197019253e-11\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.401380643518248 + 5.248240045237138e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006484149\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 27\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 7.542652840093537e-12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182508 + 7.973535265547894e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.006532749\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 28\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 2.9171689579777305e-12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182499 - 5.080907190674386e-18im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.010962064\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 29\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 1.1310794158535638e-12\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.4013806435182494 + 5.464103894193135e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.005739366\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS iteration:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m iter = 30\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 4.3952525290723206e-13\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.401380643518249 - 1.8882969228324614e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 0.005644267\n", - "\u001b[36m\u001b[1m┌ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mVUMPS summary:\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m ϵ = 4.3952525290723206e-13\n", - "\u001b[36m\u001b[1m│ \u001b[22m\u001b[39m λ = -1.401380643518249 - 1.8882969228324614e-17im\n", - "\u001b[36m\u001b[1m└ \u001b[22m\u001b[39m Δt = 1.166622834\n" - ] - } - ], - "source": [ - "H = heisenberg_XYZ()\n", - "\n", - "Ψ = InfiniteMPS(ℂ^3, ℂ^D)\n", - "algorithm = VUMPS()\n", - "Ψ₀, envs = find_groundstate(Ψ, H, algorithm);" - ] - }, - { - "cell_type": "markdown", - "id": "5412aac3", - "metadata": {}, - "source": [ - "It takes about 30 iterations and a second or two to reach convergence. Let us gauge how well the ground state energy density was approximated by calling" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "3ae6f9ee", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1-element PeriodicArray{ComplexF64, 1}:\n", - " -1.4013806435182494 - 3.681340623886102e-17im" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "expectation_value(Ψ₀, H)" - ] - }, - { - "cell_type": "markdown", - "id": "18735cf6", - "metadata": {}, - "source": [ - "The value we obtain here is to be compared with the quasi-exact value -1.401 484 038 971 2(2) obtained in {cite}`haegeman2011time`. As you can see, even with such a small bond dimension we can easily approximate the ground state energy up to 3 decimals." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 81, - 93, - 190, - 196, - 200, - 202 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.md b/pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.md deleted file mode 100644 index cb4abbcb..00000000 --- a/pr-preview/pr-27/_sources/4-Algorithms/FixedpointAlgorithms.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(fixed_point_algorithms)= -# Fixed-Point algorithms - -In this section we introduce two algorithms for approximating the ground state of local gapped Hamiltonians using matrix product state techniques. Approximating ground states in a variational manner boils down to minimizing -```{math} - \min_{\ket{\psi}\in D} \frac{\braket{\psi|H|\psi}}{\braket{\psi|\psi}}, -``` -over a restricted class of states $D$. For simplicity, we will assume the Hamiltonian under consideration has an MPO representation of the form -```{image} /_static/FixedpointAlgorithms/mpoHam.svg -:scale: 12% -:name: mpoHam -:align: center -``` -which can encode interactions of arbitrary range as discussed in the previous section. In this formulation, approximating the ground state of $H$ is equivalent to finding the MPS fixed point the MPO Hamiltonian corresponding to the eigenvalue $\Lambda$ with the smallest real part, -```{image} /_static/FixedpointAlgorithms/fixedpoint.svg -:scale: 12% -:name: fixedpoint -:align: center -``` - -In the algorithms discussed below we optimize over matrix product states of a fixed finite bond dimension. In the first algorithm known as DMRG (density matrix renormalization group) the states we consider are finite MPS, whereas the second algorithm VUMPS (variational uniform matrix product state algorithm), as the name suggests, optimizes over uniform MPS. Hence, VUMPS enables direct optimization in the thermodynamic limit, without breaking translation invariance. - -Our exposition of DMRG closes follows the one in {cite}`bridgeman2017handwaving`, and that of VUMPS closely follows the excellent set of lecture notes {cite}`vanderstraeten2019tangentspace`. - -## DMRG -Starting from a random MPS ansatz, DMRG tries to approximate the ground state by sequentially optimizing over all the MPS tensors one by one and sweeping through the chain, until convergence is reached. Let us discuss this algorithm in a bit more detail step by step. - -### Algorithm - -Let us consider a random ansatz, by taking random tensors $\{A_1,A_2,...,A_L\}$, $L$ being the number of sites. Fixing all tensors but the one at site $i$, the local tensor $A_i$ is updated according to - -```{image} /_static/FixedpointAlgorithms/localUpdate.svg -:scale: 12% -:name: localUpdate -:align: center -``` - -Though seemingly daunting we can turn this problem in a simple eigenvalue problem by making full use of the mixed gauge. By bringing all tensors on the right of $A_i$ in the right canonical form and those to the left in left canonical form the denominator simply becomes $\braket{A_i|A_i}$ and the update reduces to - -```{image} /_static/FixedpointAlgorithms/localUpdate2.svg -:scale: 12% -:name: localUpdate2 -:align: center -``` - - -Here the *effective Hamiltonian* $\mathcal H_i$, defined as - -```{image} /_static/FixedpointAlgorithms/effHam.svg -:scale: 12% -:name: effHam -:align: center -``` - -encodes the effect of the full system Hamiltonian on the current center site $i$. The variational problem of the local update can then be solved by finding the eigenvector of $\mathcal{H}_i$ corresponding to the smallest real eigenvalue, and this repeatedly for every site sweeping back and forth through the chain, each time moving the orthogonality center of the MPS. At each update step a large part of the effective Hamiltonian can simply be reused, making the routine very efficient. Notice however that DMRG manifestly breaks translation invariance by updating one tensor at a time. As we will see, VUMPS does not suffer from this artefact. - -From this brief explanation it should be clear that DMRG is a surprisingly simple algorithm. Nevertheless DMRG has proven itself time and time again, and is the most successful algorithm for variationally approximating the ground state of local gapped (1+1)d Hamiltonians. DMRG is implemented in MPSKit and can be called by `DMRG()`. - -### Example - -Let us illustrate the use of DMRG in MPSKit by approximating the ground state of the transverse field Ising model. The Ising model is implemented in MPSKitModels as follows -```{math} - H = -J\left(\sum_{} Z_i Z_j + \sum_i h_x X_i + h_z Z_i\right), -``` -where we are free to choose the parameters $J$, $h_x$ and $h_z$, and $X$ and $Z$ are the generators of $\mathfrak{su}(2)$, and thus differ from the usual Pauli matrices by a factor of $\frac{1}{2}$. - -Let us consider 16 lattice sites, bond dimension 12, open boundary conditions and let's stick to the default critical values of $h_x=0.5$ and $h_z=0$. Finding the ground state using DMRG then only takes a handful of iterations! - -```{code-cell} julia -using TensorKit, MPSKit, MPSKitModels - -d = 2 # Physical dimension -L = 16 # Length spin chain -D = 12 # Bond dimension - -H = transverse_field_ising() - -algorithm = DMRG(); # Summon DMRG -Ψ = FiniteMPS(L, ℂ^d, ℂ^D) # Random MPS ansatz with bond dimension D -Ψ₀,_ = find_groundstate(Ψ, H, algorithm); -``` - -## VUMPS - -As mentioned above, VUMPS optimizes uniform MPS directly in the thermodynamic limit. Since the total energy becomes unbounded in this limit, our objective should be to rather minimize the energy density. When working in the mixed gauge, this minimization problem can be represented diagrammatically as - -```{image} /_static/FixedpointAlgorithms/energyOpt.svg -:scale: 12% -:name: energyOpt -:align: center -``` - -where we have introduced the left- and right fixed points $F_L$ and $F_R$ defined as - -```{image} /_static/FixedpointAlgorithms/env.svg -:scale: 12% -:name: env -:align: center -``` - -which obey the normalization condition - -```{image} /_static/FixedpointAlgorithms/envNorm.svg -:scale: 12% -:name: envNorm -:align: center -``` - -The VUMPS algorithm offers the advantage of global optimalization by design, since the algorithm, contrary to DMRG, does not rely on individual updates of local tensors. - -Given a Hamiltonian of the form mentioned above and an intial random uniform MPS defined by $\{A_L, A_R,C\}$, VUMPS approximates the ground state by finding an approximate solution to the fixed-point equations -```{math} - A_C' = H_{A_C}(A_C), \\ - C' = H_C(C), \\ - A_C = A_LC = CA_R. -``` -A detailed derivation that these equations characterize the variational minimum in the manifold of uniform MPS is beyond the scope of these notes, but see {cite}`vanderstraeten2019tangentspace`. - -In these equations the effective Hamiltonians $H_{A_C}$ and $H_{C}$ acting on $A_C$ and $C$ respectively are given by is given by - -```{image} /_static/FixedpointAlgorithms/H_AC.svg -:scale: 12% -:name: H_AC -:align: center -``` - -```{image} /_static/FixedpointAlgorithms/H_C.svg -:scale: 12% -:name: H_C -:align: center -``` - -The last equation then simply states that $C$ intertwines the left - and right-orthonormal form of the tensor $A$. - - -### Algorithm - -Let us now explain step-by-step how VUMPS finds an approximate solution to the fixed-point equations in an iterative way. - - -1. We initialize the algorithm with the random guess $\{A_L, A_R,C\}$, and chose a tolerance $\eta$. - -2. We first solve the first two eigenvalue equations - ```{math} - A_C = H_{A_C}(A_C), \\ - C = H_C(C), - ``` - using for example an Arnoldi algorithm with the previous approximations of $A_C$ and $C$ as initial guess. This yields two tensors $\tilde A_C$ and $\tilde C$. - -3. From $\tilde A_C$ and $\tilde C$ we compute $\tilde A_L$ and $\tilde A_R$ that minimize following two-norms - - ```{math} - \epsilon_L = \min_{A_L^\dagger A_L=1} ||\tilde A_C-\tilde A_L\tilde C||_2, \\ - \epsilon_R = \min_{A_R A_R^\dagger=1} ||\tilde A_C-\tilde C\tilde A_R||_2, - ``` - and thus approximately solve the last equation. Note that the minimum is taken over respectively left - and right isometric matrices. We comment below on the analytic soltuion of these equations and how this analytic solution can be approximated efficiently. - -4. Update $A_L\leftarrow\tilde A_L$, $A_R\leftarrow\tilde A_R$ and $C\leftarrow\tilde C$. - -5. Evaluate $\epsilon=\max(\epsilon_L,\epsilon_R)$ and repeat until $\epsilon$ is below the tolerance $\eta$. - -Let us finally comment on solving the minimization problem to approximate $\tilde A_{L/R}$. - -A beautiful result in linear algebra states that the minimum is exactly given by $\tilde A_L=U_lV_l^\dagger$ where $U_l$ and $V_l$ are the isometries arising from the singular value decomposition of $\tilde A_C\tilde C^\dagger=U_l\Sigma_lV_l^\dagger$, and similarly $\tilde A_R=U_rV_r^\dagger$, where $\tilde C^\dagger\tilde A_C=U_r\Sigma_rV_r^\dagger$. Even though this approach will work well for the first iteration steps, this might not be the best solution close to convergence. When approaching the exact solution $A^s_C=A^s_LC=CA^s_R$ the singular values in $\Sigma_{l/r}$ become really small so that in finite precision arithmetic the singular vector in the isometries $U_{l/r}$ and $V_{l/r}$ are poor approximations of the exact singular vectors. A robust and close to optimal solution turns out to be -```{math} - \tilde A_L = U^l_{A_C}(U^l_C)^\dagger,\qquad \tilde A_R = (U^r_C)^\dagger U^r_{A_C}, -``` -where the $U$'s are the unitaries appearing in the polar decomposition of -```{math} - \tilde A_C = U^l_{A_C}P^l_{A_C},\qquad \tilde C = U^l_CP^l_C,\\ - \tilde A^r_C = P^r_{A_C}U^r_{A_C},\qquad \tilde C = P^r_CU^r_C. -``` - -### Example - -Let us demonstrate the algorithm using MPSKit by estimating the ground state energy density of the spin 1 XXX model. The VUMPS algorithm is called in the same way as we called DMRG. We initialize a random initial MPS with bond dimension 12 and physical dimension 3 (because the spin 1 representation of SU(2) is $2\cdot1+1=3$-dimensional). Obviously we don't have to specify a system size because we work directly in the thermodynamic limit. - -```{code-cell} julia -H = heisenberg_XYZ() - -Ψ = InfiniteMPS(ℂ^3, ℂ^D) -algorithm = VUMPS() -Ψ₀, envs = find_groundstate(Ψ, H, algorithm); -``` - -It takes about 30 iterations and a second or two to reach convergence. Let us gauge how well the ground state energy density was approximated by calling - -```{code-cell} julia -expectation_value(Ψ₀, H) -``` - -The value we obtain here is to be compared with the quasi-exact value -1.401 484 038 971 2(2) obtained in {cite}`haegeman2011time`. As you can see, even with such a small bond dimension we can easily approximate the ground state energy up to 3 decimals. \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.ipynb b/pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.ipynb deleted file mode 100644 index 01434a22..00000000 --- a/pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.ipynb +++ /dev/null @@ -1,386 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "98f2ab2d", - "metadata": {}, - "source": [ - "% put the references in \n", - "% test the code\n", - "\n", - "(time_evolution)=\n", - "# Time Evolution\n", - "\n", - "In this segment of the tutorial, we delve into some time evolution techniques for MPS. In particular we will focus on the [TDVP](TDVP_header) and [Time Evolution MPO](TMPO_header) methods. Another method (i)[TEBD](tebd) has already been explained in an earlier section. Following this we briefly explain how [imaginary time evolution](Imag_header) can be used to find ground states and how [thermal density matrices](FinTemp_header) can be simulated using MPS.\n", - "At the end of this section we offer some basic [code examples](code_header).\n", - "\n", - "In the case of quantum many body systems time evolution amounts to solving the time dependent Schrodinger equation\n", - "\n", - "```{math}\n", - ":label: Schrodinger\n", - "i \\frac{\\partial}{\\partial t} \\ket{\\Psi(t)}= \\hat{H}\\ket{\\Psi(t)}\n", - "```\n", - "\n", - "for a given Hamiltonian $\\hat{H}$ with initial condition $\\ket{\\Psi_0}=\\ket{\\Psi(t_0)}$. For a time independent Hamiltonian the solution is given by \n", - "\n", - "```{math}\n", - "\\ket{\\Psi(t)} = U(t)\\ket{\\Psi_0} = \\exp(-it\\hat{H})\\ket{\\Psi_0}\n", - "```\n", - "\n", - "By approximating the time evolution operator $U$ in the Tensor Network language, we can also study real-time dynamics.\n", - "\n", - "```{note}\n", - "One should keep in mind that time evolution in general will increase the entanglement of the state so that in practice time evolution can only be done with Tensor Networks for relatively modest times. For example in case of a quench the entanglement for 1D systems grows as $S \\sim t$ , (see {cite}`Calabrese_2005`) so that the bond dimension $D \\sim \\exp(at)$ in order to accurately follow the dynamics.\n", - "```\n", - "\n", - "```{contents} Contents\n", - ":depth: 3\n", - "```\n", - "\n", - "(TDVP_header)=\n", - "## TDVP\n", - "\n", - "The Time-Dependent Variational Principle is an old concept, originaly developed by Dirac and Frenkel in the 1930's. The idea is to solve the schrodinger equation by minimizing\n", - "```{math}\n", - "\\|i \\frac{\\partial}{\\partial t} \\ket{\\Psi(t)}- \\hat{H}\\ket{\\Psi(t)}\\|^2\n", - "```\n", - "In the case of MPS, we can parametrize the state $\\ket{\\Psi(t)}$ by a set of time dependent matrices $\\{A_1(t),A_2(t),\\dots A_N(t)\\}$ (where N is the system size for finiteMPS or the size of the unit cell for infinite MPS). In other words the state $\\ket{\\Psi(t)}$ lives in a manifold determined by these matrices, the MPS-manifold. Geometrically the solution of the minimization problem is given by the projection of the RHS of the schrodinger equation onto the MPS manifold \n", - "```{math}\n", - ":label: TDVPeq\n", - "\\frac{d}{dt} \\ket{\\Psi(A)} = -i \\hat{P}_{T\\ket{\\Psi(A)}} \\hat{H}\\ket{\\Psi(A)}\n", - "```\n", - "where $\\hat{P}_{T\\ket{\\Psi(A)}}$ is the operator that projects the state onto the tangent space. As a consequence the time-evolving state will never leave the MPS manifold and parametrization in terms of $A(t)$ makes sense. One can in principle work out the above equation on the level of the $A$ matrices and try to solve the above equation. This gives a complicated set of (non-linear) equations that can be solved by one's favourite finite difference scheme, but requires the inversion of matrices with small singular values (and thus numerical instabilities) {cite}`haegeman2011time`, {cite}`HaegemanTDVP`. Instead, it turns out that a natural and inversion free way of solving this equation is possible if we use the gauge freedom of MPS.\n", - "\n", - "For a finite MPS, one can show that in the mixed gauge the action of the projection operator onto $\\hat{H}\\ket{\\Psi(A)}$ is given by {cite}`vanderstraeten2019tangentspace`\n", - "```{image} /_static/TimeEvolution/TDVPProjector.svg\n", - ":scale: 12%\n", - ":name: TDVPProjector\n", - ":align: center\n", - "```\n", - "The projector action consists of two sums, one where an effective Hamiltonian $\\hat{H}_{\\text{eff}}^{A_C}$ acts on the $A_C$ on site $n$ and one where $(\\hat{H}_{\\text{eff}}^{C})$ acts on the bond tensor $C$ to the right of it. The effective Hamiltonias are given by\n", - "```{image} /_static/TimeEvolution/Heffs.svg\n", - ":scale: 12%\n", - ":name: Heffs\n", - ":align: center\n", - "```\n", - "\n", - "Thanks to the decomposition of $\\hat{P}_{T\\ket{\\Psi(A)}} \\hat{H}\\ket{\\Psi(A)}$ {eq}`TDVPeq` now resembles an ODE of the form\n", - "```{math}\n", - ":label: SplittingODE\n", - "\\frac{d}{dt} Y = A(Y) + B(Y)\n", - "```\n", - "This type of ODE can be solved by a splitting method {cite}`Lubich_2015` i.e. we solve $\\frac{d}{dt} Y = A(Y)$ and $\\frac{d}{dt} Y = B(Y)$ seperately and then combine the two results to obtain an approximate solution to {eq}`SplittingODE`. Applying this idea to {eq}`TDVPeq` we thus need to solve equations of the form\n", - "```{math}\n", - "\\frac{d}{dt} \\ket{\\Psi(A)} = -i \\hat{H}_{\\text{eff}}^{A_C}[ A_C(n)]\n", - "```\n", - "and \n", - "```{math}\n", - "\\frac{d}{dt} \\ket{\\Psi(A)}= i \\hat{H}_{\\text{eff}}^{C}[ C(n)]\n", - "```\n", - "These can be further simplified by noting that we can put all the time dependence inside one tensor, which we choose to be either $A_C(n)$ or $C(n)$. It is then sufficient to solve\n", - "```{math}\n", - ":label: ACdot\n", - "\\dot{A}_C(n) = -i \\hat{H}_{\\text{eff}}^{A_C}[ A_C(n)]\n", - "```\n", - "and \n", - "\n", - "```{math}\n", - ":label: Cdot\n", - "\\dot{C}(n) = i \\hat{H}_{\\text{eff}}^{C}[ C(n)]\n", - "```\n", - "for each site $n$ seperately. These can be integrated exactly to give\n", - "\n", - "```{math}\n", - ":label: ACdt\n", - "A_C(n,t+dt) = \\exp(-idt \\hat{H}_{\\text{eff}}^{A_C}) A_C(n,t)\n", - "\n", - "```\n", - "\n", - "and \n", - "\n", - "```{math}\n", - ":label: Cdt\n", - "C(n,t+dt) = \\exp(idt \\hat{H}_{\\text{eff}}^{C}) C(n,t)\n", - "```\n", - "\n", - "A natural way to combine the seperate solutions is to perform a sweep-like update. Starting from the first site we do:\n", - "```{admonition} TDVP algorithm for finite MPS\n", - " 1. Update $A_C(n)$ according to {eq}`ACdt`.\n", - " 2. QR the resulting new $A_C(n,t+dt)$ to get a new updated $A_L(n,t+dt)$ en $C(n,t+dt)$.\n", - " 3. Update the new $C(n,t+dt)$ via {eq}`Cdt` to get an $\\tilde{C}$.\n", - " 4. Absorb $\\tilde{C}$ into $A_R(n+1,t)$ to get a new $A_C(n+1,t)$\n", - " 5. Repeat for n+1\n", - " ```\n", - "\n", - "At the end of the chain one only updates the $A_C$ since there is no $C$ there. \n", - "\n", - "Doing the above left to right sweep gives a first order integrator i.e. we have solved the time evolution up to order $\\mathcal{O}(dt^2)$. Since the terms can be solved in any order we can also perform a reverse sweep i.e. working from right to left. Combining this with the left to right sweep yields a second order integrator (because the reverse sweep is the adjoint of the forwards sweep).\n", - "\n", - "For an infinite MPS one could also do a sweep-like update until some criteria converges to obtain new tensors $\\{A_L,C,A_C,A_R\\}$. However this can be costly since one has to iterate until convergence. Instead we can exploit the translational invariance of the system by demanding that $C=\\tilde{C}$. Since $\\tilde{C}=\\exp(idt \\hat{H}_{\\text{eff}}^{C}) C(n,t+dt)$ we can turn things around and find \n", - "\n", - "```{math}\n", - "C(n,t+dt)=\\exp(-idt \\hat{H}_{\\text{eff}}^{C}) C(n)\n", - "```\n", - "\n", - "Given the newly found $C(n,t+dt)$ and $A_C(n,t+dt)$ one can determine a new $A_L$, giving a MPS for $t+dt$.\n", - "\n", - "```{note}\n", - "Unlike other time evolution methods, TDVP retains some of the physical \n", - "properties of the Schrodinger equation it is trying to solve. First of all, it acts trivial on (numerical) eigenstates of $\\hat{H}$ since then $\\hat{H}_{\\text{eff}}^{A_C}[A_C] \\propto A_C$ and the whole MPS picks up a phase equal to $e^{-i dtE}$. In addition it conserves energy and is time-reversible for time-independent Hamiltonians {cite}`vanderstraeten2019tangentspace`.\n", - "```\n", - "\n", - "(TMPO_header)=\n", - "## Time Evolution MPO\n", - "\n", - "Perhaps the most natural way to perform the time evolution would be to write the time evolution operator as a MPO. The evolved state would then simply be the contraction of this MPO onto an MPS (see ref). The exponential implementing the time evolution can be approximated up to any order by its trunctated Taylor series\n", - "\n", - "```{math}\n", - "\\exp(-\\tau\\hat{H}) = \\hat{1} + \\tau\\hat{H} + \\frac{\\tau^2}{2}\\hat{H}^2 + \\mathcal{O}(\\tau^3)\n", - "```\n", - "The MPO approximation of the time evolution operator then boils down to implementing powers of $\\hat{H}$ in an efficient (i.e. with the lowest possible MPO bond dimension) and size-extensive way {cite}`vandamme2023efficient`. For example, for a MPO Hamiltonian of the form\n", - "```{image} /_static/TimeEvolution/MPOHam.svg\n", - ":scale: 12%\n", - ":name: MPOHam\n", - ":align: center\n", - "```\n", - "\n", - "which corresponds to the Hamiltonian\n", - "```{math}\n", - "\\hat{H} = \\sum_i \\hat{D}_i + \\hat{C}_i \\hat{B}_{i+1}\n", - "```\n", - "The first order approximation of $U=\\exp(-\\tau\\hat{H})$ is given in MPO form by\n", - "\n", - "```{image} /_static/TimeEvolution/TimeMPO_1stOrder.svg\n", - ":scale: 12%\n", - ":name: FirstOrder\n", - ":align: center\n", - "```\n", - "\n", - "Doing the matrix multiplcation (and remembering that for MPO the boundary conditions are so the we need to track the upper left expression) we find\n", - "\n", - "```{math}\n", - "\\exp(-\\tau\\hat{H}) \\approx \\hat{1} + \\tau \\left(\\sum_i D_i + C_i B_{i+1}\\right) = \\hat{1} + \\tau \\hat{H}\n", - "```\n", - "as desired. \n", - "\n", - "The trick for generating the first order approximation involves removing the third \"level\" from the MPO form of H and multiplying with the appropriate factor of τ. This can be visualised as follows\n", - "\n", - "```{image} /_static/TimeEvolution/FirstOrderTrick.svg\n", - ":scale: 12%\n", - ":name: FirstOrderTrick\n", - ":align: center\n", - "```\n", - "\n", - "This method can be extended to any desired order in $\\tau$ as outlined in {cite}`vandamme2023efficient`.\n", - "%thus allowing us to represent $\\exp(-\\tau\\hat{H})$ as an MPO.\n", - "\n", - "(Imag_header)=\n", - "## Imaginary time evolution\n", - "\n", - "Besides simulating dynamics, any time evolution method can also be used to find the groundstate of $\\hat{H}$ by taking $t$ to be imaginary. The basis for this idea is the fact that\n", - "\n", - "\n", - "```{math}\n", - "\\ket{\\Psi_0} = \\lim_{\\tau->+\\infty} \\frac{e^{-\\tau \\hat{H}} \\ket{\\Psi}}{\\sqrt{\\braket{\\Psi|e^{-2\\tau \\hat{H}} |\\Psi}}}\n", - "```\n", - "\n", - "where $\\ket{\\Psi}$ is any initial state not orthogonal to the ground state. Indeed expanding the initial state in the eigenbasis of $\\hat{H}$ we have $\\ket{\\Psi} = \\sum_i c_i \\ket{E_i}$ with $\\ket{E_i}$ the eigenstate corresponding to energy $E_i$ with ordering $E_0 < E_1 < E_2 < \\dots$. Then\n", - "\n", - "```{math}\n", - "e^{-\\tau \\hat{H}} \\ket{\\Psi} = \\sum_i c_i e^{-\\tau E_i} \\ket{E_i}\n", - "```\n", - "\n", - "In taking the limit $\\tau\\to+\\infty$ the slowest vanishing exponential is that of $E_0$. In this way the ground state gets projected out of the initial state. Demanding that the state is normalized gives\n", - "\n", - "```{math}\n", - "\\lim_{\\tau->+\\infty} \\frac{e^{-\\tau \\hat{H}} \\ket{\\Psi}}{\\sqrt{\\braket{\\Psi|e^{-2\\tau \\hat{H}} |\\Psi}}} = \\lim_{\\tau->+\\infty} \\frac{\\sum_i c_i e^{-\\tau E_i} \\ket{E_i}}{\\sqrt{\\sum_i |c_i|^2 e^{-2\\tau E_i}}} = \\frac{c_0 }{|c_0|} \\ket{E_0}\n", - "```\n", - "which gives the ground state up to an irrelevant phase factor.\n", - "\n", - "(FinTemp_header)=\n", - "## Finite Temperature\n", - "\n", - "It is possible to use time evolution methods to construct thermal density operators i.e. $\\rho = \\frac{1}{Z}e^{-\\beta \\hat{H}}$ with $\\beta=1/T$ and $Z$ a normalization constant. The idea here is to write $\\rho$ as an MPO\n", - "\n", - "```{image} /_static/TimeEvolution/DensityMatrix.svg\n", - ":scale: 12%\n", - ":name: DensityMatrix\n", - ":align: center\n", - "```\n", - "with the constraint that \n", - "```{image} /_static/TimeEvolution/Mconstraint.svg\n", - ":scale: 12%\n", - ":name: Mconstraint\n", - ":align: center\n", - "```\n", - "Here the triangles represent an isometry that fuses the two legs together into a bigger leg. This particular form ensures that $\\rho$ is a positive semi-definite operator and thus physical {cite}`FiniteTemperature`. Note that for $d_k=1$ we obtain the density matrix of a pure state. We can represent $\\rho$ as the density matrix of pure state (i.e. a MPS) by introducing ancillas $\\{\\ket{a_k}\\}$ so that\n", - "\n", - "```{image} /_static/TimeEvolution/AncillaMPS.svg\n", - ":scale: 12%\n", - ":name: AncillaMPS\n", - ":align: center\n", - "```\n", - "\n", - "where the thicker physical legs indicate that they contain both the $s$ and $a$ degrees of freedom. One immediately sees that $\\rho=\\text{Tr}_a({\\ket{\\Psi}\\bra{\\Psi}})$. The thermal density operators $\\rho(\\beta)$ for any $\\beta$ can then be found by starting from the $\\beta=0$ state $\\rho(0)=\\mathbf{1}$ and performing imaginary time evolution\n", - "\n", - "```{math}\n", - "e^{-\\beta H} = (e^{-\\Delta \\tau \\hat{H}})^M\\rho(0)(e^{-\\Delta \\tau \\hat{H}})^M\n", - "```\n", - "with $\\Delta \\tau = \\frac{\\beta}{2M}$ {cite}`FiniteTemperature`. \n", - "\n", - "(code_header)=\n", - "## Code example: `MPSKit.timestep,make_time_mpo`\n", - "Below is some code on how MPSKit and MPSKitModels can be used out-of-the-box to perform time evolution." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "e4a13d27", - "metadata": {}, - "outputs": [], - "source": [ - "using TensorKit,MPSKit,MPSKitModels\n", - "using Plots" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "3e7bcc65", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "szt_tdvp - szt_tmpo = 2.0289947257001728e-5\n", - "Ebefore - Et_tmpo = 1.284094658693391e-5\n", - "Ebefore - Et_tdvp = -2.21243089626455e-7\n" - ] - } - ], - "source": [ - "H₀ = transverse_field_ising(;J=1.0,g=0.0);\n", - "\n", - "#Create a random MPS with physical bond dimension d=2 and virtual D=10 and optimize it\n", - "Ψ = InfiniteMPS([2],[10]);\n", - "(gs,envs) = find_groundstate(Ψ,H₀,VUMPS(;verbose=false));\n", - "\n", - "#Let's check some expectation values\n", - "sz_gs = expectation_value(gs,σᶻ()) # we have found the |↑↑...↑> or |↓↓...↓> state\n", - "E_gs = expectation_value(gs,H₀,envs)\n", - "\n", - "# time evolution Hamiltonian\n", - "Ht = transverse_field_ising(;J=1.0,g=0.25);\n", - "Ebefore = real(expectation_value(gs,Ht)[1])\n", - "dt = 0.1\n", - "\n", - "# Let's do one time step with TDVP\n", - "alg = TDVP();\n", - "envs = environments(gs,Ht);\n", - "(Ψt,envs) = timestep(gs,Ht,dt,alg,envs);\n", - "szt_tdvp = real(expectation_value(Ψt,σᶻ())[1]);\n", - "Et_tdvp = real(expectation_value(Ψt,Ht,envs)[1]);\n", - "\n", - "# let's make a first order time evolution mpo out of Ht\n", - "Ht_mpo = make_time_mpo(Ht, dt, TaylorCluster{1}());\n", - "\n", - "(Ψt,_) = approximate(gs, (Ht_mpo, gs), VUMPS(; verbose=false));\n", - "szt_tmpo = real(expectation_value(Ψt,σᶻ())[1]);\n", - "Et_tmpo = real(expectation_value(Ψt,Ht)[1]);\n", - "\n", - "@show szt_tdvp-szt_tmpo\n", - "@show Ebefore-Et_tmpo\n", - "@show Ebefore-Et_tdvp;" - ] - }, - { - "cell_type": "markdown", - "id": "7cc9d416", - "metadata": {}, - "source": [ - "We see that $<σᶻ(t)>$ for both methods after one timestep are reasonably close, but that the energy (density) is (more) conserved for the tdvp method.\n", - "If we were to do the time evolution for many timesteps and for different orders of time evolution MPO we would end up with the following plot\n", - "```{image} /_static/TimeEvolution/TimeEvolution.svg\n", - ":name: TimeResults\n", - ":align: center\n", - "```\n", - "We clearly see that increasing the order of the time evolution mpo improves the result." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "3cef197e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "true" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# We can also find the groundstate using imaginary time evolution\n", - "H = transverse_field_ising(;J=1.0,g=0.35);\n", - "\n", - "# Here we will do 1 iteration and see that the energy has dropped\n", - "Ψ = InfiniteMPS([2],[10]);\n", - "Ψenv = environments(Ψ,H) ;\n", - "Ebefore = real(expectation_value(Ψ,H,envs)[1]);\n", - "(Ψ,Ψenv) = timestep(Ψ,H,-1im*dt,TDVP(),Ψenv);\n", - "Eafter = real(expectation_value(Ψ,H,Ψenv)[1]);\n", - "\n", - "Eafter < Ebefore" - ] - }, - { - "cell_type": "markdown", - "id": "dbfa6c0f", - "metadata": {}, - "source": [ - "If we were to do this for many iterations the energy of the evolved state eventually reach that of the ground state as shown below.\n", - "```{image} /_static/TimeEvolution/ImagTimeEvolution.svg\n", - ":name: ImagTimeResults\n", - ":align: center\n", - "```" - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 239, - 245, - 278, - 287, - 299 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.md b/pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.md deleted file mode 100644 index b0be86c1..00000000 --- a/pr-preview/pr-27/_sources/4-Algorithms/TimeEvolutionAlgorithms.md +++ /dev/null @@ -1,304 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- -% put the references in -% test the code - -(time_evolution)= -# Time Evolution - -In this segment of the tutorial, we delve into some time evolution techniques for MPS. In particular we will focus on the [TDVP](TDVP_header) and [Time Evolution MPO](TMPO_header) methods. Another method (i)[TEBD](tebd) has already been explained in an earlier section. Following this we briefly explain how [imaginary time evolution](Imag_header) can be used to find ground states and how [thermal density matrices](FinTemp_header) can be simulated using MPS. -At the end of this section we offer some basic [code examples](code_header). - -In the case of quantum many body systems time evolution amounts to solving the time dependent Schrodinger equation - -```{math} -:label: Schrodinger -i \frac{\partial}{\partial t} \ket{\Psi(t)}= \hat{H}\ket{\Psi(t)} -``` - -for a given Hamiltonian $\hat{H}$ with initial condition $\ket{\Psi_0}=\ket{\Psi(t_0)}$. For a time independent Hamiltonian the solution is given by - -```{math} -\ket{\Psi(t)} = U(t)\ket{\Psi_0} = \exp(-it\hat{H})\ket{\Psi_0} -``` - -By approximating the time evolution operator $U$ in the Tensor Network language, we can also study real-time dynamics. - -```{note} -One should keep in mind that time evolution in general will increase the entanglement of the state so that in practice time evolution can only be done with Tensor Networks for relatively modest times. For example in case of a quench the entanglement for 1D systems grows as $S \sim t$ , (see {cite}`Calabrese_2005`) so that the bond dimension $D \sim \exp(at)$ in order to accurately follow the dynamics. -``` - -```{contents} Contents -:depth: 3 -``` - -(TDVP_header)= -## TDVP - -The Time-Dependent Variational Principle is an old concept, originaly developed by Dirac and Frenkel in the 1930's. The idea is to solve the schrodinger equation by minimizing -```{math} -\|i \frac{\partial}{\partial t} \ket{\Psi(t)}- \hat{H}\ket{\Psi(t)}\|^2 -``` -In the case of MPS, we can parametrize the state $\ket{\Psi(t)}$ by a set of time dependent matrices $\{A_1(t),A_2(t),\dots A_N(t)\}$ (where N is the system size for finiteMPS or the size of the unit cell for infinite MPS). In other words the state $\ket{\Psi(t)}$ lives in a manifold determined by these matrices, the MPS-manifold. Geometrically the solution of the minimization problem is given by the projection of the RHS of the schrodinger equation onto the MPS manifold -```{math} -:label: TDVPeq -\frac{d}{dt} \ket{\Psi(A)} = -i \hat{P}_{T\ket{\Psi(A)}} \hat{H}\ket{\Psi(A)} -``` -where $\hat{P}_{T\ket{\Psi(A)}}$ is the operator that projects the state onto the tangent space. As a consequence the time-evolving state will never leave the MPS manifold and parametrization in terms of $A(t)$ makes sense. One can in principle work out the above equation on the level of the $A$ matrices and try to solve the above equation. This gives a complicated set of (non-linear) equations that can be solved by one's favourite finite difference scheme, but requires the inversion of matrices with small singular values (and thus numerical instabilities) {cite}`haegeman2011time`, {cite}`HaegemanTDVP`. Instead, it turns out that a natural and inversion free way of solving this equation is possible if we use the gauge freedom of MPS. - -For a finite MPS, one can show that in the mixed gauge the action of the projection operator onto $\hat{H}\ket{\Psi(A)}$ is given by {cite}`vanderstraeten2019tangentspace` -```{image} /_static/TimeEvolution/TDVPProjector.svg -:scale: 12% -:name: TDVPProjector -:align: center -``` -The projector action consists of two sums, one where an effective Hamiltonian $\hat{H}_{\text{eff}}^{A_C}$ acts on the $A_C$ on site $n$ and one where $(\hat{H}_{\text{eff}}^{C})$ acts on the bond tensor $C$ to the right of it. The effective Hamiltonias are given by -```{image} /_static/TimeEvolution/Heffs.svg -:scale: 12% -:name: Heffs -:align: center -``` - -Thanks to the decomposition of $\hat{P}_{T\ket{\Psi(A)}} \hat{H}\ket{\Psi(A)}$ {eq}`TDVPeq` now resembles an ODE of the form -```{math} -:label: SplittingODE -\frac{d}{dt} Y = A(Y) + B(Y) -``` -This type of ODE can be solved by a splitting method {cite}`Lubich_2015` i.e. we solve $\frac{d}{dt} Y = A(Y)$ and $\frac{d}{dt} Y = B(Y)$ seperately and then combine the two results to obtain an approximate solution to {eq}`SplittingODE`. Applying this idea to {eq}`TDVPeq` we thus need to solve equations of the form -```{math} -\frac{d}{dt} \ket{\Psi(A)} = -i \hat{H}_{\text{eff}}^{A_C}[ A_C(n)] -``` -and -```{math} -\frac{d}{dt} \ket{\Psi(A)}= i \hat{H}_{\text{eff}}^{C}[ C(n)] -``` -These can be further simplified by noting that we can put all the time dependence inside one tensor, which we choose to be either $A_C(n)$ or $C(n)$. It is then sufficient to solve -```{math} -:label: ACdot -\dot{A}_C(n) = -i \hat{H}_{\text{eff}}^{A_C}[ A_C(n)] -``` -and - -```{math} -:label: Cdot -\dot{C}(n) = i \hat{H}_{\text{eff}}^{C}[ C(n)] -``` -for each site $n$ seperately. These can be integrated exactly to give - -```{math} -:label: ACdt -A_C(n,t+dt) = \exp(-idt \hat{H}_{\text{eff}}^{A_C}) A_C(n,t) - -``` - -and - -```{math} -:label: Cdt -C(n,t+dt) = \exp(idt \hat{H}_{\text{eff}}^{C}) C(n,t) -``` - -A natural way to combine the seperate solutions is to perform a sweep-like update. Starting from the first site we do: -```{admonition} TDVP algorithm for finite MPS - 1. Update $A_C(n)$ according to {eq}`ACdt`. - 2. QR the resulting new $A_C(n,t+dt)$ to get a new updated $A_L(n,t+dt)$ en $C(n,t+dt)$. - 3. Update the new $C(n,t+dt)$ via {eq}`Cdt` to get an $\tilde{C}$. - 4. Absorb $\tilde{C}$ into $A_R(n+1,t)$ to get a new $A_C(n+1,t)$ - 5. Repeat for n+1 - ``` - -At the end of the chain one only updates the $A_C$ since there is no $C$ there. - -Doing the above left to right sweep gives a first order integrator i.e. we have solved the time evolution up to order $\mathcal{O}(dt^2)$. Since the terms can be solved in any order we can also perform a reverse sweep i.e. working from right to left. Combining this with the left to right sweep yields a second order integrator (because the reverse sweep is the adjoint of the forwards sweep). - -For an infinite MPS one could also do a sweep-like update until some criteria converges to obtain new tensors $\{A_L,C,A_C,A_R\}$. However this can be costly since one has to iterate until convergence. Instead we can exploit the translational invariance of the system by demanding that $C=\tilde{C}$. Since $\tilde{C}=\exp(idt \hat{H}_{\text{eff}}^{C}) C(n,t+dt)$ we can turn things around and find - -```{math} -C(n,t+dt)=\exp(-idt \hat{H}_{\text{eff}}^{C}) C(n) -``` - -Given the newly found $C(n,t+dt)$ and $A_C(n,t+dt)$ one can determine a new $A_L$, giving a MPS for $t+dt$. - -```{note} -Unlike other time evolution methods, TDVP retains some of the physical -properties of the Schrodinger equation it is trying to solve. First of all, it acts trivial on (numerical) eigenstates of $\hat{H}$ since then $\hat{H}_{\text{eff}}^{A_C}[A_C] \propto A_C$ and the whole MPS picks up a phase equal to $e^{-i dtE}$. In addition it conserves energy and is time-reversible for time-independent Hamiltonians {cite}`vanderstraeten2019tangentspace`. -``` - -(TMPO_header)= -## Time Evolution MPO - -Perhaps the most natural way to perform the time evolution would be to write the time evolution operator as a MPO. The evolved state would then simply be the contraction of this MPO onto an MPS (see ref). The exponential implementing the time evolution can be approximated up to any order by its trunctated Taylor series - -```{math} -\exp(-\tau\hat{H}) = \hat{1} + \tau\hat{H} + \frac{\tau^2}{2}\hat{H}^2 + \mathcal{O}(\tau^3) -``` -The MPO approximation of the time evolution operator then boils down to implementing powers of $\hat{H}$ in an efficient (i.e. with the lowest possible MPO bond dimension) and size-extensive way {cite}`vandamme2023efficient`. For example, for a MPO Hamiltonian of the form -```{image} /_static/TimeEvolution/MPOHam.svg -:scale: 12% -:name: MPOHam -:align: center -``` - -which corresponds to the Hamiltonian -```{math} -\hat{H} = \sum_i \hat{D}_i + \hat{C}_i \hat{B}_{i+1} -``` -The first order approximation of $U=\exp(-\tau\hat{H})$ is given in MPO form by - -```{image} /_static/TimeEvolution/TimeMPO_1stOrder.svg -:scale: 12% -:name: FirstOrder -:align: center -``` - -Doing the matrix multiplcation (and remembering that for MPO the boundary conditions are so the we need to track the upper left expression) we find - -```{math} -\exp(-\tau\hat{H}) \approx \hat{1} + \tau \left(\sum_i D_i + C_i B_{i+1}\right) = \hat{1} + \tau \hat{H} -``` -as desired. - -The trick for generating the first order approximation involves removing the third "level" from the MPO form of H and multiplying with the appropriate factor of τ. This can be visualised as follows - -```{image} /_static/TimeEvolution/FirstOrderTrick.svg -:scale: 12% -:name: FirstOrderTrick -:align: center -``` - -This method can be extended to any desired order in $\tau$ as outlined in {cite}`vandamme2023efficient`. -%thus allowing us to represent $\exp(-\tau\hat{H})$ as an MPO. - -(Imag_header)= -## Imaginary time evolution - -Besides simulating dynamics, any time evolution method can also be used to find the groundstate of $\hat{H}$ by taking $t$ to be imaginary. The basis for this idea is the fact that - - -```{math} -\ket{\Psi_0} = \lim_{\tau->+\infty} \frac{e^{-\tau \hat{H}} \ket{\Psi}}{\sqrt{\braket{\Psi|e^{-2\tau \hat{H}} |\Psi}}} -``` - -where $\ket{\Psi}$ is any initial state not orthogonal to the ground state. Indeed expanding the initial state in the eigenbasis of $\hat{H}$ we have $\ket{\Psi} = \sum_i c_i \ket{E_i}$ with $\ket{E_i}$ the eigenstate corresponding to energy $E_i$ with ordering $E_0 < E_1 < E_2 < \dots$. Then - -```{math} -e^{-\tau \hat{H}} \ket{\Psi} = \sum_i c_i e^{-\tau E_i} \ket{E_i} -``` - -In taking the limit $\tau\to+\infty$ the slowest vanishing exponential is that of $E_0$. In this way the ground state gets projected out of the initial state. Demanding that the state is normalized gives - -```{math} -\lim_{\tau->+\infty} \frac{e^{-\tau \hat{H}} \ket{\Psi}}{\sqrt{\braket{\Psi|e^{-2\tau \hat{H}} |\Psi}}} = \lim_{\tau->+\infty} \frac{\sum_i c_i e^{-\tau E_i} \ket{E_i}}{\sqrt{\sum_i |c_i|^2 e^{-2\tau E_i}}} = \frac{c_0 }{|c_0|} \ket{E_0} -``` -which gives the ground state up to an irrelevant phase factor. - -(FinTemp_header)= -## Finite Temperature - -It is possible to use time evolution methods to construct thermal density operators i.e. $\rho = \frac{1}{Z}e^{-\beta \hat{H}}$ with $\beta=1/T$ and $Z$ a normalization constant. The idea here is to write $\rho$ as an MPO - -```{image} /_static/TimeEvolution/DensityMatrix.svg -:scale: 12% -:name: DensityMatrix -:align: center -``` -with the constraint that -```{image} /_static/TimeEvolution/Mconstraint.svg -:scale: 12% -:name: Mconstraint -:align: center -``` -Here the triangles represent an isometry that fuses the two legs together into a bigger leg. This particular form ensures that $\rho$ is a positive semi-definite operator and thus physical {cite}`FiniteTemperature`. Note that for $d_k=1$ we obtain the density matrix of a pure state. We can represent $\rho$ as the density matrix of pure state (i.e. a MPS) by introducing ancillas $\{\ket{a_k}\}$ so that - -```{image} /_static/TimeEvolution/AncillaMPS.svg -:scale: 12% -:name: AncillaMPS -:align: center -``` - -where the thicker physical legs indicate that they contain both the $s$ and $a$ degrees of freedom. One immediately sees that $\rho=\text{Tr}_a({\ket{\Psi}\bra{\Psi}})$. The thermal density operators $\rho(\beta)$ for any $\beta$ can then be found by starting from the $\beta=0$ state $\rho(0)=\mathbf{1}$ and performing imaginary time evolution - -```{math} -e^{-\beta H} = (e^{-\Delta \tau \hat{H}})^M\rho(0)(e^{-\Delta \tau \hat{H}})^M -``` -with $\Delta \tau = \frac{\beta}{2M}$ {cite}`FiniteTemperature`. - -(code_header)= -## Code example: `MPSKit.timestep,make_time_mpo` -Below is some code on how MPSKit and MPSKitModels can be used out-of-the-box to perform time evolution. - -```{code-cell} julia -using TensorKit,MPSKit,MPSKitModels -using Plots -``` - - -```{code-cell} julia -H₀ = transverse_field_ising(;J=1.0,g=0.0); - -#Create a random MPS with physical bond dimension d=2 and virtual D=10 and optimize it -Ψ = InfiniteMPS([2],[10]); -(gs,envs) = find_groundstate(Ψ,H₀,VUMPS(;verbose=false)); - -#Let's check some expectation values -sz_gs = expectation_value(gs,σᶻ()) # we have found the |↑↑...↑> or |↓↓...↓> state -E_gs = expectation_value(gs,H₀,envs) - -# time evolution Hamiltonian -Ht = transverse_field_ising(;J=1.0,g=0.25); -Ebefore = real(expectation_value(gs,Ht)[1]) -dt = 0.1 - -# Let's do one time step with TDVP -alg = TDVP(); -envs = environments(gs,Ht); -(Ψt,envs) = timestep(gs,Ht,dt,alg,envs); -szt_tdvp = real(expectation_value(Ψt,σᶻ())[1]); -Et_tdvp = real(expectation_value(Ψt,Ht,envs)[1]); - -# let's make a first order time evolution mpo out of Ht -Ht_mpo = make_time_mpo(Ht, dt, TaylorCluster{1}()); - -(Ψt,_) = approximate(gs, (Ht_mpo, gs), VUMPS(; verbose=false)); -szt_tmpo = real(expectation_value(Ψt,σᶻ())[1]); -Et_tmpo = real(expectation_value(Ψt,Ht)[1]); - -@show szt_tdvp-szt_tmpo -@show Ebefore-Et_tmpo -@show Ebefore-Et_tdvp; -``` -We see that $<σᶻ(t)>$ for both methods after one timestep are reasonably close, but that the energy (density) is (more) conserved for the tdvp method. -If we were to do the time evolution for many timesteps and for different orders of time evolution MPO we would end up with the following plot -```{image} /_static/TimeEvolution/TimeEvolution.svg -:name: TimeResults -:align: center -``` -We clearly see that increasing the order of the time evolution mpo improves the result. - -```{code-cell} julia -# We can also find the groundstate using imaginary time evolution -H = transverse_field_ising(;J=1.0,g=0.35); - -# Here we will do 1 iteration and see that the energy has dropped -Ψ = InfiniteMPS([2],[10]); -Ψenv = environments(Ψ,H) ; -Ebefore = real(expectation_value(Ψ,H,envs)[1]); -(Ψ,Ψenv) = timestep(Ψ,H,-1im*dt,TDVP(),Ψenv); -Eafter = real(expectation_value(Ψ,H,Ψenv)[1]); - -Eafter < Ebefore -``` -If we were to do this for many iterations the energy of the evolved state eventually reach that of the ground state as shown below. -```{image} /_static/TimeEvolution/ImagTimeEvolution.svg -:name: ImagTimeResults -:align: center -``` \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.ipynb b/pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.ipynb deleted file mode 100644 index a8eae305..00000000 --- a/pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.ipynb +++ /dev/null @@ -1,35 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "683da78e", - "metadata": {}, - "source": [ - "# Finite Entanglement Scaling\n", - "\n", - "Tutorial on finite entanglement scaling with uniform MPS, using [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl).\n", - "\n", - "*Coming soon*." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 11 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.md b/pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.md deleted file mode 100644 index e9e7d41d..00000000 --- a/pr-preview/pr-27/_sources/5-Tutorials/FiniteEntanglementScaling.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -# Finite Entanglement Scaling - -Tutorial on finite entanglement scaling with uniform MPS, using [MPSKit.jl](https://github.com/maartenvd/MPSKit.jl). - -*Coming soon*. diff --git a/pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.ipynb b/pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.ipynb deleted file mode 100644 index 2c460f46..00000000 --- a/pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.ipynb +++ /dev/null @@ -1,3608 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "540c7dca", - "metadata": {}, - "source": [ - "# A Symmetric Tensor Deep Dive: Constructing Your First Tensor Map\n", - "\n", - "In this tutorial, we will demonstrate how to construct specific `TensorMap`s which are\n", - "relevant to some common physical systems, with an increasing degree of complexity. We will\n", - "assume the reader has gone through the tutorial sections on\n", - "[tensor network theory](tensor_networks) and\n", - "[symmetries in tensor networks](symmetric_tensors). In going through these examples we aim\n", - "to provide a relatively gently introduction to the meaning of\n", - "[symmetry sectors](https://jutho.github.io/TensorKit.jl/latest/man/sectors/#ss_sectors) and\n", - "[vector spaces](https://jutho.github.io/TensorKit.jl/latest/man/sectors/#ss_rep) within the\n", - "context of [TensorKit.jl](https://jutho.github.io/TensorKit.jl/latest/),\n", - "[how to initialize a `TensorMap` over a given vector space](https://jutho.github.io/TensorKit.jl/latest/man/tensors/#ss_tensor_construction)\n", - "and finally how to manually set the data of a symmetric `TensorMap`. We will keep our\n", - "discussion as intuitive and simple as possible, only adding as many technical details as\n", - "strictly necessary to understand each example. When considering a different physical system\n", - "of interest, you should then be able to adatpt these recipes and the intuition behind them\n", - "to your specific problem at hand.\n", - "\n", - "```{note}\n", - "Many of these examples are already implemented in the\n", - "[MPSKitModels.jl package](https://github.com/maartenvd/MPSKitModels.jl), in which case we\n", - "basically provide a narrated walk-through of the corresponding code.\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "1cb3f9a8", - "metadata": {}, - "outputs": [], - "source": [ - "using LinearAlgebra\n", - "using TensorKit\n", - "using MPSKitModels\n", - "using WignerSymbols\n", - "using SUNRepresentations\n", - "using Test # for showcase testing" - ] - }, - { - "cell_type": "markdown", - "id": "d5448885", - "metadata": {}, - "source": [ - "## Level 0: The 1-Dimensional Ising Model\n", - "\n", - "As the most basic example, we will consider the\n", - "[1-dimensional transverse-field Ising model](https://en.wikipedia.org/wiki/Transverse-field_Ising_model),\n", - "whose Hamiltonian is given by\n", - "\n", - "```{math}\n", - ":label: eq:isingham\n", - "H = -J \\left (\\sum_{\\langle i, j \\rangle} Z_i Z_j + g \\sum_{i} X_i\\right).\n", - "```\n", - "\n", - "Here, $X_i$ and $Z_i$ are the\n", - "[Pauli operators](https://en.wikipedia.org/wiki/Pauli_matrices) acting on site $i$, and the\n", - "first sum runs over pairs of nearest neighbors $\\langle i, j \\rangle$. This model has a\n", - "global $\\mathbb{Z}_2$ symmetry, as it is invariant under the transformation $U H U^\\dagger =\n", - "H$ where the symmetry transformation $U$ is given by a global spin flip,\n", - "\n", - "```{math}\n", - ":label: eq:z2gen\n", - "U = \\prod_i X_i.\n", - "```\n", - "\n", - "We will circle back to the implications of this symmetry later.\n", - "\n", - "As a warmup we will implement the Hamiltonian {eq}`eq:isingham` in the standard way by\n", - "encoding the matrix elements of the single-site operators $X$ and $Z$ into aan array of\n", - "complex numbers, and then combine them in a suitable way to get the Hamiltonian terms.\n", - "Instead of using plain Julia arrays, we will use a representation in terms of `TensorMap`s\n", - "over complex vector spaces. These will essentially just be wrappers around base arrays at\n", - "this point, but their construction requires some consideration of the notion of *spaces*,\n", - "which generalize the notion of `size` for arrays. Each of the operators $X$ and $Z$ acts on\n", - "a local 2-dimensional complex vector space. In the context of TensorKit.jl such a space can\n", - "be represented as `ComplexSpace(2)`, or using the convenient shorthand `ℂ^2`. A single-site\n", - "Pauli operator maps from a domain physical space to a codomain physical space, and can\n", - "therefore be represented as instances of a `TensorMap(..., ℂ^2 ← ℂ^2)`. The corresponding\n", - "data can then be filled in by hand according to the familiar Pauli matrices in the following\n", - "way:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "b2228c5a", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -1.0 + 0.0im -0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im -1.0 + 0.0im\n", - " 0.0 + 0.0im -0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im -0.0 + 0.0im\n", - " -0.0 + 0.0im 1.0 - 0.0im\n" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# initialize numerical data for Pauli matrices\n", - "x_mat = ComplexF64[0 1; 1 0]\n", - "z_mat = ComplexF64[1 0; 0 -1]\n", - "\n", - "# construct physical Hilbert space\n", - "V = ℂ^2\n", - "\n", - "# construct the physical operators as TensorMaps\n", - "X = TensorMap(x_mat, V ← V)\n", - "Z = TensorMap(z_mat, V ← V)\n", - "\n", - "# combine single-site operators into two-site operator\n", - "ZZ = Z ⊗ Z" - ] - }, - { - "cell_type": "markdown", - "id": "52f54553", - "metadata": {}, - "source": [ - "We can easily verify that our operators have the desired form by checking their data in the\n", - "computational basis:" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "e1302f9e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((ℂ^2 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^2)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " -1.0 + 0.0im -0.0 + 0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0 + 0.0im -1.0 + 0.0im\n", - " 0.0 + 0.0im -0.0 + 0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0 + 0.0im -0.0 + 0.0im\n", - " -0.0 + 0.0im 1.0 - 0.0im\n" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ZZ" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "f1da9254", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(ℂ^2 ← ℂ^2):\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " 1.0 + 0.0im 0.0 + 0.0im\n" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X" - ] - }, - { - "cell_type": "markdown", - "id": "2b4dbc4f", - "metadata": {}, - "source": [ - "```{note}\n", - "In order to combine these local operators into a concrete Hamiltonian that can be used in\n", - "[MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) we can make use of the convenient\n", - "`@mpoham` macro exported by\n", - "[MPSKitModels.jl](https://github.com/maartenvd/MPSKitModels.jl). For an infinite translation\n", - "invariant Ising chain, we can use the following piece of code which produces the Hamiltonian\n", - "in an interesting-looking form (see MPSKit.jl for details on this format).\n", - "```" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "c173655a", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "MPSKit.MPOHamiltonian{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}(MPSKit.SparseMPOSlice{ComplexSpace, TrivialTensorMap{ComplexSpace, 2, 2, Matrix{ComplexF64}}, ComplexF64}[[TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " -1.4142135623730945 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.414213562373095 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " -0.7071067811865476 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.7071067811865475 + 0.0im\n", - "; TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 0.0 + 0.0im\n", - " TensorMap((ℂ^1 ⊗ ℂ^2) ← (ℂ^2 ⊗ ℂ^1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im 0.0 + 0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0 + 0.0im 1.0 + 0.0im\n", - "]])" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "lattice = InfiniteChain(1)\n", - "H = @mpoham begin\n", - " sum(nearest_neighbours(lattice)) do (i, j)\n", - " return ZZ{i,j}\n", - " end + sum(vertices(lattice)) do i\n", - " return X{i}\n", - " end\n", - "end" - ] - }, - { - "cell_type": "markdown", - "id": "863873c3", - "metadata": {}, - "source": [ - "## Level 1: The $\\mathbb{Z}_2$-symmetric Ising Model\n", - "\n", - "### The irrep basis and block sparsity\n", - "\n", - "Let us now return to the global $\\mathbb{Z}_2$ invariance of the Hamiltonian\n", - "{eq}`eq:isingham`, and consider what this implies for its local terms $ZZ$ and $X$.\n", - "Representing these operators as `TensorMap`s, the invariance of $H$ under a global\n", - "$\\mathbb{Z}_2$ transformation implies the following identities for the local tensors:\n", - "\n", - "```{figure} ../_static/SymmetricTensors/ZZX_symm.svg\n", - ":scale: 12%\n", - ":name: ZZX_symm\n", - ":align: center\n", - "```\n", - "\n", - "Recalling the [discussion on symmetries in tensor networks](symmetric_tensors), we recognize\n", - "that these identitities precisely mean that these local tensors transform trivially under a\n", - "tensor product representation of $\\mathbb{Z}_2$. This implies that, in an appropriate basis\n", - "for the local physical vector space, our local tensors would become block-diagonal where\n", - "each so-called *matrix block* is labeled by a $\\mathbb{Z}_2$ irrep. From the same\n", - "discussion, we recall that the appropriate local basis transformation is precisely the one\n", - "that brings the local representation $X$ into block-diagonal form. Clearly, this\n", - "transformation is nothing more than the Hadamard transformation which maps the computational\n", - "basis of $Z$ eigenstates $\\{\\ket{\\uparrow}, \\ket{\\downarrow}\\}$ to that of the $X$\n", - "eigenstates $\\{\\ket{+}, \\ket{-}\\}$ defined as $\\ket{+} = \\frac{\\ket{\\uparrow} +\n", - "\\ket{\\downarrow}}{\\sqrt{2}}$ and $\\ket{-} = \\frac{\\ket{\\uparrow} -\n", - "\\ket{\\downarrow}}{\\sqrt{2}}$. In the current context, this basis is referred to as the\n", - "*irrep basis* of $\\mathbb{Z}_2$, where the local basis state $\\ket{+}$ corresponds to the\n", - "trivial representation of $\\mathbb{Z}_2$ while $\\ket{-}$ corresponds to the sign\n", - "representation.\n", - "\n", - "Next, let's make the statement that 'the matrix blocks of the local tensors are labeled by\n", - "$\\mathbb{Z}_2$ irreps' more concrete. To this end, consider the action of $ZZ$ in the irrep\n", - "basis, which is given by the four nonzero matrix elements\n", - "\n", - "```{math}\n", - "\\begin{align}\n", - "ZZ : \\mathbb C^2 \\otimes \\mathbb C^2 &\\to \\mathbb C^2 \\otimes \\mathbb C^2 : \\\\\n", - "\\ket{+} \\otimes \\ket{+} &\\mapsto \\ket{-} \\otimes \\ket{-}, \\\\\n", - "\\ket{+} \\otimes \\ket{-} &\\mapsto \\ket{-} \\otimes \\ket{+}, \\\\\n", - "\\ket{-} \\otimes \\ket{+} &\\mapsto \\ket{+} \\otimes \\ket{-}, \\\\\n", - "\\ket{-} \\otimes \\ket{-} &\\mapsto \\ket{+} \\otimes \\ket{+}.\n", - "\\end{align}\n", - "```\n", - "\n", - "If we denote the trivial $\\mathbb{Z}_2$ irrep by $'0'$, corresponding to a local $\\ket{+}$\n", - "state, and the sign irrep by $'1'$, corresponding to a local $\\ket{-}$ state, and recall\n", - "that in this notation the fusion rules of $\\mathbb{Z}_2$ are given by addition modulo 2, we\n", - "can associate each of the above matrix elements to a so-called *fusion tree* of\n", - "$\\mathbb{Z}_2$ irreps with a corresponding coefficient of 1,\n", - "\n", - "```{figure} ../_static/SymmetricTensors/Z2_fusiontrees.svg\n", - ":scale: 12%\n", - ":name: Z2_fusiontrees\n", - ":align: center\n", - "```\n", - "\n", - "From this we can observe our previous statement very clearly: the $ZZ$ operator indeed\n", - "consists of two distinct two-dimensional matrix blocks, each of which are labeled by the\n", - "value of the *coupled irrep* on the middle line of each fusion tree. The first block\n", - "corresponds to the even coupled irrep '0', and acts within the two-dimensional subspace\n", - "spanned by $\\{\\ket{+,+}, \\ket{-,-}\\}$, while the second block corresponds to the odd coupled\n", - "irrep '1', and acts within the two-dimensional subspace spanned by $\\{\\ket{+,-},\n", - "\\ket{-,+}\\}$. In TensorKit.jl, this block-diagonal structure of a symmetric tensor is\n", - "explicitly encoded into its representation as a `TensorMap`, where only the matrix blocks\n", - "corresponding to each coupled irrep are stored.\n", - "\n", - "For our current purposes however, we never really need to explicitly consider these matrix\n", - "blocks. Indeed, when constructing a `TensorMap` it is sufficient to set its data by manually\n", - "assigning a matrix element to each [fusion tree of the form above](Z2_fusiontrees) labeled\n", - "by a given tensor product of irreps. This matrix element is then automatically inserted into\n", - "the appropriate matrix block. So, for the purpose of this tutorial **we will interpret a\n", - "symmetric `TensorMap` simply as a list of fusion trees, to each of which corresponds a\n", - "certain reduced matrix element**.\n", - "\n", - "```{note}\n", - "In general, such a reduced matrix element is not necessarily a scalar, but rather an array\n", - "whose size is determined by the degeneracy of the irreps in the codomain and domain of the\n", - "fusion tree. For this reason, a reduced matrix element associated to a given fusion tree is\n", - "also referred to as an *array block*. In the following we will use terms 'reduced matrix\n", - "element', 'array block' or just 'block' interchangeably. However, it should be remembered\n", - "that these are distinct from the matrix blocks in the block-diagonal decomposition of the\n", - "tensor.\n", - "```\n", - "\n", - "\n", - "(fusion_trees)=\n", - "### Fusion trees and how to use them\n", - "\n", - "This view of the underlying symmetry structure in terms of fusion trees and corresponding\n", - "array blocks is a very convenient way of working with the `TensorMap` type. Consider a\n", - "generic fusion tree of the form\n", - "\n", - "```{figure} ../_static/SymmetricTensors/fusiontree.svg\n", - ":scale: 12%\n", - ":name: fusiontree\n", - ":align: center\n", - "```\n", - "\n", - "which can be used to label a block of a `TensorMap` corresponding to a two-site operator.\n", - "This object should actually be seen as a *pair of fusion trees*. The first member of the\n", - "pair, related to the codomain of the `TensorMap`, is referred to as the *splitting tree* and\n", - "encodes how the *coupled charge* $c$ splits into the *uncoupled charges* $s_1$ and $s_2$.\n", - "The second member of the pair, related to the domain of the `TensorMap`, is referred to as\n", - "the *fusion tree* and encodes how the uncoupled charges $f_1$ and $f_2$ fuse to the coupled\n", - "charge $c$. Both the splitting and fusion tree can be represented as a\n", - "[`TensorKit.FusionTree`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.FusionTree)\n", - "instance. You will find such a `FusionTree` has the following properties encoded into its\n", - "fields:\n", - "\n", - "- `uncoupled::NTuple{N,I}`: a list of `N` uncoupled charges of type `I<:Sector`\n", - "- `coupled::I`: a single coupled charge of type `I<:Sector`\n", - "- `isdual::NTuple{N,Bool}`: a list of booleans indicating whether the corresponding uncoupled charge is dual\n", - "- `innerlines::NTuple{M,I}`: a list of inner lines of type `I<:Sector` of length `M = N - 2`\n", - "- `vertices::NTuple{L,T}`: list of fusion vertex labels of type `T` and length `L = N - 1`\n", - "\n", - "For our current application only `uncoupled` and `coupled` are relevant, since\n", - "$\\mathbb{Z}_2$ irreps are self-dual and have Abelian fusion rules. We will come back to\n", - "these other properties when discussion more involved applications. Given some `TensorMap`,\n", - "the method `TensorKit.fusiontrees(t::TensorMap)` returns an iterator over all pairs of\n", - "splitting and fusion trees that label the blocks of `t`.\n", - "\n", - "We can now put this into practice by directly constructing the $ZZ$ operator in the irrep\n", - "basis as a $\\mathbb{Z}_2$-symmetric `TensorMap`. We will do this in three steps:\n", - "\n", - "- First we construct the physical space at each site as a $\\mathbb{Z}_2$-graded vector space.\n", - "- Then we initialize an empty `TensorMap` with the correct domain and codomain vector spaces built from the previously constructed physical space.\n", - "- And finally we iterate over all splitting and fusion tree pairs and manually fill in the corresponding nonzero blocks of the operator.\n", - "\n", - "After the basis transform to the irrep basis, we can view the two-dimensional complex\n", - "physical vector space we started with as being spanned by the trivial and sign irrep of\n", - "$\\mathbb{Z}_2$. In the language of TensorKit.jl, this can be implemented as a `Z2Space`, an\n", - "alias for a\n", - "$\\mathbb{Z}_2$-[graded vector space](https://jutho.github.io/TensorKit.jl/latest/lib/spaces/#TensorKit.GradedSpace)\n", - "`Vect[Z2Irrep]`, which contains the trivial irrep `Z2Irrep(0)` with degeneracy 1 and the\n", - "sign irrep `Z2Irrep(1)` with degeneracy 1. We can define this space in the following way and\n", - "check its dimension:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "74c13a23", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = Z2Space(0 => 1, 1 => 1)\n", - "dim(V)" - ] - }, - { - "cell_type": "markdown", - "id": "a80e98df", - "metadata": {}, - "source": [ - "Given this physical space, we can initialize the $ZZ$ operator as an empty `TensorMap` with\n", - "the appropriate structure." - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "55010de8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1)) ← (Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1))):\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ZZ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)" - ] - }, - { - "cell_type": "markdown", - "id": "7f60215b", - "metadata": {}, - "source": [ - "The output of this command again demonstrates the underlying structure of a symmetric\n", - "tensor. We see that all eight valid fusion trees with two incoming irreps and two outgoing\n", - "irreps [of the type above](fusiontree) are listed with their corresponding block data. Each\n", - "of these blocks is an array of shape $(1, 1, 1, 1)$ since each irrep occuring in the space\n", - "$V$ has degeneracy 1. Using the `fusiontrees` method and the fact that we can index a\n", - "`TensorMap` using a splitting/fusion tree pair, we can now fill in the nonzero blocks of the\n", - "operator by observing that the $ZZ$ operator flips the irreps of the uncoupled charges in\n", - "the domain with respect to the codomain, as shown in the diagrams above. Flipping a given\n", - "`Z2Irrep` in the codomain can be implemented by fusing them with the sign irrep\n", - "`Z2Irrep(1)`, giving:" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "f7454697", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1)) ← (Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1))):\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1), Irrep[ℤ₂](0)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0), Irrep[ℤ₂](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "flip_charge(charge::Z2Irrep) = only(charge ⊗ Z2Irrep(1))\n", - "for (s, f) in fusiontrees(ZZ)\n", - " if s.uncoupled == map(flip_charge, f.uncoupled)\n", - " ZZ[s, f] .= 1\n", - " end\n", - "end\n", - "ZZ" - ] - }, - { - "cell_type": "markdown", - "id": "f5f1a705", - "metadata": {}, - "source": [ - "Indeed, the resulting `TensorMap` exactly encodes the matrix elements of the $ZZ$ operator\n", - "shown in {ref}`the diagrams above `. The $X$ operator can be constructed in\n", - "a similar way. Since it is by definition diagonal in the irrep basis with blocks directly\n", - "corresponding to the trivial and sign irrep, its construction is particularly simple:" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "5c20f0c9", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Rep[ℤ₂](0=>1, 1=>1) ← Rep[ℤ₂](0=>1, 1=>1)):\n", - "* Data for sector (Irrep[ℤ₂](0),) ← (Irrep[ℤ₂](0),):\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[ℤ₂](1),) ← (Irrep[ℤ₂](1),):\n", - " -1.0 + 0.0im\n" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X = TensorMap(zeros, ComplexF64, V ← V)\n", - "for (s, f) in fusiontrees(X)\n", - " if only(f.uncoupled) == Z2Irrep(0)\n", - " X[s, f] .= 1\n", - " else\n", - " X[s, f] .= -1\n", - " end\n", - "end\n", - "X" - ] - }, - { - "cell_type": "markdown", - "id": "7a9c77f1", - "metadata": {}, - "source": [ - "Given these local operators, we can use them to construct the full manifestly\n", - "$\\mathbb{Z}_2$-symmetric Hamiltonian.\n", - "\n", - "```{note}\n", - "An important observation is that when explicitly imposing the $\\mathbb{Z}_2$ symmetry we\n", - "directly constructed the full $ZZ$ operator as a single symmetric tensor. This in contrast\n", - "to the case without symmetries, where we constructed a single-site $Z$ operator and then\n", - "combined them into a two-site operator. Clearly this can no longer be done when imposing\n", - "$\\mathbb{Z}_2$, since a single $Z$ is not invariant under conjugation with the symmetry\n", - "operator $X$. One might wonder whether it is still possible to construct a two-site\n", - "Hamiltonian term by combining local objects. This is possible if one introduces an auxiliary\n", - "index on the local tensors that carries a non-trivial charge. The intuition behind this will\n", - "become more clear in the next example.\n", - "```\n", - "\n", - "\n", - "## Level 2: The $\\mathrm{U}(1)$ Bose-Hubbard Model\n", - "\n", - "For our next example we will consider the\n", - "[Bose-Hubbard model](https://en.wikipedia.org/wiki/Bose%E2%80%93Hubbard_model), which\n", - "describes interacting bosons on a lattice. The Hamiltonian of this model is given by\n", - "```{math}\n", - ":label: eq:bhh\n", - "H = -t \\sum_{\\langle i,j \\rangle} \\left( a_{i}^+ a_{j}^- + a_{i}^- a_{j}^+ \\right) - \\mu \\sum_i N_i + \\frac{U}{2} \\sum_i N_i(N_i - 1).\n", - "```\n", - "This Hamiltonian is defined on the [Fock space](fock_space) associated to a chain of bosons,\n", - "where the action bosonic creation, annihilation and number operators $a^+$, $a^-$ and $N =\n", - "a^+ a^-$ in the local occupation number basis is given by\n", - "```{math}\n", - ":label: eq:bosonopmatel\n", - "\\begin{align}\n", - "a^+ \\ket{n} &= \\sqrt{n + 1} \\ket{n + 1} \\\\\n", - "a^- \\ket{n} &= \\sqrt{n} \\ket{n - 1} \\\\\n", - "N \\ket{n} &= n \\ket{n}\n", - "\\end{align}\n", - "```\n", - "Their bosonic nature can be summarized by the familiar the commutation relations\n", - "```{math}\n", - "\\begin{align*}\n", - "\\left[a_i^-, a_j^-\\right] &= \\left[a_i^+, a_j^+\\right] = 0 \\\\\n", - "\\left[a_i^-, a_j^+\\right] &= \\delta_{ij} \\\\\n", - "\\left[N, a^+\\right] &= a^+ \\\\\n", - "\\left[N, a^-\\right] &= -a^- \\\\\n", - "\\end{align*}\n", - "```\n", - "\n", - "This Hamiltonian is invariant under conjugation by the global particle number operator, $U H\n", - "U^\\dagger = H$, where\n", - "```{math}\n", - "U = \\sum_i N_i\n", - "```\n", - "This invariance corresponds to a $\\mathrm{U}(1)$ particle number symmetry, which can again\n", - "be manifestly imposed when constructing the Hamiltonian terms as `TensorMap`s. From the\n", - "representation theory of $\\mathrm{U}(1)$ we know that it's irreps are all one-dimensional\n", - "and can be labeled by integers, where the fusion of two irreps is given by addition.\n", - "\n", - "\n", - "### Directly Constructing the Hamiltonian Terms\n", - "\n", - "We recall from our discussion on the $\\mathbb{Z}_2$ symmetric Ising model that, in order to\n", - "construct the Hamiltonian terms as symmetric tensors, we should work in the irrep basis\n", - "where the symmetry transformation is block diagonal. In the current case, the symmetry\n", - "operation is the particle number operator, which is already diagonal in the occupation\n", - "number basis. Therefore, we don't need an additional local basis transformation this time,\n", - "and can just observe that each local basis state can be identified with the $\\mathrm{U}(1)$\n", - "irrep associated to the corresponding occupation number.\n", - "\n", - "Following the same approach as before, we first write down the action of the Hamiltonian\n", - "terms in the irrep basis:\n", - "\n", - "```{math}\n", - "\\begin{align*}\n", - "a_i^+ a_j^- \\ket{n_i, n_j} &= \\sqrt{(n_i + 1)n_j} \\ket{n_i + 1, n_j - 1} \\\\\n", - "a_i^- a_j^+ \\ket{n_i, n_j} &= \\sqrt{n_i(n_j + 1)} \\ket{n_i - 1, n_j + 1} \\\\\n", - "N \\ket{n} &= n \\ket{n}\n", - "\\end{align*}\n", - "```\n", - "\n", - "It is then a simple observation that these matrix elements are exactly captured by the\n", - "following $\\mathrm{U}(1)$ fusion trees with corresponding block values:\n", - "\n", - "```{figure} ../_static/SymmetricTensors/U1_fusiontrees.svg\n", - ":scale: 12%\n", - ":name: U1_fusiontrees\n", - "```\n", - "\n", - "This gives us all the information necessary to construct the corresponding `TensorMap`s. We\n", - "follow the same steps as outlined in the previous example, starting with the construction of\n", - "the physical space. This will now be a $\\mathrm{U}(1)$ graded vector space `U1Space`, where\n", - "each basis state $\\ket{n}$ in the occupation number basis is represented by the\n", - "corresponding $\\mathrm{U}(1)$ irrep `U1Irrep(n)` with degeneracy 1. While this physical\n", - "space is in principle infinite dimensional, we will impose a cutoff in occupation number at\n", - "a maximum of 5 bosons per site, giving a 6-dimensional vector space:" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "058e98a0", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cutoff = 5\n", - "V = U1Space(n => 1 for n in 0:cutoff)" - ] - }, - { - "cell_type": "markdown", - "id": "686075e1", - "metadata": {}, - "source": [ - "We can now initialize the $a^+ a^-$, $a^- a^+$ and $N$ operators as empty `TensorMap`s with\n", - "the correct domain and codomain vector spaces, and fill in the nonzero blocks associated to\n", - "[the fusion trees shown above](U1_fusiontrees). To do this we need access to the integer\n", - "label of the $\\mathrm{U}(1)$ irreps in the fusion and splitting trees, which can be accessed\n", - "through the `charge` field of the `U1Irrep` type." - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "473c6c97", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)) ← (Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1))):\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 1.4142135623730951 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 1.4142135623730951 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 1.7320508075688772 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 1.7320508075688772 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 2.449489742783178 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 2.449489742783178 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 3.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 2.23606797749979 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 2.23606797749979 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 2.8284271247461903 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 2.8284271247461903 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 3.4641016151377544 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 3.4641016151377544 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 3.1622776601683795 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 3.1622776601683795 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 3.872983346207417 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 3.872983346207417 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 4.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 4.47213595499958 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 4.47213595499958 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 5.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "a⁺a⁻ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(a⁺a⁻)\n", - " if s.uncoupled[1] == only(f.uncoupled[1] ⊗ U1Irrep(1)) && s.uncoupled[2] == only(f.uncoupled[2] ⊗ U1Irrep(-1))\n", - " a⁺a⁻[s, f] .= sqrt(s.uncoupled[1].charge * f.uncoupled[2].charge)\n", - " end\n", - "end\n", - "a⁺a⁻" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "6ab8fcb7", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)) ← (Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1))):\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 1.4142135623730951 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 1.4142135623730951 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 1.7320508075688772 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 1.7320508075688772 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 2.449489742783178 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 2.449489742783178 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 2.23606797749979 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 2.8284271247461903 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](0), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 2.8284271247461903 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 3.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](0)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](0), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 2.23606797749979 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](1)):\n", - "[:, :, 1, 1] =\n", - " 3.1622776601683795 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 3.4641016151377544 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 3.1622776601683795 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](1), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](1)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 3.4641016151377544 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](2), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 4.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](4), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 3.872983346207417 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](3), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 3.872983346207417 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](2)) ← (Irrep[U₁](5), Irrep[U₁](2)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](5), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](3)):\n", - "[:, :, 1, 1] =\n", - " 4.47213595499958 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](3), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](3), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](3), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](3)) ← (Irrep[U₁](4), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 4.47213595499958 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](5), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](4)):\n", - "[:, :, 1, 1] =\n", - " 5.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](4)) ← (Irrep[U₁](4), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4), Irrep[U₁](5)) ← (Irrep[U₁](4), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5), Irrep[U₁](5)) ← (Irrep[U₁](5), Irrep[U₁](5)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "a⁻a⁺ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(a⁻a⁺)\n", - " if s.uncoupled[1] == only(f.uncoupled[1] ⊗ U1Irrep(-1)) && s.uncoupled[2] == only(f.uncoupled[2] ⊗ U1Irrep(1))\n", - " a⁻a⁺[s, f] .= sqrt(f.uncoupled[1].charge * s.uncoupled[2].charge)\n", - " end\n", - "end\n", - "a⁻a⁺" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "fc37d797", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ← Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)):\n", - "* Data for sector (Irrep[U₁](0),) ← (Irrep[U₁](0),):\n", - " 0.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1),) ← (Irrep[U₁](1),):\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2),) ← (Irrep[U₁](2),):\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](3),) ← (Irrep[U₁](3),):\n", - " 3.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](4),) ← (Irrep[U₁](4),):\n", - " 4.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5),) ← (Irrep[U₁](5),):\n", - " 5.0 + 0.0im\n" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "N = TensorMap(zeros, ComplexF64, V ← V)\n", - "for (s, f) in fusiontrees(N)\n", - " N[s, f] .= f.uncoupled[1].charge\n", - "end\n", - "N" - ] - }, - { - "cell_type": "markdown", - "id": "3d37d70e", - "metadata": {}, - "source": [ - "### Creation and Annihilation Operators as Symmetric Tensors\n", - "\n", - "Just as in the $\\mathbb{Z}_2$ case, it is obvious that we cannot directly construct the\n", - "creation and annihilation operators as instances of a `TensorMap(..., V ← V)` since they are\n", - "not invariant under conjugation by the symmetry operator. However, it is possible to\n", - "construct them as `TensorMap`s using an *auxiliary vector space*, based on the following\n", - "intuition. The creation operator $a^+$ violates particle number conservation by mapping the\n", - "occupation number $n$ to $n + 1$. From the point of view of representation theory, this\n", - "process can be thought of as the *fusion* of an `U1Irrep(n)` with an `U1Irrep(1)`, naturally\n", - "giving the fusion product `U1Irrep(n + 1)`. This means we can represent $a^+$ as a\n", - "`TensorMap(..., V ← V ⊗ A)`, where the auxiliary vector space `A` contains the $+1$ irrep\n", - "with degeneracy 1, `A = U1Space(1 => 1)`. Similarly, the decrease in occupation number when\n", - "acting with $a^-$ can be thought of as the *splitting* of an `U1Irrep(n)` into an\n", - "`U1Irrep(n - 1)` and an `U1Irrep(1)`, leading to a representation in terms of a\n", - "`TensorMap(..., A ⊗ V ← V)`. Based on these observations, we can represent the matrix\n", - "elements {eq}`eq:bosonopmatel` as blocks labeled by the $\\mathrm{U}(1)$ fusion trees\n", - "\n", - "```{figure} ../_static/SymmetricTensors/bosonops.svg\n", - ":scale: 12%\n", - ":name: bosonops\n", - "```\n", - "\n", - "We can then combine these operators to get the appropriate Hamiltonian terms,\n", - "\n", - "```{figure} ../_static/SymmetricTensors/bosonham.svg\n", - ":scale: 12%\n", - ":name: bosonham\n", - "```\n", - "\n", - "```{note}\n", - "Although we have made a suggestive distinction between the 'left' and 'right' versions of\n", - "the operators $a_L^\\pm$ and $a_R^\\pm$, one can actually be obtained from the other by\n", - "permuting the physical and auxiliary indices of the corresponding `TensorMap`s. This\n", - "permutation has no effect on the actual array blocks of the tensors due to the\n", - "[bosonic braiding style](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.BraidingStyle)\n", - "of $\\mathrm{U}(1)$ irreps, so the left and right operators can in essence be seen as the\n", - "'same' tensors. This is no longer the case when considering fermionic systems, where\n", - "permuting indices can in fact change the array blocks as we will see next. As a consequence,\n", - "it is much less clear how to construct two-site symmetric operators in terms of local\n", - "symmetric objects.\n", - "```\n", - "\n", - "The explicit construction then looks something like" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "421eabfa", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Rep[U₁](1=>1)" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = U1Space(1 => 1)" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "11335b56", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ← (Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1) ⊗ Rep[U₁](1=>1))):\n", - "* Data for sector (Irrep[U₁](1),) ← (Irrep[U₁](0), Irrep[U₁](1)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](2),) ← (Irrep[U₁](1), Irrep[U₁](1)):\n", - "[:, :, 1] =\n", - " 1.4142135623730951 + 0.0im\n", - "* Data for sector (Irrep[U₁](3),) ← (Irrep[U₁](2), Irrep[U₁](1)):\n", - "[:, :, 1] =\n", - " 1.7320508075688772 + 0.0im\n", - "* Data for sector (Irrep[U₁](4),) ← (Irrep[U₁](3), Irrep[U₁](1)):\n", - "[:, :, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](5),) ← (Irrep[U₁](4), Irrep[U₁](1)):\n", - "[:, :, 1] =\n", - " 2.23606797749979 + 0.0im\n" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "a⁺ = TensorMap(zeros, ComplexF64, V ← V ⊗ A)\n", - "for (s, f) in fusiontrees(a⁺)\n", - " a⁺[s, f] .= sqrt(f.uncoupled[1].charge+1)\n", - "end\n", - "a⁺" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "d60ee0a5", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[U₁](1=>1) ⊗ Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)) ← Rep[U₁](0=>1, 1=>1, 2=>1, 3=>1, 4=>1, 5=>1)):\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](0)) ← (Irrep[U₁](1),):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](1)) ← (Irrep[U₁](2),):\n", - "[:, :, 1] =\n", - " 1.4142135623730951 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](2)) ← (Irrep[U₁](3),):\n", - "[:, :, 1] =\n", - " 1.7320508075688772 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](3)) ← (Irrep[U₁](4),):\n", - "[:, :, 1] =\n", - " 2.0 + 0.0im\n", - "* Data for sector (Irrep[U₁](1), Irrep[U₁](4)) ← (Irrep[U₁](5),):\n", - "[:, :, 1] =\n", - " 2.23606797749979 + 0.0im\n" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "a⁻ = TensorMap(zeros, ComplexF64, A ⊗ V ← V)\n", - "for (s, f) in fusiontrees(a⁻)\n", - " a⁻[s, f] .= sqrt(f.uncoupled[1].charge)\n", - "end\n", - "a⁻" - ] - }, - { - "cell_type": "markdown", - "id": "1c4ab8ad", - "metadata": {}, - "source": [ - "It is then simple to check that this is indeed what we expect." - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "5217dc88", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\u001b[32m\u001b[1mTest Passed\u001b[22m\u001b[39m" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "@tensor a⁺a⁻_bis[-1 -2; -3 -4] := a⁺[-1; -3 1] * a⁻[1 -2; -4]\n", - "@tensor a⁻a⁺_bis[-1 -2; -3 -4] := a⁻[1 -1; -3] * a⁺[-2; -4 1]\n", - "@tensor N_bis[-1 ; -2] := a⁺[-1; 1 2] * a⁻[2 1; -2]\n", - "\n", - "@test a⁺a⁻_bis ≈ a⁺a⁻ atol=1e-14\n", - "@test a⁻a⁺_bis ≈ a⁻a⁺ atol=1e-14\n", - "@test N_bis ≈ N atol=1e-14" - ] - }, - { - "cell_type": "markdown", - "id": "7687fa83", - "metadata": {}, - "source": [ - "```{note}\n", - "From the construction of the Hamiltonian operators\n", - "[in terms of creation and annihilation operators](bosonham) we clearly see that they are\n", - "invariant under a transformation $a^\\pm \\to e^{\\pm i\\theta} a^\\pm$. More generally, any\n", - "invertible transformation on the auxiliary space leaves the resulting contraction unchanged.\n", - "This ambiguity in the definition clearly shows that one should really always think in terms\n", - "of the fully symmetric procucts of $a^+$ and $a^-$ rather than in terms of these operators\n", - "themselves. In particular, one can always decompose such a symmetric product into the\n", - "[form above](bosonham) by means of an SVD.\n", - "```\n", - "\n", - "\n", - "## Level 3: Fermions and the Kitaev Model\n", - "\n", - "While we have already covered quite a lot of ground towards understanding symmetric tensors\n", - "in terms of fusion trees and corresponding blocks, the symmetries considered so far have\n", - "been quite 'simple' in the sense that sectors corresponding to irreps of $\\mathbb{Z}_2$ and\n", - "$\\mathrm{U}(1)$ have\n", - "[*Abelian fusion rules*](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.FusionStyle)\n", - "and\n", - "[*bosonic exchange statistics*](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.BraidingStyle).\n", - "This means that the fusion of two irreps always gives a single irrep as the fusion product,\n", - "and that exchanging two irreps in a tensor product is trivial. In practice, this implies\n", - "that for tensors with these symmetries the fusion trees are completely fixed by the\n", - "uncoupled charges, which uniquely define both the inner lines and the coupled charge, and\n", - "that tensor indices can be permuted freely without any 'strange' side effects.\n", - "\n", - "In the following we will consider examples with fermionic and even anyonic exchange\n", - "statistics, and non-Abelian fusion rules. In going through these examples it will become\n", - "clear that the fusion trees labeling the blocks of a symmetric tensor imply more information\n", - "than just a labeling.\n", - "\n", - "\n", - "### Fermion Parity Symmetry\n", - "\n", - "As a simple example we will consider the Kitaev chain, which describes a chain of\n", - "interacting spinless fermions with nearest-neighbor hopping and pairing terms. The\n", - "Hamiltonian of this model is given by\n", - "```{math}\n", - ":label: eq:kitaev\n", - "H = \\sum_{\\langle i,j \\rangle} \\left(-\\frac{t}{2}(c_i^+ c_j^- - c_i^- c_j^+) + \\frac{\\Delta}{2}(c_i^+ c_j^+ - c_i^- c_j^-) \\right) - \\mu \\sum_{i} N_i\n", - "```\n", - "where $N_i = c_i^+ c_i^-$ is the local particle number operator. As opposed to the previous\n", - "case, the fermionic creation and annihilation operators now satisfy the anticommutation\n", - "relations\n", - "```{math}\n", - "\\begin{align*}\n", - "\\left\\{c_i^-, c_j^-\\right\\} &= \\left\\{c_i^+, c_j^+\\right\\} = 0 \\\\\n", - "\\left\\{c_i^-, c_j^+\\right\\} &= \\delta_{ij} .\\\\\n", - "\\end{align*}\n", - "```\n", - "These relations justify the choice of the relative minus sign in the hopping and pairing\n", - "terms. Indeed, since fermionic operators on different sites always anticommute, these\n", - "relative minus signs are needed to ensure that the Hamiltonian is Hermitian, since $\\left(\n", - "c_i^+ c_j^- \\right)^\\dagger = c_j^+ c_i^- = - c_i^- c_j^+$ and $\\left( c_i^+ c_j^+\n", - "\\right)^\\dagger = c_j^- c_i^- = - c_i^- c_j^-$. The anticommutation relations also naturally\n", - "restrict the local occupation number to be 0 or 1, leading to a well-defined notion of\n", - "*fermion-parity*. The local fermion-parity operator is related to the fermion number\n", - "operator as $Q_i = (-1)^{n_i}$, and is diagonal in the occupation number basis. The\n", - "Hamiltonian {eq}`eq:kitaev` is invariant under conjugation by the global fermion-parity\n", - "operator, $Q H Q^\\dagger = H$, where\n", - "```{math}\n", - "Q = \\exp \\left( i \\pi \\sum_i N_i \\right) = (-1)^{\\sum_i N_i}.\n", - "```\n", - "This fermion parity symmetry, which we will denote as $f\\mathbb{Z}_2$, is a\n", - "$\\mathbb{Z}_2$-like symmetry in the sense that it has a trivial representation, which we\n", - "call *even* and again denote by '0', and a sign representation which we call *odd* and\n", - "denote by '1'. The fusion rules of these irreps are the same as for $\\mathbb{Z}_2$. Similar\n", - "to the previous case, the local symmetry operator $Q_i$ is already diagonal, so the\n", - "occupation number basis coincides with the irrep basis and we don't need an additional basis\n", - "transform. The important difference with a regular $\\mathbb{Z}_2$ symmetry is that the\n", - "irreps of $f\\mathbb{Z}_2$ have fermionic braiding statistics, in the sense that exhanging\n", - "two odd irreps gives rise to a minus sign.\n", - "\n", - "In TensorKit.jl, an $f\\mathbb{Z}_2$-graded vector spaces is represented as a\n", - "`Vect[FermionParity]` space, where a given $f\\mathbb{Z}_2$ irrep can be represented as a\n", - "[`FermionParity`](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKit.FermionParity)\n", - "sector instance. Using the simplest instance of a vector space containing a single even and\n", - "odd irrep, we can already demonstrate the corresponding fermionic braiding behavior by\n", - "[performing a permutation](https://jutho.github.io/TensorKit.jl/stable/lib/tensors/#TensorKit.permute-Union{Tuple{N%E2%82%82},%20Tuple{N%E2%82%81},%20Tuple{S},%20Tuple{AbstractTensorMap{S},%20Tuple{Tuple{Vararg{Int64,%20N%E2%82%81}},%20Tuple{Vararg{Int64,%20N%E2%82%82}}}}}%20where%20{S,%20N%E2%82%81,%20N%E2%82%82})\n", - "on a simple `TensorMap`." - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "af2ff62d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Vect[FermionParity](0=>1, 1=>1) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):\n", - "* Data for sector (FermionParity(0),) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (FermionParity(0),) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (FermionParity(1),) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (FermionParity(1),) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = Vect[FermionParity](0 => 1, 1 => 1)\n", - "t = TensorMap(ones, ComplexF64, V ← V ⊗ V)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "61a6ce83", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Vect[FermionParity](0=>1, 1=>1) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):\n", - "* Data for sector (FermionParity(0),) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (FermionParity(0),) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1] =\n", - " -1.0 + 0.0im\n", - "* Data for sector (FermionParity(1),) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (FermionParity(1),) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "permute(t, ((1,), (3, 2)))" - ] - }, - { - "cell_type": "markdown", - "id": "564a3b33", - "metadata": {}, - "source": [ - "In other words, when exchanging the two domain vector spaces, the block of the `TensorMap`\n", - "for which both corresponding irreps are odd picks up a minus sign, exactly as we would\n", - "expect for fermionic charges.\n", - "\n", - "\n", - "### Constructing the Hamiltonian\n", - "\n", - "We can directly construct the Hamiltonian terms as symmetric `TensorMap`s using the same\n", - "procedure as before starting from their matrix elements in the occupation number basis.\n", - "However, in this case we should be a bit more careful about the precise definition of the\n", - "basis states in composite systems. Indeed, the tensor product structure of fermionic systems\n", - "is inherently tricky to deal with, and should ideally be treated in the context of\n", - "[*super vector spaces*](https://en.wikipedia.org/wiki/Super_vector_space). For two sites, we\n", - "can define the following basis states on top of the fermionic vacuuum $\\ket{00}$:\n", - "```{math}\n", - "\\begin{align*}\n", - "\\ket{01} &= c_2^+ \\ket{00} \\\\\n", - "\\ket{10} &= c_1^+ \\ket{00} \\\\\n", - "\\ket{11} &= c_1^+ c_2^+ \\ket{00} \\\\\n", - "\\end{align*}\n", - "```\n", - "This definition in combination with the anticommutation relations above give rise to the\n", - "nonzero matrix elements\n", - "```{math}\n", - "\\begin{align*}\n", - "c_1^+ c_2^- \\ket{0, 1} &= \\ket{1, 0} \\\\\n", - "c_1^- c_2^+ \\ket{1, 0} &= - \\ket{0, 1} \\\\\n", - "c_1^+ c_2^+ \\ket{0, 0} &= \\ket{1, 1} \\\\\n", - "c_1^- c_2^- \\ket{1, 1} &= - \\ket{0, 0} \\\\\n", - "N \\ket{n} &= n \\ket{n}.\n", - "\\end{align*}\n", - "```\n", - "While the signs in these expressions may seem a little unintuitive at first sight, they are\n", - "essential to the fermionic nature of the system. Indeed, if we for example work out the\n", - "matrix element of $c_1^- c_2^+$ we find\n", - "```{math}\n", - "\\begin{align*}\n", - "c_1^- c_2^+ \\ket{1, 0} = c_1^- c_2^+ c_1^+ \\ket{0, 0} = - c_2^+ c_1^- c_1^+ \\ket{0, 0} = - c_2^+ (\\mathbb{1} - c_1^+ c_1^-) \\ket{0, 0} = - c_2^+ \\ket{0, 0} = - \\ket{0, 1}. \\\\\n", - "\\end{align*}\n", - "```\n", - "\n", - "Once we have these matrix elements the hard part is done, and we can naively associate these\n", - "to the following $f\\mathbb{Z}_2$ fusion trees with corresponding block values,\n", - "```{figure} ../_static/SymmetricTensors/fZ2_fusiontrees.svg\n", - ":scale: 12%\n", - ":name: fZ2_fusiontrees\n", - "```\n", - "Given this information, we can go through the same procedure again to construct $c^+ c^-$,\n", - "$c^- c^+$ and $N$ operators as `TensorMap`s over $f\\mathbb{Z}_2$-graded vector spaces." - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "d1debb02", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Vect[FermionParity](0=>1, 1=>1)" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = Vect[FermionParity](0 => 1, 1 => 1)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "47a4e461", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "c⁺c⁻ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "odd = FermionParity(1)\n", - "for (s, f) in fusiontrees(c⁺c⁻)\n", - " if s.uncoupled[1] == odd && f.uncoupled[2] == odd && f.coupled == odd\n", - " c⁺c⁻[s, f] .= 1\n", - " end\n", - "end\n", - "c⁺c⁻" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "12342495", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " -1.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "c⁻c⁺ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(c⁻c⁺)\n", - " if f.uncoupled[1] == odd && s.uncoupled[2] == odd && f.coupled == odd\n", - " c⁻c⁺[s, f] .= -1\n", - " end\n", - "end\n", - "c⁻c⁺" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "fd17ae00", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "c⁺c⁺ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "odd = FermionParity(1)\n", - "for (s, f) in fusiontrees(c⁺c⁺)\n", - " if s.uncoupled[1] == odd && f.uncoupled[1] != odd && f.coupled != odd\n", - " c⁺c⁺[s, f] .= 1\n", - " end\n", - "end\n", - "c⁺c⁺" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "id": "cd08afe2", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1)) ← (Vect[FermionParity](0=>1, 1=>1) ⊗ Vect[FermionParity](0=>1, 1=>1))):\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(0), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(0)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " -1.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(1)) ← (FermionParity(1), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(1), FermionParity(0)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1), FermionParity(0)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(0), FermionParity(1)) ← (FermionParity(0), FermionParity(1)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "c⁻c⁻ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(c⁻c⁻)\n", - " if s.uncoupled[1] != odd && f.uncoupled[2] == odd && f.coupled != odd\n", - " c⁻c⁻[s, f] .= -1\n", - " end\n", - "end\n", - "c⁻c⁻" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "a6f39926", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Vect[FermionParity](0=>1, 1=>1) ← Vect[FermionParity](0=>1, 1=>1)):\n", - "* Data for sector (FermionParity(0),) ← (FermionParity(0),):\n", - " 0.0 + 0.0im\n", - "* Data for sector (FermionParity(1),) ← (FermionParity(1),):\n", - " 1.0 + 0.0im\n" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "N = TensorMap(zeros, ComplexF64, V ← V)\n", - "for (s, f) in fusiontrees(N)\n", - " N[s, f] .= f.coupled == odd ? 1 : 0\n", - "end\n", - "N" - ] - }, - { - "cell_type": "markdown", - "id": "43101398", - "metadata": {}, - "source": [ - "```{note}\n", - "Working with fermionic systems is inherently tricky, as can already be seen from something\n", - "as simple as computing matrix elements of fermionic operators. Similarly, while constructing\n", - "symmetric tensors that correspond to the symmetric Hamiltonian terms was still quite\n", - "straightforward, it is far less clear in this case how to construct these terms as\n", - "contractions of local symmetric tensors representing individual creation and annihilation\n", - "operators in this case. While such a decomposition can always be in principle obtained using\n", - "a (now explicitly fermionic) SVD, manually constructing such tensors as we did in the\n", - "bosonic case is far from trivial. Trying this would be a good exercise in working with\n", - "fermionic symmetries, but it is not something we will do here.\n", - "```\n", - "\n", - "\n", - "## Level 4: Non-Abelian Symmetries and the Quantum Heisenberg Model\n", - "\n", - "We will now move on to systems which have more complicated *non-Abelian* symmetries. For a\n", - "non-Abelian symmetry group $G$, the fact that its elements do not all commute has a profound\n", - "impact on its representation theory. In particular, the irreps of such a group can be higher\n", - "dimensional, and the fusion of two irreps can give rise to multiple different irreps. On the\n", - "one hand this means that fusion trees of these irreps are no longer completely determined by\n", - "the uncoupled charges. Indeed, in this case some of the\n", - "[internal structure of the `FusionTree` type](fusion_trees) we have ignored before will\n", - "become relevant (of which we will give an [example below](sun_heisenberg)). On the other\n", - "hand, it follows that fusion trees of irreps now not only label blocks, but also encode a\n", - "certain *nontrivial symmetry structure*. We will make this statement more precise in the\n", - "following, but the fact that this is necessary is quite intuitive. If we recall our original\n", - "statement that symmetric tensors consist of blocks associated to fusion trees which carry\n", - "irrep labels, then for higher-dimensional irreps the corresponding fusion trees must encode\n", - "some additional information that implicitly takes into account the internal structure of the\n", - "representation spaces. In particular, this means that the conversion of an operator, given\n", - "its matrix elements in the irrep basis, to the blocks of the corresponding symmetric\n", - "`TensorMap` is less straightforward since it requires an understanding of exactly what this\n", - "implied internal structure is. Therefore, we require some more discussion before we can\n", - "actually move on to an example.\n", - "\n", - "We'll start by discussing the general structure of a `TensorMap` which is symmetric under a\n", - "non-Abelian group symmetry. We then given an example based on $\\mathrm{SU}(2)$, where we\n", - "construct the Heisenberg Hamiltonian using two different approaches. Finally, we show how\n", - "the more intuitive approach can be used to obtain an elegant generalization to the\n", - "$\\mathrm{SU}(N)$-symmetric case.\n", - "\n", - "\n", - "### Block Sparsity Revisited: The Wigner-Eckart Theorem\n", - "\n", - "Let us recall some basics of representation theory first. Consider a group $G$ and a\n", - "corresponding representation space $V$, such that every element $g \\in G$ can be realized as\n", - "a unitary operator $U_g : V \\to V$. Let $h$ be a `TensorMap` whose domain and codomain are\n", - "given by the tensor product of two of these representation spaces. Recall that, by\n", - "definition, the statement that '$h$ is symmetric under $G$' means that\n", - "```{figure} ../_static/SymmetricTensors/symmetric_tensor.svg\n", - ":scale: 12%\n", - ":name: symmetric_tensor\n", - "```\n", - "for every $g \\in G$. If we label the irreducible representations of $G$ by $l$, then any\n", - "representation space can be decomposed into a direct sum of irreducible representations, $V\n", - "= \\bigoplus_l V^{(l)}$, in such a way that $U_g$ is block-diagonal where each block is\n", - "labeled by a particular irrep $l$. For each irrep space $V^{(l)}$ we can define an\n", - "orthonormal basis labeled as $\\ket{l, m}$, where the auxiliary label $m$ can take\n", - "$\\text{dim}\\left( V^{(l)} \\right)$ different values. Since we know that tensors are\n", - "multilinear maps over tensor product spaces, it is natural to consider the tensor product of\n", - "representation spaces in more detail.\n", - "\n", - "[From the representation theory of groups](https://en.wikipedia.org/wiki/Tensor_product_of_representations#Clebsch%E2%80%93Gordan_theory),\n", - "it is known that the product of two irreps can in turn be decomposed into a direct sum of\n", - "irreps, $V^{(l_1)} \\otimes V^{(l_2)} \\cong \\bigoplus_{k} V^{(k)}$. The precise nature of\n", - "this decomposition, also refered to as the *Clebsch-Gordan problem*, is given by the\n", - "so-called *Clebsch-Gordan coefficients*, which we will denote as $C^{k}_{l_1,l_2}$. This set\n", - "of coefficients, which can be interpreted as a $\\text{dim}\\left( V^{(l_1)} \\right) \\times\n", - "\\text{dim}\\left( V^{(l_2)} \\right) \\times \\text{dim}\\left( V^{(l_3)} \\right)$ array, that\n", - "encodes how a basis state $\\ket{k,n} \\in V^{(k)}$ corresponding to some term in the direct\n", - "sum can be decomposed into a linear combination of basis vectors $\\ket{l_1,m_1} \\otimes\n", - "\\ket{l_2,m_2}$ of the tensor product space:\n", - "```{math}\n", - "\\ket{k,n} = \\sum_{m_1, m_2} \\left( C^{l_3}_{l_1,l_2} \\right)^{n}_{m_1, m_2} \\ket{l_1,m_1} \\otimes \\ket{l_2,m_2}.\n", - "```\n", - "These recoupling coefficients turn out to be essential to the structure of symmetric\n", - "tensors, which can be best understood in the context of the\n", - "[Wigner-Eckart theorem](https://en.wikipedia.org/wiki/Wigner%E2%80%93Eckart_theorem). This\n", - "theorem implies that for any\n", - "[`TensorMap` $h$ that is symmetric under $G$](symmetric_tensor), its matrix elements in the\n", - "tensor product irrep basis are given by the product of Clebsch-Gordan coefficients which\n", - "characterize the coupling of the basis states in the domain and codomain, and a so-called\n", - "*reduced matrix element* which only depends on the irrep labels. Concretely, the matrix\n", - "element $\\bra{l_1,m_1} \\otimes \\bra{l_2,m_2} h \\ket{l_3,m_3} \\otimes \\ket{l_4,m_4}$ is given\n", - "by\n", - "```{figure} ../_static/SymmetricTensors/wignereckart.svg\n", - ":scale: 12%\n", - ":name: wignereckart\n", - "```\n", - "Here, the sum runs over all possible irreps $k$ in the fusion product $l_3 \\otimes l_4$ and\n", - "over all basis states $\\ket{k,n}$ of $V^{(k)}$. The reduced matrix elements $h_{\\text{red}}$\n", - "are independent of the basis state labels and only depend on the irrep labels themselves.\n", - "Each reduced matrix element should be interpreted as being labeled by an irrep fusion tree,\n", - "```{figure} ../_static/SymmetricTensors/anotherfusiontree.svg\n", - ":scale: 12%\n", - ":name: anotherfusiontree\n", - "```\n", - "The fusion tree itself in turn implies the Clebsch-Gordan coefficients $C^{k}_{l_1,l_2}$ and\n", - "conjugate coefficients ${C^{\\dagger}}_{k}^{l_1,l_2}$ encode the splitting (decomposition) of\n", - "the coupled basis state $\\ket{k,n}$ to the codomain basis states $\\ket{l_1,m_1} \\otimes\n", - "\\ket{l_2,m_2}$ and the coupling of the domain basis states $\\ket{l_3,m_3} \\otimes\n", - "\\ket{l_4,m_4}$ to the coupled basis state $\\ket{k,n}$ respectively.\n", - "\n", - "The Wigner-Eckart theorem dictates that this structure in terms of Clebsch-Gordan\n", - "coefficients is necessary to ensure that the corresponding tensor is symmetric. It is\n", - "precisely this structure that is inherently encoded into the fusion tree part of a symmetric\n", - "`TensorMap`. In particular, **the array block value associated to each fusion tree in a\n", - "symmetric tensor is precisely the reduced matrix element in the Clebsch-Gordan\n", - "decomposition**.\n", - "\n", - "As a small demonstration of this fact, we can make a simple $\\mathrm{SU}(2)$-symmetric\n", - "tensor with trivial block values and verify that its implied symmetry structure exactly\n", - "corresponds to the expected Clebsch-Gordan coefficient. In TensorKit.jl, a\n", - "$\\mathrm{SU}(2)$-graded vector space is represented as an\n", - "[`SU2Space`](https://jutho.github.io/TensorKit.jl/latest/lib/spaces/#TensorKit.SU2Space),\n", - "where a given $\\mathrm{SU}(2)$ irrep can be represented as an\n", - "[`SU2Irrep`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.SU2Irrep)\n", - "instance of integer or halfinteger spin as encoded in its `j` field. If we construct a\n", - "`TensorMap` whose symmetry structure corresponds to the coupling of two spin-$\\frac{1}{2}$\n", - "irreps to a spin-$1$ irrep, we can then convert it to a plain array and compare it to the\n", - "$\\mathrm{SU}(2)$ Clebsch-Gordan coefficients exported by the\n", - "[WignerSymbols.jl package](https://github.com/Jutho/WignerSymbols.jl)." - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "91ef4e72", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap(Rep[SU₂](1=>1) ← (Rep[SU₂](1/2=>1) ⊗ Rep[SU₂](1/2=>1))):\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1,), 1, (false,), ()) ← FusionTree{Irrep[SU₂]}((1/2, 1/2), 1, (false, false), ()):\n", - "[:, :, 1] =\n", - " 1.0 + 0.0im\n" - ] - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V1 = SU2Space(1 => 1)\n", - "V2 = SU2Space(1//2 => 1)\n", - "t = TensorMap(ones, ComplexF64, V1 ← V2 ⊗ V2)" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "b450cfbf", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3×2×2 Array{ComplexF64, 3}:\n", - "[:, :, 1] =\n", - " 1.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.707107+0.0im\n", - " 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 2] =\n", - " 0.0+0.0im 0.0+0.0im\n", - " 0.707107+0.0im 0.0+0.0im\n", - " 0.0+0.0im 1.0+0.0im" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ta = convert(Array, t)" - ] - }, - { - "cell_type": "markdown", - "id": "8b2a2e1f", - "metadata": {}, - "source": [ - "The conversion gives us a $3 \\times 3 \\times 2$ array, which exactly corresponds to the size\n", - "of the $C_{1}^{\\frac{1}{2},\\frac{1}{2}}$ Clebsch-Gordan array. In order to explicitly\n", - "compare whether the entries match we need to know the ordering of basis states assumed by\n", - "TensorKit.jl when converting the tensor to its matrix elements in the irrep basis. For\n", - "$\\mathrm{SU}(2)$ the irrep basis is ordered in ascending magnetic quantum number $m$, which\n", - "gives us a map $m = i - (l+1)$ for mapping an array index to a corresponding magnetic\n", - "quantum number for the spin-$l$ irrep." - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "47ef3f2b", - "metadata": {}, - "outputs": [], - "source": [ - "for i1 in 1:dim(V1), i2 in 1:dim(V2), i3 in 1:dim(V2)\n", - " # map basis state index to magnetic quantum number\n", - " m1 = i1 - (1 + 1)\n", - " m2 = i2 - (1//2 + 1)\n", - " m3 = i3 - (1//2 + 1)\n", - " @test ta[i1, i2, i3] ≈ clebschgordan(1//2, m2, 1//2, m3, 1, m1)\n", - "end" - ] - }, - { - "cell_type": "markdown", - "id": "ca06b245", - "metadata": {}, - "source": [ - "Based on this discussion, we can quantify the aforementioned 'difficulties' in the inverse\n", - "operation of what we just demonstrated, namely converting a given operator to a symmetric\n", - "`TensorMap` given only its matrix elements in the irrep basis. Indeed, it is now clear that\n", - "this precisely requires isolating the reduced matrix elements introduced above. Given the\n", - "matrix elements of the operator in the irrep basis, this can in general be done by solving\n", - "the system of equations implied by the [Clebsch-Gordan decomposition](wignereckart). A\n", - "simpler way to achieve the same thing is to make use of the fact that the\n", - "[Clebsch-Gordan tensors form a complete orthonormal basis](https://en.wikipedia.org/wiki/Clebsch%E2%80%93Gordan_coefficients#Orthogonality_relations)\n", - "on the coupled space. Indeed, by projecting out the appropriate Clebsch-Gordan coefficients\n", - "and using their orthogonality relations, we can construct a diagonal operator on each\n", - "coupled irrep space $V^{(k)}$. Each of these diagonal operators is proportional to the\n", - "identity, where the proportionality factor is precisely the reduced matrix element\n", - "associated to the corresponding irrep fusion tree.\n", - "```{figure} ../_static/SymmetricTensors/none2symm.svg\n", - ":scale: 12%\n", - ":name: none2symm\n", - "```\n", - "\n", - "This procedure works for any group symmetry, and all we need are matrix elements of the\n", - "operator in the irrep basis and the Clebsch-Gordan coefficients. In the following we\n", - "demonstrate this explicit procedure for the particular example of $G = \\mathrm{SU}(2)$.\n", - "However, it should be noted that for general groups the Clebsch-Gordan coefficients may not\n", - "be as easy to compute (in general, no closed formulas exist). In addition, the procedure for\n", - "manually projecting out the reduced matrix elements requires being particularly careful\n", - "about the correspondence between the basis states used to define the original matrix\n", - "elements and those implied by the Clebsch-Gordan coefficients. Therefore, it is often easier\n", - "to directly construct the symmetric tensor based on some representation theory, as we will\n", - "see below.\n", - "\n", - "\n", - "### The 'Generic' Approach to the Spin-1 Heisenberg Model: Wigner-Eckart in Action\n", - "\n", - "Consider the spin-1 Heisenberg model with Hamiltonian\n", - "```{math}\n", - "H = J \\sum_{\\langle i,j \\rangle} \\vec{S}_i \\cdot \\vec{S}_j\n", - "```\n", - "where $\\vec{S} = (S^x, S^y, S^z)$ are the spin operators. The physical Hilbert space at each\n", - "site is the three-dimensional spin-1 irrep of $\\mathrm{SU}(2)$. Each two-site exchange\n", - "operator $\\vec{S}_i \\cdot \\vec{S}_j$ in the sum commutes with a global transformation $g \\in\n", - "\\mathrm{SU}(2)$, so that it satisfies the [above symmetry condition](symmetric_tensor).\n", - "Therefore, we can represent it as an $\\mathrm{SU}(2)$-symmetric `TensorMap`, as long as we\n", - "can isolate its reduced matrix elements.\n", - "\n", - "In order to apply the above procedure, we first require the matrix elements in the irrep\n", - "basis. These can be constructed as a $3 \\times 3 \\times 3 \\times 3$ array `SS` using the\n", - "[familiar representation of the $\\mathrm{SU}(2)$ generators in the spin-1 representation](https://en.wikipedia.org/wiki/Spin_(physics)#Higher_spins),\n", - "with respect to the $\\{\\ket{1,-1}, \\ket{1,0}, \\ket{1,1}\\}$ basis." - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "f9ce8f5c", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "3×3×3×3 Array{ComplexF64, 4}:\n", - "[:, :, 1, 1] =\n", - " 1.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 2, 1] =\n", - " 0.0+0.0im 1.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 3, 1] =\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 1.0+0.0im 0.0+0.0im\n", - " -1.0+0.0im 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 1, 2] =\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 1.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 2, 2] =\n", - " 0.0+0.0im 0.0+0.0im 1.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 1.0+0.0im 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 3, 2] =\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 1.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 1, 3] =\n", - " 0.0+0.0im 0.0+0.0im -1.0+0.0im\n", - " 0.0+0.0im 1.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 2, 3] =\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 1.0+0.0im 0.0+0.0im\n", - "\n", - "[:, :, 3, 3] =\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 0.0+0.0im\n", - " 0.0+0.0im 0.0+0.0im 1.0+0.0im" - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Sx = 1 / sqrt(2) * ComplexF64[0 1 0; 1 0 1; 0 1 0]\n", - "Sy = 1 / sqrt(2) * ComplexF64[0 1im 0; -1im 0 1im; 0 -1im 0]\n", - "Sz = ComplexF64[-1 0 0; 0 0 0; 0 0 1]\n", - "\n", - "@tensor SS_arr[-1 -2; -3 -4] := Sx[-1; -3] * Sx[-2; -4] + Sy[-1; -3] * Sy[-2; -4] + Sz[-1; -3] * Sz[-2; -4]" - ] - }, - { - "cell_type": "markdown", - "id": "eed50746", - "metadata": {}, - "source": [ - "The next step is to project out the reduced matrix elements by taking the overlap with the\n", - "appropriate Clebsch-Gordan coefficients, according to\n", - "[the Clebsch-Gordan decomposition given above](none2symm). In our current case of a spin-1\n", - "physical space we have $l_1 = l_2 = l_3 = l_4 = 1$, and the coupled irrep $k$ can therefore\n", - "take the values $0, 1, 2$. The reduced matrix element for a given $k$ can then be\n", - "implemented in the following way:" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "e8dfafe8", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "get_reduced_element (generic function with 1 method)" - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "function get_reduced_element(k)\n", - " # construct Clebsch-Gordan coefficients for coupling 1 ⊗ 1 to k \n", - " CG = zeros(ComplexF64, 3, 3, 2*k + 1)\n", - " for m1 in -k:k, m2 in -1:1, m3 in -1:1\n", - " CG[m2 + 2, m3 + 2, m1 + k + 1] = clebschgordan(1, m2, 1, m3, k, m1)\n", - " end\n", - "\n", - " # project out diagonal matrix on coupled irrep space\n", - " @tensor reduced_matrix[-1; -2] := CG[1 2; -1] * SS_arr[1 2; 3 4] * conj(CG[3 4; -2])\n", - "\n", - " # check that it is proportianal to the identity\n", - " @assert isapprox(reduced_matrix, reduced_matrix[1, 1] * I; atol=1e-12)\n", - "\n", - " # return the proportionality factor\n", - " return reduced_matrix[1, 1]\n", - "end" - ] - }, - { - "cell_type": "markdown", - "id": "9ddf3bd6", - "metadata": {}, - "source": [ - "If we use this to compute the reduced matrix elements for $k = 0, 1, 2$," - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "042cc136", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "-1.9999999999999993 + 0.0im" - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "get_reduced_element(0)" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "id": "5e53aa57", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "-1.0 + 0.0im" - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "get_reduced_element(1)" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "id": "4ee42cbb", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1.0 + 0.0im" - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "get_reduced_element(2)" - ] - }, - { - "cell_type": "markdown", - "id": "bd587aeb", - "metadata": {}, - "source": [ - "we can read off the entries\n", - "```{math}\n", - "\\renewcommand\\thickspace{\\kern .01ex}\n", - "\\left[ (\\vec{S}_i \\cdot \\vec{S}_j)_\\text{red} \\right] \\,\\,\\!\\!\n", - "\\begin{smallmatrix}\n", - " 1,1\\\\\n", - " 0\\\\\n", - " 1,1\n", - "\\end{smallmatrix} = -2, \\quad\n", - "\\left[ (\\vec{S}_i \\cdot \\vec{S}_j)_\\text{red} \\right] \\,\\,\\!\\!\n", - "\\begin{smallmatrix}\n", - " 1,1\\\\\n", - " 1\\\\\n", - " 1,1\n", - "\\end{smallmatrix} = -1, \\quad\n", - "\\left[ (\\vec{S}_i \\cdot \\vec{S}_j)_\\text{red} \\right] \\,\\,\\!\\!\n", - "\\begin{smallmatrix}\n", - " 1,1\\\\\n", - " 2\\\\\n", - " 1,1\n", - "\\end{smallmatrix} = 1, \\quad\n", - "```\n", - "These can then be used to construct the symmetric `TensorMap` representing the exchange\n", - "interaction:" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "id": "9108d64a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1)) ← (Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1))):\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " -1.9999999999999993 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " -1.0 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = SU2Space(1 => 1)\n", - "SS = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(SS)\n", - " k = Int(f.coupled.j)\n", - " SS[s, f] .= get_reduced_element(k)\n", - "end\n", - "SS" - ] - }, - { - "cell_type": "markdown", - "id": "a79f31a0", - "metadata": {}, - "source": [ - "### An 'Elegant' Approach to the Heisenberg Model\n", - "\n", - "As noted above, the explicit procedure of projecting out the reduced matrix elements from\n", - "the action of an operator in the irrep basis can be a bit cumbersome for more complicated\n", - "groups. However, using some basic representation theory we can bypass this step altogether\n", - "for the Heisenberg model. First, we rewrite the exchange interaction in the following way:\n", - "```{math}\n", - ":label: eq:casimir_decomp\n", - "\\vec{S}_i \\cdot \\vec{S}_j = \\frac{1}{2} \\left( \\left( \\vec{S}_i + \\vec{S}_j \\right)^2 - \\vec{S}_i^2 - \\vec{S}_j^2 \\right)\n", - "```\n", - "Here, $\\vec{S}_i$ and $\\vec{S}_j$ are spin operators on the physcial irrep, while total spin\n", - "operator $\\vec{S}_i + \\vec{S}_j$ can be decomposed onto the different coupled irreps $k$. It\n", - "is a well known fact that the quadratic sum of the generators of $\\mathrm{SU}(2)$, often\n", - "refered to as the\n", - "[*quadratic Casimir*](https://en.wikipedia.org/wiki/Representation_theory_of_SU(2)#The_Casimir_element),\n", - "commutes with all generators. By\n", - "[Schur's lemma](https://en.wikipedia.org/wiki/Schur%27s_lemma), it must then act\n", - "proportionally to the identity on every irrep, where the corresponding eigenvalue is\n", - "determined by the spin irrep label. In particular, we have for each irrep $l$\n", - "```{math}\n", - "\\vec{S}^2 \\ket{l,m} = l(l+1) \\ket{l,m}.\n", - "```\n", - "It then follows from Eq. {eq}`eq:casimir_decomp` that the reduced matrix elements of the\n", - "exchange interaction are completely determined by the eigenvalue of the quadratic Casimir on\n", - "the uncoupled and coupled irreps. Indeed, to each fusion tree we can associate a\n", - "well-defined value\n", - "```{figure} ../_static/SymmetricTensors/SU2_fusiontrees.svg\n", - ":scale: 12%\n", - ":name: SU2_fusiontrees\n", - "```\n", - "This gives us all we need to directly construct the exchange interaction as a symmetric\n", - "`TensorMap`," - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "f06d38df", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1)) ← (Rep[SU₂](1=>1) ⊗ Rep[SU₂](1=>1))):\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 0, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " -2.0 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 1, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " -1.0 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()) ← FusionTree{Irrep[SU₂]}((1, 1), 2, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = SU2Space(1 => 1)\n", - "SS = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(SS)\n", - " l3 = f.uncoupled[1].j\n", - " l4 = f.uncoupled[2].j\n", - " k = f.coupled.j\n", - " SS[s, f] .= (k * (k + 1) - l3 * (l3 + 1) - l4 * (l4 + 1)) / 2\n", - "end\n", - "SS" - ] - }, - { - "cell_type": "markdown", - "id": "98aa6bf8", - "metadata": {}, - "source": [ - "which gives exactly the same result as the previous approach.\n", - "\n", - "```{note}\n", - "This last construction for the exchange interaction immediatly generalizes to any value of\n", - "the physical spin. All we need is to fill in the appropriate values for the uncoupled irreps\n", - "$l_1$, $l_2$, $l_3$ and $l_4$.\n", - "```\n", - "\n", - "\n", - "(sun_heisenberg)=\n", - "### $\\mathrm{SU}(N)$ generalization\n", - "\n", - "We end this subsection with some comments on the generalization of the above discussion to\n", - "$\\mathrm{SU}(N)$. As foreshadowed above, the irreps of $\\mathrm{SU}(N)$ in general have an\n", - "even more complicated structure. In particular, they can admit so-called *fusion\n", - "multiplicities*, where the fusion of two irreps can have not only multiple distinct\n", - "outcomes, but they can even fuse to a given irrep in multiple inequivalent ways. We can\n", - "demonstrate this behavior for the adjoint representation of $\\mathrm{SU}(3)$. For this we\n", - "can use the the\n", - "[SUNRepresentations.jl](https://github.com/maartenvd/SUNRepresentations.jl/tree/master)\n", - "package which provides an interface for working with irreps of $\\mathrm{SU}(N)$ and their\n", - "Clebsch-Gordan coefficients. A particular representation is represented by an `SUNIrrep{N}`\n", - "which can be used with TensorKit.jl. The eight-dimensional adjoint representation of\n", - "$\\mathrm{SU}(3)$ is given by" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "97687dd5", - "metadata": { - "tags": [ - "remove-cell" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "\"weight\"" - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "SUNRepresentations.display_mode(\"dimension\")" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "62b7e8c2", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Irrep[SU₃](\"8\")" - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "l = SU3Irrep(\"8\")" - ] - }, - { - "cell_type": "markdown", - "id": "0510d3c8", - "metadata": {}, - "source": [ - "If we look at the possible outcomes of fusing two adjoint irreps, we find the by now\n", - "familiar non-Abelian fusion behavior," - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "1850a533", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "5-element Vector{SU3Irrep}:\n", - " \"1\"\n", - " \"27\"\n", - " \"10\"\n", - " \"8\"\n", - " \"10⁺\"" - ] - }, - "execution_count": 38, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "collect(l ⊗ l)" - ] - }, - { - "cell_type": "markdown", - "id": "dc7d23d7", - "metadata": {}, - "source": [ - "However, this particular fusion has multiplicities, since the adjoint irrep can actually\n", - "fuse to itself in two distinct ways. The full decomposition of this fusion product is given\n", - "by\n", - "```{math}\n", - "\\mathbf{8} \\otimes \\mathbf{8} = \\mathbf{1} \\oplus \\mathbf{3} \\oplus 2 \\cdot \\mathbf{8} \\oplus \\mathbf{10} \\oplus \\mathbf{\\overline{10}} \\oplus \\mathbf{27}\n", - "```\n", - "This fusion multiplicity can be detected by using\n", - "[`Nsymbol`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.Nsymbol)\n", - "method from TensorKit.jl to inspect the number of times `l` appears in the fusion product\n", - "`l ⊗ l`," - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "8255140e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2" - ] - }, - "execution_count": 39, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Nsymbol(l, l, l)" - ] - }, - { - "cell_type": "markdown", - "id": "8394360c", - "metadata": {}, - "source": [ - "When working with irreps with fusion multiplicities, each `FusionTree` carries additional\n", - "`vertices` labels which label which of the distinct fusion vertices is being referred to. We\n", - "will return to this at the end of this section.\n", - "\n", - "Given the generators $T^k$ of $\\mathrm{SU}(N)$, we can define a generalized Heisenberg model\n", - "using a similar exchange interaction, giving the Hamiltonian\n", - "```{math}\n", - "H = J \\sum_{\\langle i,j \\rangle} \\vec{T}_i \\cdot \\vec{T}_j\n", - "```\n", - "For a particular choice of physical irrep, the exchange interaction can again be constructed\n", - "as a symmetric `TensorMap` by first rewriting it as\n", - "```{math}\n", - "\\vec{T}_i \\cdot \\vec{T}_j = \\frac{1}{2} \\left( \\left( \\vec{T}_i + \\vec{T}_j \\right)^2 - \\vec{T}_i^2 - \\vec{T}_j^2 \\right).\n", - "```\n", - "For any $N$, the quadratic Casimir\n", - "```{math}\n", - "C_1 = \\sum_k T^k T^k\n", - "```\n", - "commutes with all $\\mathrm{SU}(N)$ generators, meaning it has a well defined eigenvalue in\n", - "each irrep. This observation then immediately given the reduced matrix elements of the\n", - "exchange interaction as\n", - "```{figure} ../_static/SymmetricTensors/SUN_fusiontrees.svg\n", - ":scale: 12%\n", - ":name: SUN_fusiontrees\n", - "```\n", - "Using these to directly construct the corresponding symmetric `TensorMap` is much simpler\n", - "than going through the explicit projection procedure using Clebsch-Gordan coefficients.\n", - "\n", - "For the particular example of $\\mathrm{SU}(3)$, the generators are given by $T^k =\n", - "\\frac{1}{2} \\lambda^k$ , where $\\lambda^k$ are the\n", - "[Gell-Mann matrices](https://en.wikipedia.org/wiki/Clebsch%E2%80%93Gordan_coefficients_for_SU(3)#Generators_of_the_Lie_algebra).\n", - "Each irrep can be labeled as $l = D(p,q)$ where $p$ and $q$ are refered to as the *Dynkin\n", - "labels*. The eigenvalue of the quadratic Casimir for a given irrep is given by\n", - "[Freudenthal's formula](https://en.wikipedia.org/wiki/Weyl_character_formula#Freudenthal's_formula),\n", - "```{math}\n", - "C_1(D(p,q)) = \\frac{1}{3} (p^2 + q^2 + 3p + 3q + pq).\n", - "```\n", - "Using SUNRepresentations.jl, we can compute the Casimir as" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "id": "ae6804c9", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "casimir (generic function with 1 method)" - ] - }, - "execution_count": 40, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "function casimir(l::SU3Irrep)\n", - " p, q = dynkin_label(l)\n", - " return (p^2 + q^2 + 3 * p + 3 * q + p * q) / 3\n", - "end" - ] - }, - { - "cell_type": "markdown", - "id": "15d91dbd", - "metadata": {}, - "source": [ - "If we use the adjoint representation of $\\mathrm{SU}(3)$ as physical space, the Heisenberg\n", - "exchange interaction can then be constructed as" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "id": "ab530c23", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Rep[SU₃](\"8\"=>1) ⊗ Rep[SU₃](\"8\"=>1)) ← (Rep[SU₃](\"8\"=>1) ⊗ Rep[SU₃](\"8\"=>1))):\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"1\", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"1\", (false, false),(), (1,)):\n", - "[:, :, 1, 1] =\n", - " -3.0 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (2,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (2,)):\n", - "[:, :, 1, 1] =\n", - " -1.5 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (2,)):\n", - "[:, :, 1, 1] =\n", - " -1.5 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (2,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (1,)):\n", - "[:, :, 1, 1] =\n", - " -1.5 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (1,)):\n", - "[:, :, 1, 1] =\n", - " -1.5 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"10⁺\", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"10⁺\", (false, false),(), (1,)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"10\", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"10\", (false, false),(), (1,)):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n", - "* Data for fusiontree FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"27\", (false, false),(), (1,)) ← FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"27\", (false, false),(), (1,)):\n", - "[:, :, 1, 1] =\n", - " 1.0 + 0.0im\n" - ] - }, - "execution_count": 41, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = Vect[SUNIrrep{3}](SU3Irrep(\"8\") => 1)\n", - "TT = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(TT)\n", - " l3 = f.uncoupled[1]\n", - " l4 = f.uncoupled[2]\n", - " k = f.coupled\n", - " TT[s, f] .= (casimir(k) - casimir(l3) - casimir(l4)) / 2\n", - "end\n", - "TT" - ] - }, - { - "cell_type": "markdown", - "id": "632cc41c", - "metadata": {}, - "source": [ - "Circling back to our earlier remark, we clearly see that the fusion trees of this tensor\n", - "indeed have non-trivial vertex labels." - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "d9b5d16b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "FusionTree{Irrep[SU₃]}((\"8\", \"8\"), \"8\", (false, false),(), (2,))" - ] - }, - "execution_count": 42, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "f = collect(fusiontrees(TT))[3][2]" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "99ad5008", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(2,)" - ] - }, - "execution_count": 43, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "f.vertices" - ] - }, - { - "cell_type": "markdown", - "id": "7c9fe145", - "metadata": {}, - "source": [ - "```{note}\n", - "While we have given an explicit example using $\\mathrm{SU}(3)$ with the adoint irrep on the\n", - "physical level, the same construction holds for the general $\\mathrm{SU}(N)$ with arbitrary\n", - "physical irreps. All we require is the expression for the eigenvalues of the quadratic\n", - "Casimir in each irrep.\n", - "```\n", - "\n", - "\n", - "## Level 5: Anyonic Symmetries and the Golden Chain\n", - "\n", - "While we have focussed exclusively on group-like symmetries in our discussion so far, the\n", - "framework of symmetric tensors actually extends beyond groups to so-called\n", - "[*categorical symmetries*](https://jutho.github.io/TensorKit.jl/stable/man/sectors/#ss_representationtheory).\n", - "These are quite exotic symmetries characterized in terms of\n", - "[the topological data of a unitary fusion category](https://jutho.github.io/TensorKit.jl/stable/man/categories/#ss_topologicalfusion).\n", - "While the precise details of all the terms in these statements fall beyond the scope of this\n", - "tutorial, we can give a simple example of a Hamiltonian model with a categorical symmetry\n", - "called [the golden chain](https://arxiv.org/abs/cond-mat/0612341).\n", - "\n", - "This is a one-dimensional system defined as a spin chain, where each physical 'spin'\n", - "corresponds to a so-called [Fibonacci anyon](https://arxiv.org/abs/0902.3275). There are two\n", - "such Fibonacci anyons, which we will denote as $1$ and $\\tau$. They obey the fusion rules\n", - "```{math}\n", - "1 \\otimes 1 = 1, \\quad 1 \\otimes \\tau = \\tau, \\quad \\tau \\otimes \\tau = 1 \\oplus \\tau.\n", - "```\n", - "The Hilbert space of a chain of Fibonacci anyons is not a regular tensor product space, but\n", - "rather a *constrained Hilbert space* where the only allowed basis states are labeled by\n", - "valid Fibonacci fusion configurations. In the golden chain model, we define a\n", - "nearest-neighbor Hamiltonian on this Hilbert space by imposing an energy penalty when two\n", - "neighboring anyons fuse to a $\\tau$ anyon.\n", - "\n", - "Even just writing down an explicit expression for this interaction on such a constrained\n", - "Hilbert space is not entirely straightforward. However, using the framework of symmetric\n", - "tensors it can actually be explicitly constructed in a very straightforward way. Indeed,\n", - "TensorKit.jl supports a dedicated\n", - "[`FibonacciAnyon`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.FibonacciAnyon)\n", - "sector type which can be used to construct precisely such a constrained Fibonacci-graded\n", - "vector space. A Hamiltonian\n", - "```{math}\n", - "H = \\sum_{\\langle i,j \\rangle} h_{ij}\n", - "```\n", - "which favors neighboring anyons fusing to the vacuum can be constructed as a `TensorMap` on\n", - "the product space of two Fibonacci-graded physical spaces" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "id": "0732fdbe", - "metadata": { - "tags": [ - "hide-output" - ] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "Vect[FibonacciAnyon](:τ=>1)" - ] - }, - "execution_count": 44, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "V = Vect[FibonacciAnyon](:τ => 1)" - ] - }, - { - "cell_type": "markdown", - "id": "42a20abd", - "metadata": {}, - "source": [ - "and assigning the following nonzero block value to the two-site fusion trees\n", - "```{figure} ../_static/SymmetricTensors/Fib_fusiontrees.svg\n", - ":scale: 12%\n", - ":name: Fib_fusiontrees\n", - "```\n", - "This allows us to define this, at first sight, exotic and complicated Hamiltonian in a few\n", - "simple lines of code," - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "fb3cd415", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "TensorMap((Vect[FibonacciAnyon](:τ=>1) ⊗ Vect[FibonacciAnyon](:τ=>1)) ← (Vect[FibonacciAnyon](:τ=>1) ⊗ Vect[FibonacciAnyon](:τ=>1))):\n", - "* Data for fusiontree FusionTree{FibonacciAnyon}((:τ, :τ), :I, (false, false), ()) ← FusionTree{FibonacciAnyon}((:τ, :τ), :I, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " -1.0 + 0.0im\n", - "* Data for fusiontree FusionTree{FibonacciAnyon}((:τ, :τ), :τ, (false, false), ()) ← FusionTree{FibonacciAnyon}((:τ, :τ), :τ, (false, false), ()):\n", - "[:, :, 1, 1] =\n", - " 0.0 + 0.0im\n" - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "h = TensorMap(ones, V ⊗ V ← V ⊗ V)\n", - "for (s, f) in fusiontrees(h)\n", - " h[s, f] .= f.coupled == FibonacciAnyon(:I) ? -1 : 0\n", - "end\n", - "h" - ] - }, - { - "cell_type": "markdown", - "id": "d6229e9c", - "metadata": {}, - "source": [ - "```{note}\n", - "In the previous section we have stressed the role of Clebsch-Gordan coefficients in the\n", - "structure of symmetric tensors, and how they can be used to map between the representation\n", - "of an operator in the irrep basis and its symmetric tensor representation. However, for\n", - "categorical symmetries such as the Fibonacci anyons, there are no Clebsch-Gordan\n", - "coefficients. Therefore, the 'matrix elements of the operator in the irrep basis' are not\n", - "well-defined, meaning that a Fibonacci-symmetric tensor cannot actually be converted to a\n", - "plain array in a meaningful way.\n", - "```\n", - "\n", - "\n", - "## To Be Added\n", - "\n", - "- Add section on product symmetries and how to work with them.\n", - " - Discuss the Hubbard model with $f\\mathbb{Z}_2 \\boxtimes \\mathrm{U}(1) \\boxtimes \\mathrm{SU}(2)$ as an example.\n", - "- Add a section on classical $O(N)$ models to illustrate the ('Fourier') transformation from the group element to the irrep basis for continuous symmetries." - ] - } - ], - "metadata": { - "jupytext": { - "formats": "md:myst", - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.4" - }, - "source_map": [ - 11, - 37, - 44, - 85, - 100, - 105, - 109, - 111, - 121, - 131, - 272, - 275, - 280, - 282, - 295, - 303, - 310, - 320, - 416, - 419, - 427, - 438, - 449, - 456, - 503, - 507, - 516, - 523, - 526, - 534, - 618, - 623, - 625, - 676, - 680, - 691, - 701, - 712, - 722, - 728, - 853, - 859, - 861, - 869, - 877, - 926, - 933, - 941, - 959, - 961, - 964, - 967, - 969, - 994, - 1002, - 1037, - 1047, - 1072, - 1076, - 1078, - 1081, - 1083, - 1094, - 1096, - 1135, - 1141, - 1144, - 1154, - 1157, - 1160, - 1162, - 1207, - 1210, - 1218, - 1224 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.md b/pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.md deleted file mode 100644 index a9fb0df0..00000000 --- a/pr-preview/pr-27/_sources/5-Tutorials/SymmetricTensors.md +++ /dev/null @@ -1,1241 +0,0 @@ ---- -jupytext: - formats: md:myst - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -# A Symmetric Tensor Deep Dive: Constructing Your First Tensor Map - -In this tutorial, we will demonstrate how to construct specific `TensorMap`s which are -relevant to some common physical systems, with an increasing degree of complexity. We will -assume the reader has gone through the tutorial sections on -[tensor network theory](tensor_networks) and -[symmetries in tensor networks](symmetric_tensors). In going through these examples we aim -to provide a relatively gently introduction to the meaning of -[symmetry sectors](https://jutho.github.io/TensorKit.jl/latest/man/sectors/#ss_sectors) and -[vector spaces](https://jutho.github.io/TensorKit.jl/latest/man/sectors/#ss_rep) within the -context of [TensorKit.jl](https://jutho.github.io/TensorKit.jl/latest/), -[how to initialize a `TensorMap` over a given vector space](https://jutho.github.io/TensorKit.jl/latest/man/tensors/#ss_tensor_construction) -and finally how to manually set the data of a symmetric `TensorMap`. We will keep our -discussion as intuitive and simple as possible, only adding as many technical details as -strictly necessary to understand each example. When considering a different physical system -of interest, you should then be able to adatpt these recipes and the intuition behind them -to your specific problem at hand. - -```{note} -Many of these examples are already implemented in the -[MPSKitModels.jl package](https://github.com/maartenvd/MPSKitModels.jl), in which case we -basically provide a narrated walk-through of the corresponding code. -``` - -```{code-cell} julia -using LinearAlgebra -using TensorKit -using MPSKitModels -using WignerSymbols -using SUNRepresentations -using Test # for showcase testing -``` - - -## Level 0: The 1-Dimensional Ising Model - -As the most basic example, we will consider the -[1-dimensional transverse-field Ising model](https://en.wikipedia.org/wiki/Transverse-field_Ising_model), -whose Hamiltonian is given by - -```{math} -:label: eq:isingham -H = -J \left (\sum_{\langle i, j \rangle} Z_i Z_j + g \sum_{i} X_i\right). -``` - -Here, $X_i$ and $Z_i$ are the -[Pauli operators](https://en.wikipedia.org/wiki/Pauli_matrices) acting on site $i$, and the -first sum runs over pairs of nearest neighbors $\langle i, j \rangle$. This model has a -global $\mathbb{Z}_2$ symmetry, as it is invariant under the transformation $U H U^\dagger = -H$ where the symmetry transformation $U$ is given by a global spin flip, - -```{math} -:label: eq:z2gen -U = \prod_i X_i. -``` - -We will circle back to the implications of this symmetry later. - -As a warmup we will implement the Hamiltonian {eq}`eq:isingham` in the standard way by -encoding the matrix elements of the single-site operators $X$ and $Z$ into aan array of -complex numbers, and then combine them in a suitable way to get the Hamiltonian terms. -Instead of using plain Julia arrays, we will use a representation in terms of `TensorMap`s -over complex vector spaces. These will essentially just be wrappers around base arrays at -this point, but their construction requires some consideration of the notion of *spaces*, -which generalize the notion of `size` for arrays. Each of the operators $X$ and $Z$ acts on -a local 2-dimensional complex vector space. In the context of TensorKit.jl such a space can -be represented as `ComplexSpace(2)`, or using the convenient shorthand `ℂ^2`. A single-site -Pauli operator maps from a domain physical space to a codomain physical space, and can -therefore be represented as instances of a `TensorMap(..., ℂ^2 ← ℂ^2)`. The corresponding -data can then be filled in by hand according to the familiar Pauli matrices in the following -way: - -```{code-cell} julia -:tags: [hide-output] -# initialize numerical data for Pauli matrices -x_mat = ComplexF64[0 1; 1 0] -z_mat = ComplexF64[1 0; 0 -1] - -# construct physical Hilbert space -V = ℂ^2 - -# construct the physical operators as TensorMaps -X = TensorMap(x_mat, V ← V) -Z = TensorMap(z_mat, V ← V) - -# combine single-site operators into two-site operator -ZZ = Z ⊗ Z -``` - -We can easily verify that our operators have the desired form by checking their data in the -computational basis: - -```{code-cell} julia -ZZ -``` - -```{code-cell} julia -X -``` - -```{note} -In order to combine these local operators into a concrete Hamiltonian that can be used in -[MPSKit.jl](https://github.com/maartenvd/MPSKit.jl) we can make use of the convenient -`@mpoham` macro exported by -[MPSKitModels.jl](https://github.com/maartenvd/MPSKitModels.jl). For an infinite translation -invariant Ising chain, we can use the following piece of code which produces the Hamiltonian -in an interesting-looking form (see MPSKit.jl for details on this format). -``` -```{code-cell} julia -:tags: [hide-output] -lattice = InfiniteChain(1) -H = @mpoham begin - sum(nearest_neighbours(lattice)) do (i, j) - return ZZ{i,j} - end + sum(vertices(lattice)) do i - return X{i} - end -end -``` - - -## Level 1: The $\mathbb{Z}_2$-symmetric Ising Model - -### The irrep basis and block sparsity - -Let us now return to the global $\mathbb{Z}_2$ invariance of the Hamiltonian -{eq}`eq:isingham`, and consider what this implies for its local terms $ZZ$ and $X$. -Representing these operators as `TensorMap`s, the invariance of $H$ under a global -$\mathbb{Z}_2$ transformation implies the following identities for the local tensors: - -```{figure} ../_static/SymmetricTensors/ZZX_symm.svg -:scale: 12% -:name: ZZX_symm -:align: center -``` - -Recalling the [discussion on symmetries in tensor networks](symmetric_tensors), we recognize -that these identitities precisely mean that these local tensors transform trivially under a -tensor product representation of $\mathbb{Z}_2$. This implies that, in an appropriate basis -for the local physical vector space, our local tensors would become block-diagonal where -each so-called *matrix block* is labeled by a $\mathbb{Z}_2$ irrep. From the same -discussion, we recall that the appropriate local basis transformation is precisely the one -that brings the local representation $X$ into block-diagonal form. Clearly, this -transformation is nothing more than the Hadamard transformation which maps the computational -basis of $Z$ eigenstates $\{\ket{\uparrow}, \ket{\downarrow}\}$ to that of the $X$ -eigenstates $\{\ket{+}, \ket{-}\}$ defined as $\ket{+} = \frac{\ket{\uparrow} + -\ket{\downarrow}}{\sqrt{2}}$ and $\ket{-} = \frac{\ket{\uparrow} - -\ket{\downarrow}}{\sqrt{2}}$. In the current context, this basis is referred to as the -*irrep basis* of $\mathbb{Z}_2$, where the local basis state $\ket{+}$ corresponds to the -trivial representation of $\mathbb{Z}_2$ while $\ket{-}$ corresponds to the sign -representation. - -Next, let's make the statement that 'the matrix blocks of the local tensors are labeled by -$\mathbb{Z}_2$ irreps' more concrete. To this end, consider the action of $ZZ$ in the irrep -basis, which is given by the four nonzero matrix elements - -```{math} -\begin{align} -ZZ : \mathbb C^2 \otimes \mathbb C^2 &\to \mathbb C^2 \otimes \mathbb C^2 : \\ -\ket{+} \otimes \ket{+} &\mapsto \ket{-} \otimes \ket{-}, \\ -\ket{+} \otimes \ket{-} &\mapsto \ket{-} \otimes \ket{+}, \\ -\ket{-} \otimes \ket{+} &\mapsto \ket{+} \otimes \ket{-}, \\ -\ket{-} \otimes \ket{-} &\mapsto \ket{+} \otimes \ket{+}. -\end{align} -``` - -If we denote the trivial $\mathbb{Z}_2$ irrep by $'0'$, corresponding to a local $\ket{+}$ -state, and the sign irrep by $'1'$, corresponding to a local $\ket{-}$ state, and recall -that in this notation the fusion rules of $\mathbb{Z}_2$ are given by addition modulo 2, we -can associate each of the above matrix elements to a so-called *fusion tree* of -$\mathbb{Z}_2$ irreps with a corresponding coefficient of 1, - -```{figure} ../_static/SymmetricTensors/Z2_fusiontrees.svg -:scale: 12% -:name: Z2_fusiontrees -:align: center -``` - -From this we can observe our previous statement very clearly: the $ZZ$ operator indeed -consists of two distinct two-dimensional matrix blocks, each of which are labeled by the -value of the *coupled irrep* on the middle line of each fusion tree. The first block -corresponds to the even coupled irrep '0', and acts within the two-dimensional subspace -spanned by $\{\ket{+,+}, \ket{-,-}\}$, while the second block corresponds to the odd coupled -irrep '1', and acts within the two-dimensional subspace spanned by $\{\ket{+,-}, -\ket{-,+}\}$. In TensorKit.jl, this block-diagonal structure of a symmetric tensor is -explicitly encoded into its representation as a `TensorMap`, where only the matrix blocks -corresponding to each coupled irrep are stored. - -For our current purposes however, we never really need to explicitly consider these matrix -blocks. Indeed, when constructing a `TensorMap` it is sufficient to set its data by manually -assigning a matrix element to each [fusion tree of the form above](Z2_fusiontrees) labeled -by a given tensor product of irreps. This matrix element is then automatically inserted into -the appropriate matrix block. So, for the purpose of this tutorial **we will interpret a -symmetric `TensorMap` simply as a list of fusion trees, to each of which corresponds a -certain reduced matrix element**. - -```{note} -In general, such a reduced matrix element is not necessarily a scalar, but rather an array -whose size is determined by the degeneracy of the irreps in the codomain and domain of the -fusion tree. For this reason, a reduced matrix element associated to a given fusion tree is -also referred to as an *array block*. In the following we will use terms 'reduced matrix -element', 'array block' or just 'block' interchangeably. However, it should be remembered -that these are distinct from the matrix blocks in the block-diagonal decomposition of the -tensor. -``` - - -(fusion_trees)= -### Fusion trees and how to use them - -This view of the underlying symmetry structure in terms of fusion trees and corresponding -array blocks is a very convenient way of working with the `TensorMap` type. Consider a -generic fusion tree of the form - -```{figure} ../_static/SymmetricTensors/fusiontree.svg -:scale: 12% -:name: fusiontree -:align: center -``` - -which can be used to label a block of a `TensorMap` corresponding to a two-site operator. -This object should actually be seen as a *pair of fusion trees*. The first member of the -pair, related to the codomain of the `TensorMap`, is referred to as the *splitting tree* and -encodes how the *coupled charge* $c$ splits into the *uncoupled charges* $s_1$ and $s_2$. -The second member of the pair, related to the domain of the `TensorMap`, is referred to as -the *fusion tree* and encodes how the uncoupled charges $f_1$ and $f_2$ fuse to the coupled -charge $c$. Both the splitting and fusion tree can be represented as a -[`TensorKit.FusionTree`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.FusionTree) -instance. You will find such a `FusionTree` has the following properties encoded into its -fields: - -- `uncoupled::NTuple{N,I}`: a list of `N` uncoupled charges of type `I<:Sector` -- `coupled::I`: a single coupled charge of type `I<:Sector` -- `isdual::NTuple{N,Bool}`: a list of booleans indicating whether the corresponding uncoupled charge is dual -- `innerlines::NTuple{M,I}`: a list of inner lines of type `I<:Sector` of length `M = N - 2` -- `vertices::NTuple{L,T}`: list of fusion vertex labels of type `T` and length `L = N - 1` - -For our current application only `uncoupled` and `coupled` are relevant, since -$\mathbb{Z}_2$ irreps are self-dual and have Abelian fusion rules. We will come back to -these other properties when discussion more involved applications. Given some `TensorMap`, -the method `TensorKit.fusiontrees(t::TensorMap)` returns an iterator over all pairs of -splitting and fusion trees that label the blocks of `t`. - -We can now put this into practice by directly constructing the $ZZ$ operator in the irrep -basis as a $\mathbb{Z}_2$-symmetric `TensorMap`. We will do this in three steps: - -- First we construct the physical space at each site as a $\mathbb{Z}_2$-graded vector space. -- Then we initialize an empty `TensorMap` with the correct domain and codomain vector spaces built from the previously constructed physical space. -- And finally we iterate over all splitting and fusion tree pairs and manually fill in the corresponding nonzero blocks of the operator. - -After the basis transform to the irrep basis, we can view the two-dimensional complex -physical vector space we started with as being spanned by the trivial and sign irrep of -$\mathbb{Z}_2$. In the language of TensorKit.jl, this can be implemented as a `Z2Space`, an -alias for a -$\mathbb{Z}_2$-[graded vector space](https://jutho.github.io/TensorKit.jl/latest/lib/spaces/#TensorKit.GradedSpace) -`Vect[Z2Irrep]`, which contains the trivial irrep `Z2Irrep(0)` with degeneracy 1 and the -sign irrep `Z2Irrep(1)` with degeneracy 1. We can define this space in the following way and -check its dimension: - -```{code-cell} julia -V = Z2Space(0 => 1, 1 => 1) -dim(V) -``` - -Given this physical space, we can initialize the $ZZ$ operator as an empty `TensorMap` with -the appropriate structure. - -```{code-cell} julia -ZZ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -``` - -The output of this command again demonstrates the underlying structure of a symmetric -tensor. We see that all eight valid fusion trees with two incoming irreps and two outgoing -irreps [of the type above](fusiontree) are listed with their corresponding block data. Each -of these blocks is an array of shape $(1, 1, 1, 1)$ since each irrep occuring in the space -$V$ has degeneracy 1. Using the `fusiontrees` method and the fact that we can index a -`TensorMap` using a splitting/fusion tree pair, we can now fill in the nonzero blocks of the -operator by observing that the $ZZ$ operator flips the irreps of the uncoupled charges in -the domain with respect to the codomain, as shown in the diagrams above. Flipping a given -`Z2Irrep` in the codomain can be implemented by fusing them with the sign irrep -`Z2Irrep(1)`, giving: - -```{code-cell} julia -flip_charge(charge::Z2Irrep) = only(charge ⊗ Z2Irrep(1)) -for (s, f) in fusiontrees(ZZ) - if s.uncoupled == map(flip_charge, f.uncoupled) - ZZ[s, f] .= 1 - end -end -ZZ -``` - -Indeed, the resulting `TensorMap` exactly encodes the matrix elements of the $ZZ$ operator -shown in {ref}`the diagrams above `. The $X$ operator can be constructed in -a similar way. Since it is by definition diagonal in the irrep basis with blocks directly -corresponding to the trivial and sign irrep, its construction is particularly simple: - -```{code-cell} julia -X = TensorMap(zeros, ComplexF64, V ← V) -for (s, f) in fusiontrees(X) - if only(f.uncoupled) == Z2Irrep(0) - X[s, f] .= 1 - else - X[s, f] .= -1 - end -end -X -``` - -Given these local operators, we can use them to construct the full manifestly -$\mathbb{Z}_2$-symmetric Hamiltonian. - -```{note} -An important observation is that when explicitly imposing the $\mathbb{Z}_2$ symmetry we -directly constructed the full $ZZ$ operator as a single symmetric tensor. This in contrast -to the case without symmetries, where we constructed a single-site $Z$ operator and then -combined them into a two-site operator. Clearly this can no longer be done when imposing -$\mathbb{Z}_2$, since a single $Z$ is not invariant under conjugation with the symmetry -operator $X$. One might wonder whether it is still possible to construct a two-site -Hamiltonian term by combining local objects. This is possible if one introduces an auxiliary -index on the local tensors that carries a non-trivial charge. The intuition behind this will -become more clear in the next example. -``` - - -## Level 2: The $\mathrm{U}(1)$ Bose-Hubbard Model - -For our next example we will consider the -[Bose-Hubbard model](https://en.wikipedia.org/wiki/Bose%E2%80%93Hubbard_model), which -describes interacting bosons on a lattice. The Hamiltonian of this model is given by -```{math} -:label: eq:bhh -H = -t \sum_{\langle i,j \rangle} \left( a_{i}^+ a_{j}^- + a_{i}^- a_{j}^+ \right) - \mu \sum_i N_i + \frac{U}{2} \sum_i N_i(N_i - 1). -``` -This Hamiltonian is defined on the [Fock space](fock_space) associated to a chain of bosons, -where the action bosonic creation, annihilation and number operators $a^+$, $a^-$ and $N = -a^+ a^-$ in the local occupation number basis is given by -```{math} -:label: eq:bosonopmatel -\begin{align} -a^+ \ket{n} &= \sqrt{n + 1} \ket{n + 1} \\ -a^- \ket{n} &= \sqrt{n} \ket{n - 1} \\ -N \ket{n} &= n \ket{n} -\end{align} -``` -Their bosonic nature can be summarized by the familiar the commutation relations -```{math} -\begin{align*} -\left[a_i^-, a_j^-\right] &= \left[a_i^+, a_j^+\right] = 0 \\ -\left[a_i^-, a_j^+\right] &= \delta_{ij} \\ -\left[N, a^+\right] &= a^+ \\ -\left[N, a^-\right] &= -a^- \\ -\end{align*} -``` - -This Hamiltonian is invariant under conjugation by the global particle number operator, $U H -U^\dagger = H$, where -```{math} -U = \sum_i N_i -``` -This invariance corresponds to a $\mathrm{U}(1)$ particle number symmetry, which can again -be manifestly imposed when constructing the Hamiltonian terms as `TensorMap`s. From the -representation theory of $\mathrm{U}(1)$ we know that it's irreps are all one-dimensional -and can be labeled by integers, where the fusion of two irreps is given by addition. - - -### Directly Constructing the Hamiltonian Terms - -We recall from our discussion on the $\mathbb{Z}_2$ symmetric Ising model that, in order to -construct the Hamiltonian terms as symmetric tensors, we should work in the irrep basis -where the symmetry transformation is block diagonal. In the current case, the symmetry -operation is the particle number operator, which is already diagonal in the occupation -number basis. Therefore, we don't need an additional local basis transformation this time, -and can just observe that each local basis state can be identified with the $\mathrm{U}(1)$ -irrep associated to the corresponding occupation number. - -Following the same approach as before, we first write down the action of the Hamiltonian -terms in the irrep basis: - -```{math} -\begin{align*} -a_i^+ a_j^- \ket{n_i, n_j} &= \sqrt{(n_i + 1)n_j} \ket{n_i + 1, n_j - 1} \\ -a_i^- a_j^+ \ket{n_i, n_j} &= \sqrt{n_i(n_j + 1)} \ket{n_i - 1, n_j + 1} \\ -N \ket{n} &= n \ket{n} -\end{align*} -``` - -It is then a simple observation that these matrix elements are exactly captured by the -following $\mathrm{U}(1)$ fusion trees with corresponding block values: - -```{figure} ../_static/SymmetricTensors/U1_fusiontrees.svg -:scale: 12% -:name: U1_fusiontrees -``` - -This gives us all the information necessary to construct the corresponding `TensorMap`s. We -follow the same steps as outlined in the previous example, starting with the construction of -the physical space. This will now be a $\mathrm{U}(1)$ graded vector space `U1Space`, where -each basis state $\ket{n}$ in the occupation number basis is represented by the -corresponding $\mathrm{U}(1)$ irrep `U1Irrep(n)` with degeneracy 1. While this physical -space is in principle infinite dimensional, we will impose a cutoff in occupation number at -a maximum of 5 bosons per site, giving a 6-dimensional vector space: - -```{code-cell} julia -cutoff = 5 -V = U1Space(n => 1 for n in 0:cutoff) -``` - -We can now initialize the $a^+ a^-$, $a^- a^+$ and $N$ operators as empty `TensorMap`s with -the correct domain and codomain vector spaces, and fill in the nonzero blocks associated to -[the fusion trees shown above](U1_fusiontrees). To do this we need access to the integer -label of the $\mathrm{U}(1)$ irreps in the fusion and splitting trees, which can be accessed -through the `charge` field of the `U1Irrep` type. - -```{code-cell} julia -:tags: [hide-output] -a⁺a⁻ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(a⁺a⁻) - if s.uncoupled[1] == only(f.uncoupled[1] ⊗ U1Irrep(1)) && s.uncoupled[2] == only(f.uncoupled[2] ⊗ U1Irrep(-1)) - a⁺a⁻[s, f] .= sqrt(s.uncoupled[1].charge * f.uncoupled[2].charge) - end -end -a⁺a⁻ -``` - -```{code-cell} julia -:tags: [hide-output] -a⁻a⁺ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(a⁻a⁺) - if s.uncoupled[1] == only(f.uncoupled[1] ⊗ U1Irrep(-1)) && s.uncoupled[2] == only(f.uncoupled[2] ⊗ U1Irrep(1)) - a⁻a⁺[s, f] .= sqrt(f.uncoupled[1].charge * s.uncoupled[2].charge) - end -end -a⁻a⁺ -``` - -```{code-cell} julia -:tags: [hide-output] -N = TensorMap(zeros, ComplexF64, V ← V) -for (s, f) in fusiontrees(N) - N[s, f] .= f.uncoupled[1].charge -end -N -``` - - -### Creation and Annihilation Operators as Symmetric Tensors - -Just as in the $\mathbb{Z}_2$ case, it is obvious that we cannot directly construct the -creation and annihilation operators as instances of a `TensorMap(..., V ← V)` since they are -not invariant under conjugation by the symmetry operator. However, it is possible to -construct them as `TensorMap`s using an *auxiliary vector space*, based on the following -intuition. The creation operator $a^+$ violates particle number conservation by mapping the -occupation number $n$ to $n + 1$. From the point of view of representation theory, this -process can be thought of as the *fusion* of an `U1Irrep(n)` with an `U1Irrep(1)`, naturally -giving the fusion product `U1Irrep(n + 1)`. This means we can represent $a^+$ as a -`TensorMap(..., V ← V ⊗ A)`, where the auxiliary vector space `A` contains the $+1$ irrep -with degeneracy 1, `A = U1Space(1 => 1)`. Similarly, the decrease in occupation number when -acting with $a^-$ can be thought of as the *splitting* of an `U1Irrep(n)` into an -`U1Irrep(n - 1)` and an `U1Irrep(1)`, leading to a representation in terms of a -`TensorMap(..., A ⊗ V ← V)`. Based on these observations, we can represent the matrix -elements {eq}`eq:bosonopmatel` as blocks labeled by the $\mathrm{U}(1)$ fusion trees - -```{figure} ../_static/SymmetricTensors/bosonops.svg -:scale: 12% -:name: bosonops -``` - -We can then combine these operators to get the appropriate Hamiltonian terms, - -```{figure} ../_static/SymmetricTensors/bosonham.svg -:scale: 12% -:name: bosonham -``` - -```{note} -Although we have made a suggestive distinction between the 'left' and 'right' versions of -the operators $a_L^\pm$ and $a_R^\pm$, one can actually be obtained from the other by -permuting the physical and auxiliary indices of the corresponding `TensorMap`s. This -permutation has no effect on the actual array blocks of the tensors due to the -[bosonic braiding style](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.BraidingStyle) -of $\mathrm{U}(1)$ irreps, so the left and right operators can in essence be seen as the -'same' tensors. This is no longer the case when considering fermionic systems, where -permuting indices can in fact change the array blocks as we will see next. As a consequence, -it is much less clear how to construct two-site symmetric operators in terms of local -symmetric objects. -``` - -The explicit construction then looks something like - -```{code-cell} julia -A = U1Space(1 => 1) -``` - -```{code-cell} julia -:tags: [hide-output] -a⁺ = TensorMap(zeros, ComplexF64, V ← V ⊗ A) -for (s, f) in fusiontrees(a⁺) - a⁺[s, f] .= sqrt(f.uncoupled[1].charge+1) -end -a⁺ -``` - -```{code-cell} julia -:tags: [hide-output] -a⁻ = TensorMap(zeros, ComplexF64, A ⊗ V ← V) -for (s, f) in fusiontrees(a⁻) - a⁻[s, f] .= sqrt(f.uncoupled[1].charge) -end -a⁻ -``` - -It is then simple to check that this is indeed what we expect. -```{code-cell} julia -@tensor a⁺a⁻_bis[-1 -2; -3 -4] := a⁺[-1; -3 1] * a⁻[1 -2; -4] -@tensor a⁻a⁺_bis[-1 -2; -3 -4] := a⁻[1 -1; -3] * a⁺[-2; -4 1] -@tensor N_bis[-1 ; -2] := a⁺[-1; 1 2] * a⁻[2 1; -2] - -@test a⁺a⁻_bis ≈ a⁺a⁻ atol=1e-14 -@test a⁻a⁺_bis ≈ a⁻a⁺ atol=1e-14 -@test N_bis ≈ N atol=1e-14 -``` - -```{note} -From the construction of the Hamiltonian operators -[in terms of creation and annihilation operators](bosonham) we clearly see that they are -invariant under a transformation $a^\pm \to e^{\pm i\theta} a^\pm$. More generally, any -invertible transformation on the auxiliary space leaves the resulting contraction unchanged. -This ambiguity in the definition clearly shows that one should really always think in terms -of the fully symmetric procucts of $a^+$ and $a^-$ rather than in terms of these operators -themselves. In particular, one can always decompose such a symmetric product into the -[form above](bosonham) by means of an SVD. -``` - - -## Level 3: Fermions and the Kitaev Model - -While we have already covered quite a lot of ground towards understanding symmetric tensors -in terms of fusion trees and corresponding blocks, the symmetries considered so far have -been quite 'simple' in the sense that sectors corresponding to irreps of $\mathbb{Z}_2$ and -$\mathrm{U}(1)$ have -[*Abelian fusion rules*](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.FusionStyle) -and -[*bosonic exchange statistics*](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.BraidingStyle). -This means that the fusion of two irreps always gives a single irrep as the fusion product, -and that exchanging two irreps in a tensor product is trivial. In practice, this implies -that for tensors with these symmetries the fusion trees are completely fixed by the -uncoupled charges, which uniquely define both the inner lines and the coupled charge, and -that tensor indices can be permuted freely without any 'strange' side effects. - -In the following we will consider examples with fermionic and even anyonic exchange -statistics, and non-Abelian fusion rules. In going through these examples it will become -clear that the fusion trees labeling the blocks of a symmetric tensor imply more information -than just a labeling. - - -### Fermion Parity Symmetry - -As a simple example we will consider the Kitaev chain, which describes a chain of -interacting spinless fermions with nearest-neighbor hopping and pairing terms. The -Hamiltonian of this model is given by -```{math} -:label: eq:kitaev -H = \sum_{\langle i,j \rangle} \left(-\frac{t}{2}(c_i^+ c_j^- - c_i^- c_j^+) + \frac{\Delta}{2}(c_i^+ c_j^+ - c_i^- c_j^-) \right) - \mu \sum_{i} N_i -``` -where $N_i = c_i^+ c_i^-$ is the local particle number operator. As opposed to the previous -case, the fermionic creation and annihilation operators now satisfy the anticommutation -relations -```{math} -\begin{align*} -\left\{c_i^-, c_j^-\right\} &= \left\{c_i^+, c_j^+\right\} = 0 \\ -\left\{c_i^-, c_j^+\right\} &= \delta_{ij} .\\ -\end{align*} -``` -These relations justify the choice of the relative minus sign in the hopping and pairing -terms. Indeed, since fermionic operators on different sites always anticommute, these -relative minus signs are needed to ensure that the Hamiltonian is Hermitian, since $\left( -c_i^+ c_j^- \right)^\dagger = c_j^+ c_i^- = - c_i^- c_j^+$ and $\left( c_i^+ c_j^+ -\right)^\dagger = c_j^- c_i^- = - c_i^- c_j^-$. The anticommutation relations also naturally -restrict the local occupation number to be 0 or 1, leading to a well-defined notion of -*fermion-parity*. The local fermion-parity operator is related to the fermion number -operator as $Q_i = (-1)^{n_i}$, and is diagonal in the occupation number basis. The -Hamiltonian {eq}`eq:kitaev` is invariant under conjugation by the global fermion-parity -operator, $Q H Q^\dagger = H$, where -```{math} -Q = \exp \left( i \pi \sum_i N_i \right) = (-1)^{\sum_i N_i}. -``` -This fermion parity symmetry, which we will denote as $f\mathbb{Z}_2$, is a -$\mathbb{Z}_2$-like symmetry in the sense that it has a trivial representation, which we -call *even* and again denote by '0', and a sign representation which we call *odd* and -denote by '1'. The fusion rules of these irreps are the same as for $\mathbb{Z}_2$. Similar -to the previous case, the local symmetry operator $Q_i$ is already diagonal, so the -occupation number basis coincides with the irrep basis and we don't need an additional basis -transform. The important difference with a regular $\mathbb{Z}_2$ symmetry is that the -irreps of $f\mathbb{Z}_2$ have fermionic braiding statistics, in the sense that exhanging -two odd irreps gives rise to a minus sign. - -In TensorKit.jl, an $f\mathbb{Z}_2$-graded vector spaces is represented as a -`Vect[FermionParity]` space, where a given $f\mathbb{Z}_2$ irrep can be represented as a -[`FermionParity`](https://jutho.github.io/TensorKit.jl/stable/lib/sectors/#TensorKit.FermionParity) -sector instance. Using the simplest instance of a vector space containing a single even and -odd irrep, we can already demonstrate the corresponding fermionic braiding behavior by -[performing a permutation](https://jutho.github.io/TensorKit.jl/stable/lib/tensors/#TensorKit.permute-Union{Tuple{N%E2%82%82},%20Tuple{N%E2%82%81},%20Tuple{S},%20Tuple{AbstractTensorMap{S},%20Tuple{Tuple{Vararg{Int64,%20N%E2%82%81}},%20Tuple{Vararg{Int64,%20N%E2%82%82}}}}}%20where%20{S,%20N%E2%82%81,%20N%E2%82%82}) -on a simple `TensorMap`. - -```{code-cell} julia -V = Vect[FermionParity](0 => 1, 1 => 1) -t = TensorMap(ones, ComplexF64, V ← V ⊗ V) -``` - -```{code-cell} julia -permute(t, ((1,), (3, 2))) -``` -In other words, when exchanging the two domain vector spaces, the block of the `TensorMap` -for which both corresponding irreps are odd picks up a minus sign, exactly as we would -expect for fermionic charges. - - -### Constructing the Hamiltonian - -We can directly construct the Hamiltonian terms as symmetric `TensorMap`s using the same -procedure as before starting from their matrix elements in the occupation number basis. -However, in this case we should be a bit more careful about the precise definition of the -basis states in composite systems. Indeed, the tensor product structure of fermionic systems -is inherently tricky to deal with, and should ideally be treated in the context of -[*super vector spaces*](https://en.wikipedia.org/wiki/Super_vector_space). For two sites, we -can define the following basis states on top of the fermionic vacuuum $\ket{00}$: -```{math} -\begin{align*} -\ket{01} &= c_2^+ \ket{00} \\ -\ket{10} &= c_1^+ \ket{00} \\ -\ket{11} &= c_1^+ c_2^+ \ket{00} \\ -\end{align*} -``` -This definition in combination with the anticommutation relations above give rise to the -nonzero matrix elements -```{math} -\begin{align*} -c_1^+ c_2^- \ket{0, 1} &= \ket{1, 0} \\ -c_1^- c_2^+ \ket{1, 0} &= - \ket{0, 1} \\ -c_1^+ c_2^+ \ket{0, 0} &= \ket{1, 1} \\ -c_1^- c_2^- \ket{1, 1} &= - \ket{0, 0} \\ -N \ket{n} &= n \ket{n}. -\end{align*} -``` -While the signs in these expressions may seem a little unintuitive at first sight, they are -essential to the fermionic nature of the system. Indeed, if we for example work out the -matrix element of $c_1^- c_2^+$ we find -```{math} -\begin{align*} -c_1^- c_2^+ \ket{1, 0} = c_1^- c_2^+ c_1^+ \ket{0, 0} = - c_2^+ c_1^- c_1^+ \ket{0, 0} = - c_2^+ (\mathbb{1} - c_1^+ c_1^-) \ket{0, 0} = - c_2^+ \ket{0, 0} = - \ket{0, 1}. \\ -\end{align*} -``` - -Once we have these matrix elements the hard part is done, and we can naively associate these -to the following $f\mathbb{Z}_2$ fusion trees with corresponding block values, -```{figure} ../_static/SymmetricTensors/fZ2_fusiontrees.svg -:scale: 12% -:name: fZ2_fusiontrees -``` -Given this information, we can go through the same procedure again to construct $c^+ c^-$, -$c^- c^+$ and $N$ operators as `TensorMap`s over $f\mathbb{Z}_2$-graded vector spaces. - -```{code-cell} julia -V = Vect[FermionParity](0 => 1, 1 => 1) -``` - -```{code-cell} julia -c⁺c⁻ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -odd = FermionParity(1) -for (s, f) in fusiontrees(c⁺c⁻) - if s.uncoupled[1] == odd && f.uncoupled[2] == odd && f.coupled == odd - c⁺c⁻[s, f] .= 1 - end -end -c⁺c⁻ -``` - -```{code-cell} julia -c⁻c⁺ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(c⁻c⁺) - if f.uncoupled[1] == odd && s.uncoupled[2] == odd && f.coupled == odd - c⁻c⁺[s, f] .= -1 - end -end -c⁻c⁺ -``` - -```{code-cell} julia -c⁺c⁺ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -odd = FermionParity(1) -for (s, f) in fusiontrees(c⁺c⁺) - if s.uncoupled[1] == odd && f.uncoupled[1] != odd && f.coupled != odd - c⁺c⁺[s, f] .= 1 - end -end -c⁺c⁺ -``` - -```{code-cell} julia -c⁻c⁻ = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(c⁻c⁻) - if s.uncoupled[1] != odd && f.uncoupled[2] == odd && f.coupled != odd - c⁻c⁻[s, f] .= -1 - end -end -c⁻c⁻ -``` - -```{code-cell} julia -N = TensorMap(zeros, ComplexF64, V ← V) -for (s, f) in fusiontrees(N) - N[s, f] .= f.coupled == odd ? 1 : 0 -end -N -``` - -```{note} -Working with fermionic systems is inherently tricky, as can already be seen from something -as simple as computing matrix elements of fermionic operators. Similarly, while constructing -symmetric tensors that correspond to the symmetric Hamiltonian terms was still quite -straightforward, it is far less clear in this case how to construct these terms as -contractions of local symmetric tensors representing individual creation and annihilation -operators in this case. While such a decomposition can always be in principle obtained using -a (now explicitly fermionic) SVD, manually constructing such tensors as we did in the -bosonic case is far from trivial. Trying this would be a good exercise in working with -fermionic symmetries, but it is not something we will do here. -``` - - -## Level 4: Non-Abelian Symmetries and the Quantum Heisenberg Model - -We will now move on to systems which have more complicated *non-Abelian* symmetries. For a -non-Abelian symmetry group $G$, the fact that its elements do not all commute has a profound -impact on its representation theory. In particular, the irreps of such a group can be higher -dimensional, and the fusion of two irreps can give rise to multiple different irreps. On the -one hand this means that fusion trees of these irreps are no longer completely determined by -the uncoupled charges. Indeed, in this case some of the -[internal structure of the `FusionTree` type](fusion_trees) we have ignored before will -become relevant (of which we will give an [example below](sun_heisenberg)). On the other -hand, it follows that fusion trees of irreps now not only label blocks, but also encode a -certain *nontrivial symmetry structure*. We will make this statement more precise in the -following, but the fact that this is necessary is quite intuitive. If we recall our original -statement that symmetric tensors consist of blocks associated to fusion trees which carry -irrep labels, then for higher-dimensional irreps the corresponding fusion trees must encode -some additional information that implicitly takes into account the internal structure of the -representation spaces. In particular, this means that the conversion of an operator, given -its matrix elements in the irrep basis, to the blocks of the corresponding symmetric -`TensorMap` is less straightforward since it requires an understanding of exactly what this -implied internal structure is. Therefore, we require some more discussion before we can -actually move on to an example. - -We'll start by discussing the general structure of a `TensorMap` which is symmetric under a -non-Abelian group symmetry. We then given an example based on $\mathrm{SU}(2)$, where we -construct the Heisenberg Hamiltonian using two different approaches. Finally, we show how -the more intuitive approach can be used to obtain an elegant generalization to the -$\mathrm{SU}(N)$-symmetric case. - - -### Block Sparsity Revisited: The Wigner-Eckart Theorem - -Let us recall some basics of representation theory first. Consider a group $G$ and a -corresponding representation space $V$, such that every element $g \in G$ can be realized as -a unitary operator $U_g : V \to V$. Let $h$ be a `TensorMap` whose domain and codomain are -given by the tensor product of two of these representation spaces. Recall that, by -definition, the statement that '$h$ is symmetric under $G$' means that -```{figure} ../_static/SymmetricTensors/symmetric_tensor.svg -:scale: 12% -:name: symmetric_tensor -``` -for every $g \in G$. If we label the irreducible representations of $G$ by $l$, then any -representation space can be decomposed into a direct sum of irreducible representations, $V -= \bigoplus_l V^{(l)}$, in such a way that $U_g$ is block-diagonal where each block is -labeled by a particular irrep $l$. For each irrep space $V^{(l)}$ we can define an -orthonormal basis labeled as $\ket{l, m}$, where the auxiliary label $m$ can take -$\text{dim}\left( V^{(l)} \right)$ different values. Since we know that tensors are -multilinear maps over tensor product spaces, it is natural to consider the tensor product of -representation spaces in more detail. - -[From the representation theory of groups](https://en.wikipedia.org/wiki/Tensor_product_of_representations#Clebsch%E2%80%93Gordan_theory), -it is known that the product of two irreps can in turn be decomposed into a direct sum of -irreps, $V^{(l_1)} \otimes V^{(l_2)} \cong \bigoplus_{k} V^{(k)}$. The precise nature of -this decomposition, also refered to as the *Clebsch-Gordan problem*, is given by the -so-called *Clebsch-Gordan coefficients*, which we will denote as $C^{k}_{l_1,l_2}$. This set -of coefficients, which can be interpreted as a $\text{dim}\left( V^{(l_1)} \right) \times -\text{dim}\left( V^{(l_2)} \right) \times \text{dim}\left( V^{(l_3)} \right)$ array, that -encodes how a basis state $\ket{k,n} \in V^{(k)}$ corresponding to some term in the direct -sum can be decomposed into a linear combination of basis vectors $\ket{l_1,m_1} \otimes -\ket{l_2,m_2}$ of the tensor product space: -```{math} -\ket{k,n} = \sum_{m_1, m_2} \left( C^{l_3}_{l_1,l_2} \right)^{n}_{m_1, m_2} \ket{l_1,m_1} \otimes \ket{l_2,m_2}. -``` -These recoupling coefficients turn out to be essential to the structure of symmetric -tensors, which can be best understood in the context of the -[Wigner-Eckart theorem](https://en.wikipedia.org/wiki/Wigner%E2%80%93Eckart_theorem). This -theorem implies that for any -[`TensorMap` $h$ that is symmetric under $G$](symmetric_tensor), its matrix elements in the -tensor product irrep basis are given by the product of Clebsch-Gordan coefficients which -characterize the coupling of the basis states in the domain and codomain, and a so-called -*reduced matrix element* which only depends on the irrep labels. Concretely, the matrix -element $\bra{l_1,m_1} \otimes \bra{l_2,m_2} h \ket{l_3,m_3} \otimes \ket{l_4,m_4}$ is given -by -```{figure} ../_static/SymmetricTensors/wignereckart.svg -:scale: 12% -:name: wignereckart -``` -Here, the sum runs over all possible irreps $k$ in the fusion product $l_3 \otimes l_4$ and -over all basis states $\ket{k,n}$ of $V^{(k)}$. The reduced matrix elements $h_{\text{red}}$ -are independent of the basis state labels and only depend on the irrep labels themselves. -Each reduced matrix element should be interpreted as being labeled by an irrep fusion tree, -```{figure} ../_static/SymmetricTensors/anotherfusiontree.svg -:scale: 12% -:name: anotherfusiontree -``` -The fusion tree itself in turn implies the Clebsch-Gordan coefficients $C^{k}_{l_1,l_2}$ and -conjugate coefficients ${C^{\dagger}}_{k}^{l_1,l_2}$ encode the splitting (decomposition) of -the coupled basis state $\ket{k,n}$ to the codomain basis states $\ket{l_1,m_1} \otimes -\ket{l_2,m_2}$ and the coupling of the domain basis states $\ket{l_3,m_3} \otimes -\ket{l_4,m_4}$ to the coupled basis state $\ket{k,n}$ respectively. - -The Wigner-Eckart theorem dictates that this structure in terms of Clebsch-Gordan -coefficients is necessary to ensure that the corresponding tensor is symmetric. It is -precisely this structure that is inherently encoded into the fusion tree part of a symmetric -`TensorMap`. In particular, **the array block value associated to each fusion tree in a -symmetric tensor is precisely the reduced matrix element in the Clebsch-Gordan -decomposition**. - -As a small demonstration of this fact, we can make a simple $\mathrm{SU}(2)$-symmetric -tensor with trivial block values and verify that its implied symmetry structure exactly -corresponds to the expected Clebsch-Gordan coefficient. In TensorKit.jl, a -$\mathrm{SU}(2)$-graded vector space is represented as an -[`SU2Space`](https://jutho.github.io/TensorKit.jl/latest/lib/spaces/#TensorKit.SU2Space), -where a given $\mathrm{SU}(2)$ irrep can be represented as an -[`SU2Irrep`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.SU2Irrep) -instance of integer or halfinteger spin as encoded in its `j` field. If we construct a -`TensorMap` whose symmetry structure corresponds to the coupling of two spin-$\frac{1}{2}$ -irreps to a spin-$1$ irrep, we can then convert it to a plain array and compare it to the -$\mathrm{SU}(2)$ Clebsch-Gordan coefficients exported by the -[WignerSymbols.jl package](https://github.com/Jutho/WignerSymbols.jl). - -```{code-cell} julia -V1 = SU2Space(1 => 1) -V2 = SU2Space(1//2 => 1) -t = TensorMap(ones, ComplexF64, V1 ← V2 ⊗ V2) -``` - -```{code-cell} julia -ta = convert(Array, t) -``` -The conversion gives us a $3 \times 3 \times 2$ array, which exactly corresponds to the size -of the $C_{1}^{\frac{1}{2},\frac{1}{2}}$ Clebsch-Gordan array. In order to explicitly -compare whether the entries match we need to know the ordering of basis states assumed by -TensorKit.jl when converting the tensor to its matrix elements in the irrep basis. For -$\mathrm{SU}(2)$ the irrep basis is ordered in ascending magnetic quantum number $m$, which -gives us a map $m = i - (l+1)$ for mapping an array index to a corresponding magnetic -quantum number for the spin-$l$ irrep. -```{code-cell} julia -for i1 in 1:dim(V1), i2 in 1:dim(V2), i3 in 1:dim(V2) - # map basis state index to magnetic quantum number - m1 = i1 - (1 + 1) - m2 = i2 - (1//2 + 1) - m3 = i3 - (1//2 + 1) - @test ta[i1, i2, i3] ≈ clebschgordan(1//2, m2, 1//2, m3, 1, m1) -end -``` - -Based on this discussion, we can quantify the aforementioned 'difficulties' in the inverse -operation of what we just demonstrated, namely converting a given operator to a symmetric -`TensorMap` given only its matrix elements in the irrep basis. Indeed, it is now clear that -this precisely requires isolating the reduced matrix elements introduced above. Given the -matrix elements of the operator in the irrep basis, this can in general be done by solving -the system of equations implied by the [Clebsch-Gordan decomposition](wignereckart). A -simpler way to achieve the same thing is to make use of the fact that the -[Clebsch-Gordan tensors form a complete orthonormal basis](https://en.wikipedia.org/wiki/Clebsch%E2%80%93Gordan_coefficients#Orthogonality_relations) -on the coupled space. Indeed, by projecting out the appropriate Clebsch-Gordan coefficients -and using their orthogonality relations, we can construct a diagonal operator on each -coupled irrep space $V^{(k)}$. Each of these diagonal operators is proportional to the -identity, where the proportionality factor is precisely the reduced matrix element -associated to the corresponding irrep fusion tree. -```{figure} ../_static/SymmetricTensors/none2symm.svg -:scale: 12% -:name: none2symm -``` - -This procedure works for any group symmetry, and all we need are matrix elements of the -operator in the irrep basis and the Clebsch-Gordan coefficients. In the following we -demonstrate this explicit procedure for the particular example of $G = \mathrm{SU}(2)$. -However, it should be noted that for general groups the Clebsch-Gordan coefficients may not -be as easy to compute (in general, no closed formulas exist). In addition, the procedure for -manually projecting out the reduced matrix elements requires being particularly careful -about the correspondence between the basis states used to define the original matrix -elements and those implied by the Clebsch-Gordan coefficients. Therefore, it is often easier -to directly construct the symmetric tensor based on some representation theory, as we will -see below. - - -### The 'Generic' Approach to the Spin-1 Heisenberg Model: Wigner-Eckart in Action - -Consider the spin-1 Heisenberg model with Hamiltonian -```{math} -H = J \sum_{\langle i,j \rangle} \vec{S}_i \cdot \vec{S}_j -``` -where $\vec{S} = (S^x, S^y, S^z)$ are the spin operators. The physical Hilbert space at each -site is the three-dimensional spin-1 irrep of $\mathrm{SU}(2)$. Each two-site exchange -operator $\vec{S}_i \cdot \vec{S}_j$ in the sum commutes with a global transformation $g \in -\mathrm{SU}(2)$, so that it satisfies the [above symmetry condition](symmetric_tensor). -Therefore, we can represent it as an $\mathrm{SU}(2)$-symmetric `TensorMap`, as long as we -can isolate its reduced matrix elements. - -In order to apply the above procedure, we first require the matrix elements in the irrep -basis. These can be constructed as a $3 \times 3 \times 3 \times 3$ array `SS` using the -[familiar representation of the $\mathrm{SU}(2)$ generators in the spin-1 representation](https://en.wikipedia.org/wiki/Spin_(physics)#Higher_spins), -with respect to the $\{\ket{1,-1}, \ket{1,0}, \ket{1,1}\}$ basis. -```{code-cell} julia -:tags: [hide-output] -Sx = 1 / sqrt(2) * ComplexF64[0 1 0; 1 0 1; 0 1 0] -Sy = 1 / sqrt(2) * ComplexF64[0 1im 0; -1im 0 1im; 0 -1im 0] -Sz = ComplexF64[-1 0 0; 0 0 0; 0 0 1] - -@tensor SS_arr[-1 -2; -3 -4] := Sx[-1; -3] * Sx[-2; -4] + Sy[-1; -3] * Sy[-2; -4] + Sz[-1; -3] * Sz[-2; -4] -``` - -The next step is to project out the reduced matrix elements by taking the overlap with the -appropriate Clebsch-Gordan coefficients, according to -[the Clebsch-Gordan decomposition given above](none2symm). In our current case of a spin-1 -physical space we have $l_1 = l_2 = l_3 = l_4 = 1$, and the coupled irrep $k$ can therefore -take the values $0, 1, 2$. The reduced matrix element for a given $k$ can then be -implemented in the following way: -```{code-cell} julia -:tags: [hide-output] -function get_reduced_element(k) - # construct Clebsch-Gordan coefficients for coupling 1 ⊗ 1 to k - CG = zeros(ComplexF64, 3, 3, 2*k + 1) - for m1 in -k:k, m2 in -1:1, m3 in -1:1 - CG[m2 + 2, m3 + 2, m1 + k + 1] = clebschgordan(1, m2, 1, m3, k, m1) - end - - # project out diagonal matrix on coupled irrep space - @tensor reduced_matrix[-1; -2] := CG[1 2; -1] * SS_arr[1 2; 3 4] * conj(CG[3 4; -2]) - - # check that it is proportianal to the identity - @assert isapprox(reduced_matrix, reduced_matrix[1, 1] * I; atol=1e-12) - - # return the proportionality factor - return reduced_matrix[1, 1] -end -``` -If we use this to compute the reduced matrix elements for $k = 0, 1, 2$, -```{code-cell} julia -get_reduced_element(0) -``` -```{code-cell} julia -get_reduced_element(1) -``` -```{code-cell} julia -get_reduced_element(2) -``` -we can read off the entries -```{math} -\renewcommand\thickspace{\kern .01ex} -\left[ (\vec{S}_i \cdot \vec{S}_j)_\text{red} \right] \,\,\!\! -\begin{smallmatrix} - 1,1\\ - 0\\ - 1,1 -\end{smallmatrix} = -2, \quad -\left[ (\vec{S}_i \cdot \vec{S}_j)_\text{red} \right] \,\,\!\! -\begin{smallmatrix} - 1,1\\ - 1\\ - 1,1 -\end{smallmatrix} = -1, \quad -\left[ (\vec{S}_i \cdot \vec{S}_j)_\text{red} \right] \,\,\!\! -\begin{smallmatrix} - 1,1\\ - 2\\ - 1,1 -\end{smallmatrix} = 1, \quad -``` -These can then be used to construct the symmetric `TensorMap` representing the exchange -interaction: -```{code-cell} julia -V = SU2Space(1 => 1) -SS = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(SS) - k = Int(f.coupled.j) - SS[s, f] .= get_reduced_element(k) -end -SS -``` - - -### An 'Elegant' Approach to the Heisenberg Model - -As noted above, the explicit procedure of projecting out the reduced matrix elements from -the action of an operator in the irrep basis can be a bit cumbersome for more complicated -groups. However, using some basic representation theory we can bypass this step altogether -for the Heisenberg model. First, we rewrite the exchange interaction in the following way: -```{math} -:label: eq:casimir_decomp -\vec{S}_i \cdot \vec{S}_j = \frac{1}{2} \left( \left( \vec{S}_i + \vec{S}_j \right)^2 - \vec{S}_i^2 - \vec{S}_j^2 \right) -``` -Here, $\vec{S}_i$ and $\vec{S}_j$ are spin operators on the physcial irrep, while total spin -operator $\vec{S}_i + \vec{S}_j$ can be decomposed onto the different coupled irreps $k$. It -is a well known fact that the quadratic sum of the generators of $\mathrm{SU}(2)$, often -refered to as the -[*quadratic Casimir*](https://en.wikipedia.org/wiki/Representation_theory_of_SU(2)#The_Casimir_element), -commutes with all generators. By -[Schur's lemma](https://en.wikipedia.org/wiki/Schur%27s_lemma), it must then act -proportionally to the identity on every irrep, where the corresponding eigenvalue is -determined by the spin irrep label. In particular, we have for each irrep $l$ -```{math} -\vec{S}^2 \ket{l,m} = l(l+1) \ket{l,m}. -``` -It then follows from Eq. {eq}`eq:casimir_decomp` that the reduced matrix elements of the -exchange interaction are completely determined by the eigenvalue of the quadratic Casimir on -the uncoupled and coupled irreps. Indeed, to each fusion tree we can associate a -well-defined value -```{figure} ../_static/SymmetricTensors/SU2_fusiontrees.svg -:scale: 12% -:name: SU2_fusiontrees -``` -This gives us all we need to directly construct the exchange interaction as a symmetric -`TensorMap`, -```{code-cell} julia -V = SU2Space(1 => 1) -SS = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(SS) - l3 = f.uncoupled[1].j - l4 = f.uncoupled[2].j - k = f.coupled.j - SS[s, f] .= (k * (k + 1) - l3 * (l3 + 1) - l4 * (l4 + 1)) / 2 -end -SS -``` -which gives exactly the same result as the previous approach. - -```{note} -This last construction for the exchange interaction immediatly generalizes to any value of -the physical spin. All we need is to fill in the appropriate values for the uncoupled irreps -$l_1$, $l_2$, $l_3$ and $l_4$. -``` - - -(sun_heisenberg)= -### $\mathrm{SU}(N)$ generalization - -We end this subsection with some comments on the generalization of the above discussion to -$\mathrm{SU}(N)$. As foreshadowed above, the irreps of $\mathrm{SU}(N)$ in general have an -even more complicated structure. In particular, they can admit so-called *fusion -multiplicities*, where the fusion of two irreps can have not only multiple distinct -outcomes, but they can even fuse to a given irrep in multiple inequivalent ways. We can -demonstrate this behavior for the adjoint representation of $\mathrm{SU}(3)$. For this we -can use the the -[SUNRepresentations.jl](https://github.com/maartenvd/SUNRepresentations.jl/tree/master) -package which provides an interface for working with irreps of $\mathrm{SU}(N)$ and their -Clebsch-Gordan coefficients. A particular representation is represented by an `SUNIrrep{N}` -which can be used with TensorKit.jl. The eight-dimensional adjoint representation of -$\mathrm{SU}(3)$ is given by -```{code-cell} julia -:tags: [remove-cell] -SUNRepresentations.display_mode("dimension") -``` -```{code-cell} julia -l = SU3Irrep("8") -``` -If we look at the possible outcomes of fusing two adjoint irreps, we find the by now -familiar non-Abelian fusion behavior, -```{code-cell} julia -collect(l ⊗ l) -``` -However, this particular fusion has multiplicities, since the adjoint irrep can actually -fuse to itself in two distinct ways. The full decomposition of this fusion product is given -by -```{math} -\mathbf{8} \otimes \mathbf{8} = \mathbf{1} \oplus \mathbf{3} \oplus 2 \cdot \mathbf{8} \oplus \mathbf{10} \oplus \mathbf{\overline{10}} \oplus \mathbf{27} -``` -This fusion multiplicity can be detected by using -[`Nsymbol`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.Nsymbol) -method from TensorKit.jl to inspect the number of times `l` appears in the fusion product -`l ⊗ l`, -```{code-cell} julia -Nsymbol(l, l, l) -``` -When working with irreps with fusion multiplicities, each `FusionTree` carries additional -`vertices` labels which label which of the distinct fusion vertices is being referred to. We -will return to this at the end of this section. - -Given the generators $T^k$ of $\mathrm{SU}(N)$, we can define a generalized Heisenberg model -using a similar exchange interaction, giving the Hamiltonian -```{math} -H = J \sum_{\langle i,j \rangle} \vec{T}_i \cdot \vec{T}_j -``` -For a particular choice of physical irrep, the exchange interaction can again be constructed -as a symmetric `TensorMap` by first rewriting it as -```{math} -\vec{T}_i \cdot \vec{T}_j = \frac{1}{2} \left( \left( \vec{T}_i + \vec{T}_j \right)^2 - \vec{T}_i^2 - \vec{T}_j^2 \right). -``` -For any $N$, the quadratic Casimir -```{math} -C_1 = \sum_k T^k T^k -``` -commutes with all $\mathrm{SU}(N)$ generators, meaning it has a well defined eigenvalue in -each irrep. This observation then immediately given the reduced matrix elements of the -exchange interaction as -```{figure} ../_static/SymmetricTensors/SUN_fusiontrees.svg -:scale: 12% -:name: SUN_fusiontrees -``` -Using these to directly construct the corresponding symmetric `TensorMap` is much simpler -than going through the explicit projection procedure using Clebsch-Gordan coefficients. - -For the particular example of $\mathrm{SU}(3)$, the generators are given by $T^k = -\frac{1}{2} \lambda^k$ , where $\lambda^k$ are the -[Gell-Mann matrices](https://en.wikipedia.org/wiki/Clebsch%E2%80%93Gordan_coefficients_for_SU(3)#Generators_of_the_Lie_algebra). -Each irrep can be labeled as $l = D(p,q)$ where $p$ and $q$ are refered to as the *Dynkin -labels*. The eigenvalue of the quadratic Casimir for a given irrep is given by -[Freudenthal's formula](https://en.wikipedia.org/wiki/Weyl_character_formula#Freudenthal's_formula), -```{math} -C_1(D(p,q)) = \frac{1}{3} (p^2 + q^2 + 3p + 3q + pq). -``` -Using SUNRepresentations.jl, we can compute the Casimir as -```{code-cell} julia -:tags: [hide-output] -function casimir(l::SU3Irrep) - p, q = dynkin_label(l) - return (p^2 + q^2 + 3 * p + 3 * q + p * q) / 3 -end -``` -If we use the adjoint representation of $\mathrm{SU}(3)$ as physical space, the Heisenberg -exchange interaction can then be constructed as -```{code-cell} julia -V = Vect[SUNIrrep{3}](SU3Irrep("8") => 1) -TT = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(TT) - l3 = f.uncoupled[1] - l4 = f.uncoupled[2] - k = f.coupled - TT[s, f] .= (casimir(k) - casimir(l3) - casimir(l4)) / 2 -end -TT -``` -Circling back to our earlier remark, we clearly see that the fusion trees of this tensor -indeed have non-trivial vertex labels. -```{code-cell} julia -f = collect(fusiontrees(TT))[3][2] -``` -```{code-cell} julia -f.vertices -``` - -```{note} -While we have given an explicit example using $\mathrm{SU}(3)$ with the adoint irrep on the -physical level, the same construction holds for the general $\mathrm{SU}(N)$ with arbitrary -physical irreps. All we require is the expression for the eigenvalues of the quadratic -Casimir in each irrep. -``` - - -## Level 5: Anyonic Symmetries and the Golden Chain - -While we have focussed exclusively on group-like symmetries in our discussion so far, the -framework of symmetric tensors actually extends beyond groups to so-called -[*categorical symmetries*](https://jutho.github.io/TensorKit.jl/stable/man/sectors/#ss_representationtheory). -These are quite exotic symmetries characterized in terms of -[the topological data of a unitary fusion category](https://jutho.github.io/TensorKit.jl/stable/man/categories/#ss_topologicalfusion). -While the precise details of all the terms in these statements fall beyond the scope of this -tutorial, we can give a simple example of a Hamiltonian model with a categorical symmetry -called [the golden chain](https://arxiv.org/abs/cond-mat/0612341). - -This is a one-dimensional system defined as a spin chain, where each physical 'spin' -corresponds to a so-called [Fibonacci anyon](https://arxiv.org/abs/0902.3275). There are two -such Fibonacci anyons, which we will denote as $1$ and $\tau$. They obey the fusion rules -```{math} -1 \otimes 1 = 1, \quad 1 \otimes \tau = \tau, \quad \tau \otimes \tau = 1 \oplus \tau. -``` -The Hilbert space of a chain of Fibonacci anyons is not a regular tensor product space, but -rather a *constrained Hilbert space* where the only allowed basis states are labeled by -valid Fibonacci fusion configurations. In the golden chain model, we define a -nearest-neighbor Hamiltonian on this Hilbert space by imposing an energy penalty when two -neighboring anyons fuse to a $\tau$ anyon. - -Even just writing down an explicit expression for this interaction on such a constrained -Hilbert space is not entirely straightforward. However, using the framework of symmetric -tensors it can actually be explicitly constructed in a very straightforward way. Indeed, -TensorKit.jl supports a dedicated -[`FibonacciAnyon`](https://jutho.github.io/TensorKit.jl/latest/lib/sectors/#TensorKit.FibonacciAnyon) -sector type which can be used to construct precisely such a constrained Fibonacci-graded -vector space. A Hamiltonian -```{math} -H = \sum_{\langle i,j \rangle} h_{ij} -``` -which favors neighboring anyons fusing to the vacuum can be constructed as a `TensorMap` on -the product space of two Fibonacci-graded physical spaces -```{code-cell} julia -:tags: [hide-output] -V = Vect[FibonacciAnyon](:τ => 1) -``` -and assigning the following nonzero block value to the two-site fusion trees -```{figure} ../_static/SymmetricTensors/Fib_fusiontrees.svg -:scale: 12% -:name: Fib_fusiontrees -``` -This allows us to define this, at first sight, exotic and complicated Hamiltonian in a few -simple lines of code, -```{code-cell} julia -h = TensorMap(ones, V ⊗ V ← V ⊗ V) -for (s, f) in fusiontrees(h) - h[s, f] .= f.coupled == FibonacciAnyon(:I) ? -1 : 0 -end -h -``` - -```{note} -In the previous section we have stressed the role of Clebsch-Gordan coefficients in the -structure of symmetric tensors, and how they can be used to map between the representation -of an operator in the irrep basis and its symmetric tensor representation. However, for -categorical symmetries such as the Fibonacci anyons, there are no Clebsch-Gordan -coefficients. Therefore, the 'matrix elements of the operator in the irrep basis' are not -well-defined, meaning that a Fibonacci-symmetric tensor cannot actually be converted to a -plain array in a meaningful way. -``` - - -## To Be Added - -- Add section on product symmetries and how to work with them. - - Discuss the Hubbard model with $f\mathbb{Z}_2 \boxtimes \mathrm{U}(1) \boxtimes \mathrm{SU}(2)$ as an example. -- Add a section on classical $O(N)$ models to illustrate the ('Fourier') transformation from the group element to the irrep basis for continuous symmetries. diff --git a/pr-preview/pr-27/_sources/References.ipynb b/pr-preview/pr-27/_sources/References.ipynb deleted file mode 100644 index 194ff1d3..00000000 --- a/pr-preview/pr-27/_sources/References.ipynb +++ /dev/null @@ -1,35 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "b78f8085", - "metadata": {}, - "source": [ - "(references)=\n", - "# References\n", - "\n", - "```{bibliography}\n", - ":style: alpha\n", - "```" - ] - } - ], - "metadata": { - "jupytext": { - "text_representation": { - "extension": ".md", - "format_name": "myst" - } - }, - "kernelspec": { - "display_name": "Julia", - "language": "julia", - "name": "julia-1.9" - }, - "source_map": [ - 10 - ] - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/pr-preview/pr-27/_sources/References.md b/pr-preview/pr-27/_sources/References.md deleted file mode 100644 index d54c5599..00000000 --- a/pr-preview/pr-27/_sources/References.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -jupytext: - text_representation: - extension: .md - format_name: myst -kernelspec: - display_name: Julia - language: julia - name: julia-1.9 ---- - -(references)= -# References - -```{bibliography} -:style: alpha -``` diff --git a/pr-preview/pr-27/_sources/intro.md b/pr-preview/pr-27/_sources/intro.md deleted file mode 100644 index d3d206cd..00000000 --- a/pr-preview/pr-27/_sources/intro.md +++ /dev/null @@ -1,12 +0,0 @@ -# Tensor Network Methods with Julia - -This is a series of tutorials on tensor network methods and their applications in quantum -physics as well as statistical mechanics. It illustrates the theory, and aims to give -hands-on practise by providing Julia code examples, as well as showcasing the software -libraries that have been developed. - -The lectures have been designed and written by Jacob Bridgeman, Lander Burgelman, Lukas -Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort. - -```{tableofcontents} -``` diff --git a/pr-preview/pr-27/_sphinx_design_static/design-style.4045f2051d55cab465a707391d5b2007.min.css b/pr-preview/pr-27/_sphinx_design_static/design-style.4045f2051d55cab465a707391d5b2007.min.css deleted file mode 100644 index 3225661c..00000000 --- a/pr-preview/pr-27/_sphinx_design_static/design-style.4045f2051d55cab465a707391d5b2007.min.css +++ /dev/null @@ -1 +0,0 @@ -.sd-bg-primary{background-color:var(--sd-color-primary) !important}.sd-bg-text-primary{color:var(--sd-color-primary-text) !important}button.sd-bg-primary:focus,button.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}a.sd-bg-primary:focus,a.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}.sd-bg-secondary{background-color:var(--sd-color-secondary) !important}.sd-bg-text-secondary{color:var(--sd-color-secondary-text) !important}button.sd-bg-secondary:focus,button.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}a.sd-bg-secondary:focus,a.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}.sd-bg-success{background-color:var(--sd-color-success) !important}.sd-bg-text-success{color:var(--sd-color-success-text) !important}button.sd-bg-success:focus,button.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}a.sd-bg-success:focus,a.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}.sd-bg-info{background-color:var(--sd-color-info) !important}.sd-bg-text-info{color:var(--sd-color-info-text) !important}button.sd-bg-info:focus,button.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}a.sd-bg-info:focus,a.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}.sd-bg-warning{background-color:var(--sd-color-warning) !important}.sd-bg-text-warning{color:var(--sd-color-warning-text) !important}button.sd-bg-warning:focus,button.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}a.sd-bg-warning:focus,a.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}.sd-bg-danger{background-color:var(--sd-color-danger) !important}.sd-bg-text-danger{color:var(--sd-color-danger-text) !important}button.sd-bg-danger:focus,button.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}a.sd-bg-danger:focus,a.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}.sd-bg-light{background-color:var(--sd-color-light) !important}.sd-bg-text-light{color:var(--sd-color-light-text) !important}button.sd-bg-light:focus,button.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}a.sd-bg-light:focus,a.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}.sd-bg-muted{background-color:var(--sd-color-muted) !important}.sd-bg-text-muted{color:var(--sd-color-muted-text) !important}button.sd-bg-muted:focus,button.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}a.sd-bg-muted:focus,a.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}.sd-bg-dark{background-color:var(--sd-color-dark) !important}.sd-bg-text-dark{color:var(--sd-color-dark-text) !important}button.sd-bg-dark:focus,button.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}a.sd-bg-dark:focus,a.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}.sd-bg-black{background-color:var(--sd-color-black) !important}.sd-bg-text-black{color:var(--sd-color-black-text) !important}button.sd-bg-black:focus,button.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}a.sd-bg-black:focus,a.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}.sd-bg-white{background-color:var(--sd-color-white) !important}.sd-bg-text-white{color:var(--sd-color-white-text) !important}button.sd-bg-white:focus,button.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}a.sd-bg-white:focus,a.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}.sd-text-primary,.sd-text-primary>p{color:var(--sd-color-primary) !important}a.sd-text-primary:focus,a.sd-text-primary:hover{color:var(--sd-color-primary-highlight) !important}.sd-text-secondary,.sd-text-secondary>p{color:var(--sd-color-secondary) !important}a.sd-text-secondary:focus,a.sd-text-secondary:hover{color:var(--sd-color-secondary-highlight) !important}.sd-text-success,.sd-text-success>p{color:var(--sd-color-success) !important}a.sd-text-success:focus,a.sd-text-success:hover{color:var(--sd-color-success-highlight) !important}.sd-text-info,.sd-text-info>p{color:var(--sd-color-info) !important}a.sd-text-info:focus,a.sd-text-info:hover{color:var(--sd-color-info-highlight) !important}.sd-text-warning,.sd-text-warning>p{color:var(--sd-color-warning) !important}a.sd-text-warning:focus,a.sd-text-warning:hover{color:var(--sd-color-warning-highlight) !important}.sd-text-danger,.sd-text-danger>p{color:var(--sd-color-danger) !important}a.sd-text-danger:focus,a.sd-text-danger:hover{color:var(--sd-color-danger-highlight) !important}.sd-text-light,.sd-text-light>p{color:var(--sd-color-light) !important}a.sd-text-light:focus,a.sd-text-light:hover{color:var(--sd-color-light-highlight) !important}.sd-text-muted,.sd-text-muted>p{color:var(--sd-color-muted) !important}a.sd-text-muted:focus,a.sd-text-muted:hover{color:var(--sd-color-muted-highlight) !important}.sd-text-dark,.sd-text-dark>p{color:var(--sd-color-dark) !important}a.sd-text-dark:focus,a.sd-text-dark:hover{color:var(--sd-color-dark-highlight) !important}.sd-text-black,.sd-text-black>p{color:var(--sd-color-black) !important}a.sd-text-black:focus,a.sd-text-black:hover{color:var(--sd-color-black-highlight) !important}.sd-text-white,.sd-text-white>p{color:var(--sd-color-white) !important}a.sd-text-white:focus,a.sd-text-white:hover{color:var(--sd-color-white-highlight) !important}.sd-outline-primary{border-color:var(--sd-color-primary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-primary:focus,a.sd-outline-primary:hover{border-color:var(--sd-color-primary-highlight) !important}.sd-outline-secondary{border-color:var(--sd-color-secondary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-secondary:focus,a.sd-outline-secondary:hover{border-color:var(--sd-color-secondary-highlight) !important}.sd-outline-success{border-color:var(--sd-color-success) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-success:focus,a.sd-outline-success:hover{border-color:var(--sd-color-success-highlight) !important}.sd-outline-info{border-color:var(--sd-color-info) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-info:focus,a.sd-outline-info:hover{border-color:var(--sd-color-info-highlight) !important}.sd-outline-warning{border-color:var(--sd-color-warning) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-warning:focus,a.sd-outline-warning:hover{border-color:var(--sd-color-warning-highlight) !important}.sd-outline-danger{border-color:var(--sd-color-danger) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-danger:focus,a.sd-outline-danger:hover{border-color:var(--sd-color-danger-highlight) !important}.sd-outline-light{border-color:var(--sd-color-light) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-light:focus,a.sd-outline-light:hover{border-color:var(--sd-color-light-highlight) !important}.sd-outline-muted{border-color:var(--sd-color-muted) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-muted:focus,a.sd-outline-muted:hover{border-color:var(--sd-color-muted-highlight) !important}.sd-outline-dark{border-color:var(--sd-color-dark) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-dark:focus,a.sd-outline-dark:hover{border-color:var(--sd-color-dark-highlight) !important}.sd-outline-black{border-color:var(--sd-color-black) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-black:focus,a.sd-outline-black:hover{border-color:var(--sd-color-black-highlight) !important}.sd-outline-white{border-color:var(--sd-color-white) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-white:focus,a.sd-outline-white:hover{border-color:var(--sd-color-white-highlight) !important}.sd-bg-transparent{background-color:transparent !important}.sd-outline-transparent{border-color:transparent !important}.sd-text-transparent{color:transparent !important}.sd-p-0{padding:0 !important}.sd-pt-0,.sd-py-0{padding-top:0 !important}.sd-pr-0,.sd-px-0{padding-right:0 !important}.sd-pb-0,.sd-py-0{padding-bottom:0 !important}.sd-pl-0,.sd-px-0{padding-left:0 !important}.sd-p-1{padding:.25rem !important}.sd-pt-1,.sd-py-1{padding-top:.25rem !important}.sd-pr-1,.sd-px-1{padding-right:.25rem !important}.sd-pb-1,.sd-py-1{padding-bottom:.25rem !important}.sd-pl-1,.sd-px-1{padding-left:.25rem !important}.sd-p-2{padding:.5rem !important}.sd-pt-2,.sd-py-2{padding-top:.5rem !important}.sd-pr-2,.sd-px-2{padding-right:.5rem !important}.sd-pb-2,.sd-py-2{padding-bottom:.5rem !important}.sd-pl-2,.sd-px-2{padding-left:.5rem !important}.sd-p-3{padding:1rem !important}.sd-pt-3,.sd-py-3{padding-top:1rem !important}.sd-pr-3,.sd-px-3{padding-right:1rem !important}.sd-pb-3,.sd-py-3{padding-bottom:1rem !important}.sd-pl-3,.sd-px-3{padding-left:1rem !important}.sd-p-4{padding:1.5rem !important}.sd-pt-4,.sd-py-4{padding-top:1.5rem !important}.sd-pr-4,.sd-px-4{padding-right:1.5rem !important}.sd-pb-4,.sd-py-4{padding-bottom:1.5rem !important}.sd-pl-4,.sd-px-4{padding-left:1.5rem !important}.sd-p-5{padding:3rem !important}.sd-pt-5,.sd-py-5{padding-top:3rem !important}.sd-pr-5,.sd-px-5{padding-right:3rem !important}.sd-pb-5,.sd-py-5{padding-bottom:3rem !important}.sd-pl-5,.sd-px-5{padding-left:3rem !important}.sd-m-auto{margin:auto !important}.sd-mt-auto,.sd-my-auto{margin-top:auto !important}.sd-mr-auto,.sd-mx-auto{margin-right:auto !important}.sd-mb-auto,.sd-my-auto{margin-bottom:auto !important}.sd-ml-auto,.sd-mx-auto{margin-left:auto !important}.sd-m-0{margin:0 !important}.sd-mt-0,.sd-my-0{margin-top:0 !important}.sd-mr-0,.sd-mx-0{margin-right:0 !important}.sd-mb-0,.sd-my-0{margin-bottom:0 !important}.sd-ml-0,.sd-mx-0{margin-left:0 !important}.sd-m-1{margin:.25rem !important}.sd-mt-1,.sd-my-1{margin-top:.25rem !important}.sd-mr-1,.sd-mx-1{margin-right:.25rem !important}.sd-mb-1,.sd-my-1{margin-bottom:.25rem !important}.sd-ml-1,.sd-mx-1{margin-left:.25rem !important}.sd-m-2{margin:.5rem !important}.sd-mt-2,.sd-my-2{margin-top:.5rem !important}.sd-mr-2,.sd-mx-2{margin-right:.5rem !important}.sd-mb-2,.sd-my-2{margin-bottom:.5rem !important}.sd-ml-2,.sd-mx-2{margin-left:.5rem !important}.sd-m-3{margin:1rem !important}.sd-mt-3,.sd-my-3{margin-top:1rem !important}.sd-mr-3,.sd-mx-3{margin-right:1rem !important}.sd-mb-3,.sd-my-3{margin-bottom:1rem !important}.sd-ml-3,.sd-mx-3{margin-left:1rem !important}.sd-m-4{margin:1.5rem !important}.sd-mt-4,.sd-my-4{margin-top:1.5rem !important}.sd-mr-4,.sd-mx-4{margin-right:1.5rem !important}.sd-mb-4,.sd-my-4{margin-bottom:1.5rem !important}.sd-ml-4,.sd-mx-4{margin-left:1.5rem !important}.sd-m-5{margin:3rem !important}.sd-mt-5,.sd-my-5{margin-top:3rem !important}.sd-mr-5,.sd-mx-5{margin-right:3rem !important}.sd-mb-5,.sd-my-5{margin-bottom:3rem !important}.sd-ml-5,.sd-mx-5{margin-left:3rem !important}.sd-w-25{width:25% !important}.sd-w-50{width:50% !important}.sd-w-75{width:75% !important}.sd-w-100{width:100% !important}.sd-w-auto{width:auto !important}.sd-h-25{height:25% !important}.sd-h-50{height:50% !important}.sd-h-75{height:75% !important}.sd-h-100{height:100% !important}.sd-h-auto{height:auto !important}.sd-d-none{display:none !important}.sd-d-inline{display:inline !important}.sd-d-inline-block{display:inline-block !important}.sd-d-block{display:block !important}.sd-d-grid{display:grid !important}.sd-d-flex-row{display:-ms-flexbox !important;display:flex !important;flex-direction:row !important}.sd-d-flex-column{display:-ms-flexbox !important;display:flex !important;flex-direction:column !important}.sd-d-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}@media(min-width: 576px){.sd-d-sm-none{display:none !important}.sd-d-sm-inline{display:inline !important}.sd-d-sm-inline-block{display:inline-block !important}.sd-d-sm-block{display:block !important}.sd-d-sm-grid{display:grid !important}.sd-d-sm-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-sm-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 768px){.sd-d-md-none{display:none !important}.sd-d-md-inline{display:inline !important}.sd-d-md-inline-block{display:inline-block !important}.sd-d-md-block{display:block !important}.sd-d-md-grid{display:grid !important}.sd-d-md-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-md-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 992px){.sd-d-lg-none{display:none !important}.sd-d-lg-inline{display:inline !important}.sd-d-lg-inline-block{display:inline-block !important}.sd-d-lg-block{display:block !important}.sd-d-lg-grid{display:grid !important}.sd-d-lg-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-lg-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 1200px){.sd-d-xl-none{display:none !important}.sd-d-xl-inline{display:inline !important}.sd-d-xl-inline-block{display:inline-block !important}.sd-d-xl-block{display:block !important}.sd-d-xl-grid{display:grid !important}.sd-d-xl-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-xl-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}.sd-align-major-start{justify-content:flex-start !important}.sd-align-major-end{justify-content:flex-end !important}.sd-align-major-center{justify-content:center !important}.sd-align-major-justify{justify-content:space-between !important}.sd-align-major-spaced{justify-content:space-evenly !important}.sd-align-minor-start{align-items:flex-start !important}.sd-align-minor-end{align-items:flex-end !important}.sd-align-minor-center{align-items:center !important}.sd-align-minor-stretch{align-items:stretch !important}.sd-text-justify{text-align:justify !important}.sd-text-left{text-align:left !important}.sd-text-right{text-align:right !important}.sd-text-center{text-align:center !important}.sd-font-weight-light{font-weight:300 !important}.sd-font-weight-lighter{font-weight:lighter !important}.sd-font-weight-normal{font-weight:400 !important}.sd-font-weight-bold{font-weight:700 !important}.sd-font-weight-bolder{font-weight:bolder !important}.sd-font-italic{font-style:italic !important}.sd-text-decoration-none{text-decoration:none !important}.sd-text-lowercase{text-transform:lowercase !important}.sd-text-uppercase{text-transform:uppercase !important}.sd-text-capitalize{text-transform:capitalize !important}.sd-text-wrap{white-space:normal !important}.sd-text-nowrap{white-space:nowrap !important}.sd-text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-fs-1,.sd-fs-1>p{font-size:calc(1.375rem + 1.5vw) !important;line-height:unset !important}.sd-fs-2,.sd-fs-2>p{font-size:calc(1.325rem + 0.9vw) !important;line-height:unset !important}.sd-fs-3,.sd-fs-3>p{font-size:calc(1.3rem + 0.6vw) !important;line-height:unset !important}.sd-fs-4,.sd-fs-4>p{font-size:calc(1.275rem + 0.3vw) !important;line-height:unset !important}.sd-fs-5,.sd-fs-5>p{font-size:1.25rem !important;line-height:unset !important}.sd-fs-6,.sd-fs-6>p{font-size:1rem !important;line-height:unset !important}.sd-border-0{border:0 solid !important}.sd-border-top-0{border-top:0 solid !important}.sd-border-bottom-0{border-bottom:0 solid !important}.sd-border-right-0{border-right:0 solid !important}.sd-border-left-0{border-left:0 solid !important}.sd-border-1{border:1px solid !important}.sd-border-top-1{border-top:1px solid !important}.sd-border-bottom-1{border-bottom:1px solid !important}.sd-border-right-1{border-right:1px solid !important}.sd-border-left-1{border-left:1px solid !important}.sd-border-2{border:2px solid !important}.sd-border-top-2{border-top:2px solid !important}.sd-border-bottom-2{border-bottom:2px solid !important}.sd-border-right-2{border-right:2px solid !important}.sd-border-left-2{border-left:2px solid !important}.sd-border-3{border:3px solid !important}.sd-border-top-3{border-top:3px solid !important}.sd-border-bottom-3{border-bottom:3px solid !important}.sd-border-right-3{border-right:3px solid !important}.sd-border-left-3{border-left:3px solid !important}.sd-border-4{border:4px solid !important}.sd-border-top-4{border-top:4px solid !important}.sd-border-bottom-4{border-bottom:4px solid !important}.sd-border-right-4{border-right:4px solid !important}.sd-border-left-4{border-left:4px solid !important}.sd-border-5{border:5px solid !important}.sd-border-top-5{border-top:5px solid !important}.sd-border-bottom-5{border-bottom:5px solid !important}.sd-border-right-5{border-right:5px solid !important}.sd-border-left-5{border-left:5px solid !important}.sd-rounded-0{border-radius:0 !important}.sd-rounded-1{border-radius:.2rem !important}.sd-rounded-2{border-radius:.3rem !important}.sd-rounded-3{border-radius:.5rem !important}.sd-rounded-pill{border-radius:50rem !important}.sd-rounded-circle{border-radius:50% !important}.shadow-none{box-shadow:none !important}.sd-shadow-sm{box-shadow:0 .125rem .25rem var(--sd-color-shadow) !important}.sd-shadow-md{box-shadow:0 .5rem 1rem var(--sd-color-shadow) !important}.sd-shadow-lg{box-shadow:0 1rem 3rem var(--sd-color-shadow) !important}@keyframes sd-slide-from-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes sd-slide-from-right{0%{transform:translateX(200%)}100%{transform:translateX(0)}}@keyframes sd-grow100{0%{transform:scale(0);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50{0%{transform:scale(0.5);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50-rot20{0%{transform:scale(0.5) rotateZ(-20deg);opacity:.5}75%{transform:scale(1) rotateZ(5deg);opacity:1}95%{transform:scale(1) rotateZ(-1deg);opacity:1}100%{transform:scale(1) rotateZ(0);opacity:1}}.sd-animate-slide-from-left{animation:1s ease-out 0s 1 normal none running sd-slide-from-left}.sd-animate-slide-from-right{animation:1s ease-out 0s 1 normal none running sd-slide-from-right}.sd-animate-grow100{animation:1s ease-out 0s 1 normal none running sd-grow100}.sd-animate-grow50{animation:1s ease-out 0s 1 normal none running sd-grow50}.sd-animate-grow50-rot20{animation:1s ease-out 0s 1 normal none running sd-grow50-rot20}.sd-badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.sd-badge:empty{display:none}a.sd-badge{text-decoration:none}.sd-btn .sd-badge{position:relative;top:-1px}.sd-btn{background-color:transparent;border:1px solid transparent;border-radius:.25rem;cursor:pointer;display:inline-block;font-weight:400;font-size:1rem;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;vertical-align:middle;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none}.sd-btn:hover{text-decoration:none}@media(prefers-reduced-motion: reduce){.sd-btn{transition:none}}.sd-btn-primary,.sd-btn-outline-primary:hover,.sd-btn-outline-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-primary:hover,.sd-btn-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary-highlight) !important;border-color:var(--sd-color-primary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-primary{color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary,.sd-btn-outline-secondary:hover,.sd-btn-outline-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary:hover,.sd-btn-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary-highlight) !important;border-color:var(--sd-color-secondary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-secondary{color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success,.sd-btn-outline-success:hover,.sd-btn-outline-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success:hover,.sd-btn-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success-highlight) !important;border-color:var(--sd-color-success-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-success{color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info,.sd-btn-outline-info:hover,.sd-btn-outline-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info:hover,.sd-btn-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info-highlight) !important;border-color:var(--sd-color-info-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-info{color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning,.sd-btn-outline-warning:hover,.sd-btn-outline-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning:hover,.sd-btn-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning-highlight) !important;border-color:var(--sd-color-warning-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-warning{color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger,.sd-btn-outline-danger:hover,.sd-btn-outline-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger:hover,.sd-btn-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger-highlight) !important;border-color:var(--sd-color-danger-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-danger{color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light,.sd-btn-outline-light:hover,.sd-btn-outline-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light:hover,.sd-btn-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light-highlight) !important;border-color:var(--sd-color-light-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-light{color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted,.sd-btn-outline-muted:hover,.sd-btn-outline-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted:hover,.sd-btn-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted-highlight) !important;border-color:var(--sd-color-muted-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-muted{color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark,.sd-btn-outline-dark:hover,.sd-btn-outline-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark:hover,.sd-btn-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark-highlight) !important;border-color:var(--sd-color-dark-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-dark{color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black,.sd-btn-outline-black:hover,.sd-btn-outline-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black:hover,.sd-btn-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black-highlight) !important;border-color:var(--sd-color-black-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-black{color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white,.sd-btn-outline-white:hover,.sd-btn-outline-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white:hover,.sd-btn-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white-highlight) !important;border-color:var(--sd-color-white-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-white{color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.sd-hide-link-text{font-size:0}.sd-octicon,.sd-material-icon{display:inline-block;fill:currentColor;vertical-align:middle}.sd-avatar-xs{border-radius:50%;object-fit:cover;object-position:center;width:1rem;height:1rem}.sd-avatar-sm{border-radius:50%;object-fit:cover;object-position:center;width:3rem;height:3rem}.sd-avatar-md{border-radius:50%;object-fit:cover;object-position:center;width:5rem;height:5rem}.sd-avatar-lg{border-radius:50%;object-fit:cover;object-position:center;width:7rem;height:7rem}.sd-avatar-xl{border-radius:50%;object-fit:cover;object-position:center;width:10rem;height:10rem}.sd-avatar-inherit{border-radius:50%;object-fit:cover;object-position:center;width:inherit;height:inherit}.sd-avatar-initial{border-radius:50%;object-fit:cover;object-position:center;width:initial;height:initial}.sd-card{background-clip:border-box;background-color:var(--sd-color-card-background);border:1px solid var(--sd-color-card-border);border-radius:.25rem;color:var(--sd-color-card-text);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;position:relative;word-wrap:break-word}.sd-card>hr{margin-left:0;margin-right:0}.sd-card-hover:hover{border-color:var(--sd-color-card-border-hover);transform:scale(1.01)}.sd-card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem 1rem}.sd-card-title{margin-bottom:.5rem}.sd-card-subtitle{margin-top:-0.25rem;margin-bottom:0}.sd-card-text:last-child{margin-bottom:0}.sd-card-link:hover{text-decoration:none}.sd-card-link+.card-link{margin-left:1rem}.sd-card-header{padding:.5rem 1rem;margin-bottom:0;background-color:var(--sd-color-card-header);border-bottom:1px solid var(--sd-color-card-border)}.sd-card-header:first-child{border-radius:calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0}.sd-card-footer{padding:.5rem 1rem;background-color:var(--sd-color-card-footer);border-top:1px solid var(--sd-color-card-border)}.sd-card-footer:last-child{border-radius:0 0 calc(0.25rem - 1px) calc(0.25rem - 1px)}.sd-card-header-tabs{margin-right:-0.5rem;margin-bottom:-0.5rem;margin-left:-0.5rem;border-bottom:0}.sd-card-header-pills{margin-right:-0.5rem;margin-left:-0.5rem}.sd-card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom,.sd-card-img-top{width:100%}.sd-card-img,.sd-card-img-top{border-top-left-radius:calc(0.25rem - 1px);border-top-right-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom{border-bottom-left-radius:calc(0.25rem - 1px);border-bottom-right-radius:calc(0.25rem - 1px)}.sd-cards-carousel{width:100%;display:flex;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row;overflow-x:hidden;scroll-snap-type:x mandatory}.sd-cards-carousel.sd-show-scrollbar{overflow-x:auto}.sd-cards-carousel:hover,.sd-cards-carousel:focus{overflow-x:auto}.sd-cards-carousel>.sd-card{flex-shrink:0;scroll-snap-align:start}.sd-cards-carousel>.sd-card:not(:last-child){margin-right:3px}.sd-card-cols-1>.sd-card{width:90%}.sd-card-cols-2>.sd-card{width:45%}.sd-card-cols-3>.sd-card{width:30%}.sd-card-cols-4>.sd-card{width:22.5%}.sd-card-cols-5>.sd-card{width:18%}.sd-card-cols-6>.sd-card{width:15%}.sd-card-cols-7>.sd-card{width:12.8571428571%}.sd-card-cols-8>.sd-card{width:11.25%}.sd-card-cols-9>.sd-card{width:10%}.sd-card-cols-10>.sd-card{width:9%}.sd-card-cols-11>.sd-card{width:8.1818181818%}.sd-card-cols-12>.sd-card{width:7.5%}.sd-container,.sd-container-fluid,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container-xl{margin-left:auto;margin-right:auto;padding-left:var(--sd-gutter-x, 0.75rem);padding-right:var(--sd-gutter-x, 0.75rem);width:100%}@media(min-width: 576px){.sd-container-sm,.sd-container{max-width:540px}}@media(min-width: 768px){.sd-container-md,.sd-container-sm,.sd-container{max-width:720px}}@media(min-width: 992px){.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:960px}}@media(min-width: 1200px){.sd-container-xl,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:1140px}}.sd-row{--sd-gutter-x: 1.5rem;--sd-gutter-y: 0;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(var(--sd-gutter-y) * -1);margin-right:calc(var(--sd-gutter-x) * -0.5);margin-left:calc(var(--sd-gutter-x) * -0.5)}.sd-row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--sd-gutter-x) * 0.5);padding-left:calc(var(--sd-gutter-x) * 0.5);margin-top:var(--sd-gutter-y)}.sd-col{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-auto>*{flex:0 0 auto;width:auto}.sd-row-cols-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}@media(min-width: 576px){.sd-col-sm{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-sm-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-sm-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-sm-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-sm-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-sm-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-sm-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-sm-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-sm-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-sm-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-sm-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-sm-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-sm-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-sm-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 768px){.sd-col-md{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-md-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-md-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-md-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-md-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-md-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-md-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-md-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-md-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-md-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-md-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-md-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-md-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-md-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 992px){.sd-col-lg{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-lg-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-lg-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-lg-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-lg-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-lg-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-lg-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-lg-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-lg-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-lg-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-lg-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-lg-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-lg-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-lg-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 1200px){.sd-col-xl{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-xl-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-xl-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-xl-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-xl-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-xl-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-xl-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-xl-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-xl-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-xl-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-xl-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-xl-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-xl-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-xl-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}.sd-col-auto{flex:0 0 auto;-ms-flex:0 0 auto;width:auto}.sd-col-1{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}.sd-col-2{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-col-3{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-col-4{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-col-5{flex:0 0 auto;-ms-flex:0 0 auto;width:41.6666666667%}.sd-col-6{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-col-7{flex:0 0 auto;-ms-flex:0 0 auto;width:58.3333333333%}.sd-col-8{flex:0 0 auto;-ms-flex:0 0 auto;width:66.6666666667%}.sd-col-9{flex:0 0 auto;-ms-flex:0 0 auto;width:75%}.sd-col-10{flex:0 0 auto;-ms-flex:0 0 auto;width:83.3333333333%}.sd-col-11{flex:0 0 auto;-ms-flex:0 0 auto;width:91.6666666667%}.sd-col-12{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-g-0,.sd-gy-0{--sd-gutter-y: 0}.sd-g-0,.sd-gx-0{--sd-gutter-x: 0}.sd-g-1,.sd-gy-1{--sd-gutter-y: 0.25rem}.sd-g-1,.sd-gx-1{--sd-gutter-x: 0.25rem}.sd-g-2,.sd-gy-2{--sd-gutter-y: 0.5rem}.sd-g-2,.sd-gx-2{--sd-gutter-x: 0.5rem}.sd-g-3,.sd-gy-3{--sd-gutter-y: 1rem}.sd-g-3,.sd-gx-3{--sd-gutter-x: 1rem}.sd-g-4,.sd-gy-4{--sd-gutter-y: 1.5rem}.sd-g-4,.sd-gx-4{--sd-gutter-x: 1.5rem}.sd-g-5,.sd-gy-5{--sd-gutter-y: 3rem}.sd-g-5,.sd-gx-5{--sd-gutter-x: 3rem}@media(min-width: 576px){.sd-col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-sm-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-sm-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-sm-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-sm-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-sm-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-sm-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-sm-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-sm-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-sm-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-sm-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-sm-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-sm-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-sm-0,.sd-gy-sm-0{--sd-gutter-y: 0}.sd-g-sm-0,.sd-gx-sm-0{--sd-gutter-x: 0}.sd-g-sm-1,.sd-gy-sm-1{--sd-gutter-y: 0.25rem}.sd-g-sm-1,.sd-gx-sm-1{--sd-gutter-x: 0.25rem}.sd-g-sm-2,.sd-gy-sm-2{--sd-gutter-y: 0.5rem}.sd-g-sm-2,.sd-gx-sm-2{--sd-gutter-x: 0.5rem}.sd-g-sm-3,.sd-gy-sm-3{--sd-gutter-y: 1rem}.sd-g-sm-3,.sd-gx-sm-3{--sd-gutter-x: 1rem}.sd-g-sm-4,.sd-gy-sm-4{--sd-gutter-y: 1.5rem}.sd-g-sm-4,.sd-gx-sm-4{--sd-gutter-x: 1.5rem}.sd-g-sm-5,.sd-gy-sm-5{--sd-gutter-y: 3rem}.sd-g-sm-5,.sd-gx-sm-5{--sd-gutter-x: 3rem}}@media(min-width: 768px){.sd-col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-md-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-md-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-md-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-md-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-md-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-md-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-md-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-md-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-md-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-md-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-md-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-md-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-md-0,.sd-gy-md-0{--sd-gutter-y: 0}.sd-g-md-0,.sd-gx-md-0{--sd-gutter-x: 0}.sd-g-md-1,.sd-gy-md-1{--sd-gutter-y: 0.25rem}.sd-g-md-1,.sd-gx-md-1{--sd-gutter-x: 0.25rem}.sd-g-md-2,.sd-gy-md-2{--sd-gutter-y: 0.5rem}.sd-g-md-2,.sd-gx-md-2{--sd-gutter-x: 0.5rem}.sd-g-md-3,.sd-gy-md-3{--sd-gutter-y: 1rem}.sd-g-md-3,.sd-gx-md-3{--sd-gutter-x: 1rem}.sd-g-md-4,.sd-gy-md-4{--sd-gutter-y: 1.5rem}.sd-g-md-4,.sd-gx-md-4{--sd-gutter-x: 1.5rem}.sd-g-md-5,.sd-gy-md-5{--sd-gutter-y: 3rem}.sd-g-md-5,.sd-gx-md-5{--sd-gutter-x: 3rem}}@media(min-width: 992px){.sd-col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-lg-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-lg-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-lg-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-lg-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-lg-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-lg-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-lg-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-lg-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-lg-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-lg-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-lg-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-lg-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-lg-0,.sd-gy-lg-0{--sd-gutter-y: 0}.sd-g-lg-0,.sd-gx-lg-0{--sd-gutter-x: 0}.sd-g-lg-1,.sd-gy-lg-1{--sd-gutter-y: 0.25rem}.sd-g-lg-1,.sd-gx-lg-1{--sd-gutter-x: 0.25rem}.sd-g-lg-2,.sd-gy-lg-2{--sd-gutter-y: 0.5rem}.sd-g-lg-2,.sd-gx-lg-2{--sd-gutter-x: 0.5rem}.sd-g-lg-3,.sd-gy-lg-3{--sd-gutter-y: 1rem}.sd-g-lg-3,.sd-gx-lg-3{--sd-gutter-x: 1rem}.sd-g-lg-4,.sd-gy-lg-4{--sd-gutter-y: 1.5rem}.sd-g-lg-4,.sd-gx-lg-4{--sd-gutter-x: 1.5rem}.sd-g-lg-5,.sd-gy-lg-5{--sd-gutter-y: 3rem}.sd-g-lg-5,.sd-gx-lg-5{--sd-gutter-x: 3rem}}@media(min-width: 1200px){.sd-col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-xl-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-xl-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-xl-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-xl-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-xl-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-xl-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-xl-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-xl-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-xl-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-xl-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-xl-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-xl-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-xl-0,.sd-gy-xl-0{--sd-gutter-y: 0}.sd-g-xl-0,.sd-gx-xl-0{--sd-gutter-x: 0}.sd-g-xl-1,.sd-gy-xl-1{--sd-gutter-y: 0.25rem}.sd-g-xl-1,.sd-gx-xl-1{--sd-gutter-x: 0.25rem}.sd-g-xl-2,.sd-gy-xl-2{--sd-gutter-y: 0.5rem}.sd-g-xl-2,.sd-gx-xl-2{--sd-gutter-x: 0.5rem}.sd-g-xl-3,.sd-gy-xl-3{--sd-gutter-y: 1rem}.sd-g-xl-3,.sd-gx-xl-3{--sd-gutter-x: 1rem}.sd-g-xl-4,.sd-gy-xl-4{--sd-gutter-y: 1.5rem}.sd-g-xl-4,.sd-gx-xl-4{--sd-gutter-x: 1.5rem}.sd-g-xl-5,.sd-gy-xl-5{--sd-gutter-y: 3rem}.sd-g-xl-5,.sd-gx-xl-5{--sd-gutter-x: 3rem}}.sd-flex-row-reverse{flex-direction:row-reverse !important}details.sd-dropdown{position:relative}details.sd-dropdown .sd-summary-title{font-weight:700;padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.sd-dropdown:hover{cursor:pointer}details.sd-dropdown .sd-summary-content{cursor:default}details.sd-dropdown summary{list-style:none;padding:1em}details.sd-dropdown summary .sd-octicon.no-title{vertical-align:middle}details.sd-dropdown[open] summary .sd-octicon.no-title{visibility:hidden}details.sd-dropdown summary::-webkit-details-marker{display:none}details.sd-dropdown summary:focus{outline:none}details.sd-dropdown .sd-summary-icon{margin-right:.5em}details.sd-dropdown .sd-summary-icon svg{opacity:.8}details.sd-dropdown summary:hover .sd-summary-up svg,details.sd-dropdown summary:hover .sd-summary-down svg{opacity:1;transform:scale(1.1)}details.sd-dropdown .sd-summary-up svg,details.sd-dropdown .sd-summary-down svg{display:block;opacity:.6}details.sd-dropdown .sd-summary-up,details.sd-dropdown .sd-summary-down{pointer-events:none;position:absolute;right:1em;top:1em}details.sd-dropdown[open]>.sd-summary-title .sd-summary-down{visibility:hidden}details.sd-dropdown:not([open])>.sd-summary-title .sd-summary-up{visibility:hidden}details.sd-dropdown:not([open]).sd-card{border:none}details.sd-dropdown:not([open])>.sd-card-header{border:1px solid var(--sd-color-card-border);border-radius:.25rem}details.sd-dropdown.sd-fade-in[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out;animation:sd-fade-in .5s ease-in-out}details.sd-dropdown.sd-fade-in-slide-down[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out}.sd-col>.sd-dropdown{width:100%}.sd-summary-content>.sd-tab-set:first-child{margin-top:0}@keyframes sd-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes sd-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.sd-tab-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.sd-tab-set>input{opacity:0;position:absolute}.sd-tab-set>input:checked+label{border-color:var(--sd-color-tabs-underline-active);color:var(--sd-color-tabs-label-active)}.sd-tab-set>input:checked+label+.sd-tab-content{display:block}.sd-tab-set>input:not(:checked)+label:hover{color:var(--sd-color-tabs-label-hover);border-color:var(--sd-color-tabs-underline-hover)}.sd-tab-set>input:focus+label{outline-style:auto}.sd-tab-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.sd-tab-set>label{border-bottom:.125rem solid transparent;margin-bottom:0;color:var(--sd-color-tabs-label-inactive);border-color:var(--sd-color-tabs-underline-inactive);cursor:pointer;font-size:var(--sd-fontsize-tabs-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .sd-tab-set>label:hover{color:var(--sd-color-tabs-label-active)}.sd-col>.sd-tab-set{width:100%}.sd-tab-content{box-shadow:0 -0.0625rem var(--sd-color-tabs-overline),0 .0625rem var(--sd-color-tabs-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.sd-tab-content>:first-child{margin-top:0 !important}.sd-tab-content>:last-child{margin-bottom:0 !important}.sd-tab-content>.sd-tab-set{margin:0}.sd-sphinx-override,.sd-sphinx-override *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sd-sphinx-override p{margin-top:0}:root{--sd-color-primary: #007bff;--sd-color-secondary: #6c757d;--sd-color-success: #28a745;--sd-color-info: #17a2b8;--sd-color-warning: #f0b37e;--sd-color-danger: #dc3545;--sd-color-light: #f8f9fa;--sd-color-muted: #6c757d;--sd-color-dark: #212529;--sd-color-black: black;--sd-color-white: white;--sd-color-primary-highlight: #0069d9;--sd-color-secondary-highlight: #5c636a;--sd-color-success-highlight: #228e3b;--sd-color-info-highlight: #148a9c;--sd-color-warning-highlight: #cc986b;--sd-color-danger-highlight: #bb2d3b;--sd-color-light-highlight: #d3d4d5;--sd-color-muted-highlight: #5c636a;--sd-color-dark-highlight: #1c1f23;--sd-color-black-highlight: black;--sd-color-white-highlight: #d9d9d9;--sd-color-primary-text: #fff;--sd-color-secondary-text: #fff;--sd-color-success-text: #fff;--sd-color-info-text: #fff;--sd-color-warning-text: #212529;--sd-color-danger-text: #fff;--sd-color-light-text: #212529;--sd-color-muted-text: #fff;--sd-color-dark-text: #fff;--sd-color-black-text: #fff;--sd-color-white-text: #212529;--sd-color-shadow: rgba(0, 0, 0, 0.15);--sd-color-card-border: rgba(0, 0, 0, 0.125);--sd-color-card-border-hover: hsla(231, 99%, 66%, 1);--sd-color-card-background: transparent;--sd-color-card-text: inherit;--sd-color-card-header: transparent;--sd-color-card-footer: transparent;--sd-color-tabs-label-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-hover: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-inactive: hsl(0, 0%, 66%);--sd-color-tabs-underline-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-underline-hover: rgba(178, 206, 245, 0.62);--sd-color-tabs-underline-inactive: transparent;--sd-color-tabs-overline: rgb(222, 222, 222);--sd-color-tabs-underline: rgb(222, 222, 222);--sd-fontsize-tabs-label: 1rem} diff --git a/pr-preview/pr-27/_sphinx_design_static/design-tabs.js b/pr-preview/pr-27/_sphinx_design_static/design-tabs.js deleted file mode 100644 index 36b38cf0..00000000 --- a/pr-preview/pr-27/_sphinx_design_static/design-tabs.js +++ /dev/null @@ -1,27 +0,0 @@ -var sd_labels_by_text = {}; - -function ready() { - const li = document.getElementsByClassName("sd-tab-label"); - for (const label of li) { - syncId = label.getAttribute("data-sync-id"); - if (syncId) { - label.onclick = onLabelClick; - if (!sd_labels_by_text[syncId]) { - sd_labels_by_text[syncId] = []; - } - sd_labels_by_text[syncId].push(label); - } - } -} - -function onLabelClick() { - // Activate other inputs with the same sync id. - syncId = this.getAttribute("data-sync-id"); - for (label of sd_labels_by_text[syncId]) { - if (label === this) continue; - label.previousElementSibling.checked = true; - } - window.localStorage.setItem("sphinx-design-last-tab", syncId); -} - -document.addEventListener("DOMContentLoaded", ready, false); diff --git a/pr-preview/pr-27/_static/FiniteMPS/corrFunc.svg b/pr-preview/pr-27/_static/FiniteMPS/corrFunc.svg deleted file mode 100644 index e9d4a19c..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/corrFunc.svg +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FiniteMPS/fmps.svg b/pr-preview/pr-27/_static/FiniteMPS/fmps.svg deleted file mode 100644 index f6ef1828..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/fmps.svg +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FiniteMPS/gauge.svg b/pr-preview/pr-27/_static/FiniteMPS/gauge.svg deleted file mode 100644 index 2924290d..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/gauge.svg +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FiniteMPS/leftOrth.svg b/pr-preview/pr-27/_static/FiniteMPS/leftOrth.svg deleted file mode 100644 index d68b8991..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/leftOrth.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FiniteMPS/peps.svg b/pr-preview/pr-27/_static/FiniteMPS/peps.svg deleted file mode 100644 index f1d8e434..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/peps.svg +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FiniteMPS/pfmps.svg b/pr-preview/pr-27/_static/FiniteMPS/pfmps.svg deleted file mode 100644 index dfb5e42c..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/pfmps.svg +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FiniteMPS/svd.svg b/pr-preview/pr-27/_static/FiniteMPS/svd.svg deleted file mode 100644 index 57cc8e78..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/svd.svg +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FiniteMPS/transfer.svg b/pr-preview/pr-27/_static/FiniteMPS/transfer.svg deleted file mode 100644 index 8495020c..00000000 --- a/pr-preview/pr-27/_static/FiniteMPS/transfer.svg +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/H_AC.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/H_AC.svg deleted file mode 100644 index 9181d0b6..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/H_AC.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/H_C.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/H_C.svg deleted file mode 100644 index 26ddaaf2..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/H_C.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/effHam.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/effHam.svg deleted file mode 100644 index 6cb0c773..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/effHam.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/energyOpt.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/energyOpt.svg deleted file mode 100644 index 07c9992c..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/energyOpt.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/env.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/env.svg deleted file mode 100644 index 12a650d2..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/env.svg +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/envNorm.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/envNorm.svg deleted file mode 100644 index f96ec4cf..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/envNorm.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/fixedpoint.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/fixedpoint.svg deleted file mode 100644 index a82febf8..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/fixedpoint.svg +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate.svg deleted file mode 100644 index 90f6b41b..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate.svg +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate2.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate2.svg deleted file mode 100644 index 2c15cb92..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/localUpdate2.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/FixedpointAlgorithms/mpoHam.svg b/pr-preview/pr-27/_static/FixedpointAlgorithms/mpoHam.svg deleted file mode 100644 index 4583013a..00000000 --- a/pr-preview/pr-27/_static/FixedpointAlgorithms/mpoHam.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/corrFunc.svg b/pr-preview/pr-27/_static/InfiniteMPS/corrFunc.svg deleted file mode 100644 index f7297dc0..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/corrFunc.svg +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/corrFunc2.svg b/pr-preview/pr-27/_static/InfiniteMPS/corrFunc2.svg deleted file mode 100644 index b8e33480..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/corrFunc2.svg +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/diagC.svg b/pr-preview/pr-27/_static/InfiniteMPS/diagC.svg deleted file mode 100644 index 22a28305..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/diagC.svg +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/expVal.svg b/pr-preview/pr-27/_static/InfiniteMPS/expVal.svg deleted file mode 100644 index d034abea..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/expVal.svg +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/expVal2.svg b/pr-preview/pr-27/_static/InfiniteMPS/expVal2.svg deleted file mode 100644 index d83c5afc..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/expVal2.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/expVal3.svg b/pr-preview/pr-27/_static/InfiniteMPS/expVal3.svg deleted file mode 100644 index c6eb10ba..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/expVal3.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/fixedPoints.svg b/pr-preview/pr-27/_static/InfiniteMPS/fixedPoints.svg deleted file mode 100644 index db3a38c7..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/fixedPoints.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/gaugeTransform.svg b/pr-preview/pr-27/_static/InfiniteMPS/gaugeTransform.svg deleted file mode 100644 index 67a622d3..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/gaugeTransform.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/leftGauge.svg b/pr-preview/pr-27/_static/InfiniteMPS/leftGauge.svg deleted file mode 100644 index 53c5e9a6..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/leftGauge.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/leftOrth.svg b/pr-preview/pr-27/_static/InfiniteMPS/leftOrth.svg deleted file mode 100644 index aaad8693..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/leftOrth.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/mixedGauge.svg b/pr-preview/pr-27/_static/InfiniteMPS/mixedGauge.svg deleted file mode 100644 index 99643eaa..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/mixedGauge.svg +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/mixedGauge2.svg b/pr-preview/pr-27/_static/InfiniteMPS/mixedGauge2.svg deleted file mode 100644 index 4a0749ec..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/mixedGauge2.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/mpsNorm.svg b/pr-preview/pr-27/_static/InfiniteMPS/mpsNorm.svg deleted file mode 100644 index 84b73cd6..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/mpsNorm.svg +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/normAC.svg b/pr-preview/pr-27/_static/InfiniteMPS/normAC.svg deleted file mode 100644 index 24b2a635..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/normAC.svg +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/qrConv.svg b/pr-preview/pr-27/_static/InfiniteMPS/qrConv.svg deleted file mode 100644 index 90201efa..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/qrConv.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/qrStep.svg b/pr-preview/pr-27/_static/InfiniteMPS/qrStep.svg deleted file mode 100644 index 2a6775d2..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/qrStep.svg +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/rightGauge.svg b/pr-preview/pr-27/_static/InfiniteMPS/rightGauge.svg deleted file mode 100644 index 3346982e..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/rightGauge.svg +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/rightOrth.svg b/pr-preview/pr-27/_static/InfiniteMPS/rightOrth.svg deleted file mode 100644 index 7beca237..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/rightOrth.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/tm.svg b/pr-preview/pr-27/_static/InfiniteMPS/tm.svg deleted file mode 100644 index a56823ee..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/tm.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/tmDecomp.svg b/pr-preview/pr-27/_static/InfiniteMPS/tmDecomp.svg deleted file mode 100644 index 2b6f4a26..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/tmDecomp.svg +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/tmLimit.svg b/pr-preview/pr-27/_static/InfiniteMPS/tmLimit.svg deleted file mode 100644 index 4883049e..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/tmLimit.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/tmPower.svg b/pr-preview/pr-27/_static/InfiniteMPS/tmPower.svg deleted file mode 100644 index c92058b0..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/tmPower.svg +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/traceNorm.svg b/pr-preview/pr-27/_static/InfiniteMPS/traceNorm.svg deleted file mode 100644 index 3dfdc3dd..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/traceNorm.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/truncMPS.svg b/pr-preview/pr-27/_static/InfiniteMPS/truncMPS.svg deleted file mode 100644 index 55dee528..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/truncMPS.svg +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/umps.svg b/pr-preview/pr-27/_static/InfiniteMPS/umps.svg deleted file mode 100644 index e397a964..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/umps.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/umps3.svg b/pr-preview/pr-27/_static/InfiniteMPS/umps3.svg deleted file mode 100644 index 4105b464..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/umps3.svg +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/InfiniteMPS/unitaryGauge.svg b/pr-preview/pr-27/_static/InfiniteMPS/unitaryGauge.svg deleted file mode 100644 index 0392f3ee..00000000 --- a/pr-preview/pr-27/_static/InfiniteMPS/unitaryGauge.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/boltzmann.svg b/pr-preview/pr-27/_static/MPO/boltzmann.svg deleted file mode 100644 index 662a4861..00000000 --- a/pr-preview/pr-27/_static/MPO/boltzmann.svg +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/boltzmann_mpo.svg b/pr-preview/pr-27/_static/MPO/boltzmann_mpo.svg deleted file mode 100644 index f22d2771..00000000 --- a/pr-preview/pr-27/_static/MPO/boltzmann_mpo.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/boundary_mps.svg b/pr-preview/pr-27/_static/MPO/boundary_mps.svg deleted file mode 100644 index 37c9dfca..00000000 --- a/pr-preview/pr-27/_static/MPO/boundary_mps.svg +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/expectation_value.svg b/pr-preview/pr-27/_static/MPO/expectation_value.svg deleted file mode 100644 index 33c71f63..00000000 --- a/pr-preview/pr-27/_static/MPO/expectation_value.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/expectation_value2.svg b/pr-preview/pr-27/_static/MPO/expectation_value2.svg deleted file mode 100644 index a0cde61b..00000000 --- a/pr-preview/pr-27/_static/MPO/expectation_value2.svg +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/kronecker.svg b/pr-preview/pr-27/_static/MPO/kronecker.svg deleted file mode 100644 index 60e78524..00000000 --- a/pr-preview/pr-27/_static/MPO/kronecker.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/mpo.svg b/pr-preview/pr-27/_static/MPO/mpo.svg deleted file mode 100644 index 37cc73ad..00000000 --- a/pr-preview/pr-27/_static/MPO/mpo.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/partition_function.svg b/pr-preview/pr-27/_static/MPO/partition_function.svg deleted file mode 100644 index 432d185e..00000000 --- a/pr-preview/pr-27/_static/MPO/partition_function.svg +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/partition_function_1.svg b/pr-preview/pr-27/_static/MPO/partition_function_1.svg deleted file mode 100644 index 9f7289ef..00000000 --- a/pr-preview/pr-27/_static/MPO/partition_function_1.svg +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/MPO/transfer.svg b/pr-preview/pr-27/_static/MPO/transfer.svg deleted file mode 100644 index 9edeba5b..00000000 --- a/pr-preview/pr-27/_static/MPO/transfer.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/Fib_fusiontrees.svg b/pr-preview/pr-27/_static/SymmetricTensors/Fib_fusiontrees.svg deleted file mode 100644 index 222240a5..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/Fib_fusiontrees.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/SU2_fusiontrees.svg b/pr-preview/pr-27/_static/SymmetricTensors/SU2_fusiontrees.svg deleted file mode 100644 index 098c5745..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/SU2_fusiontrees.svg +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/SUN_fusiontrees.svg b/pr-preview/pr-27/_static/SymmetricTensors/SUN_fusiontrees.svg deleted file mode 100644 index 68831c26..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/SUN_fusiontrees.svg +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/U1_fusiontrees.svg b/pr-preview/pr-27/_static/SymmetricTensors/U1_fusiontrees.svg deleted file mode 100644 index 565d1f14..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/U1_fusiontrees.svg +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/X.svg b/pr-preview/pr-27/_static/SymmetricTensors/X.svg deleted file mode 100644 index 5ff685a7..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/X.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/Z2_fusiontrees.svg b/pr-preview/pr-27/_static/SymmetricTensors/Z2_fusiontrees.svg deleted file mode 100644 index 3ed78f66..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/Z2_fusiontrees.svg +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/ZZ.svg b/pr-preview/pr-27/_static/SymmetricTensors/ZZ.svg deleted file mode 100644 index 535ef54e..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/ZZ.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/ZZX_symm.svg b/pr-preview/pr-27/_static/SymmetricTensors/ZZX_symm.svg deleted file mode 100644 index 5b8a2e54..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/ZZX_symm.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/anotherfusiontree.svg b/pr-preview/pr-27/_static/SymmetricTensors/anotherfusiontree.svg deleted file mode 100644 index b09fc18e..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/anotherfusiontree.svg +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/bosonham.svg b/pr-preview/pr-27/_static/SymmetricTensors/bosonham.svg deleted file mode 100644 index 140bc7e2..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/bosonham.svg +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/bosonops.svg b/pr-preview/pr-27/_static/SymmetricTensors/bosonops.svg deleted file mode 100644 index 0e85fb71..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/bosonops.svg +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/fZ2_fusiontrees.svg b/pr-preview/pr-27/_static/SymmetricTensors/fZ2_fusiontrees.svg deleted file mode 100644 index 6f52ad01..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/fZ2_fusiontrees.svg +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/fermioncomm.svg b/pr-preview/pr-27/_static/SymmetricTensors/fermioncomm.svg deleted file mode 100644 index 94d7fabe..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/fermioncomm.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/fermionham.svg b/pr-preview/pr-27/_static/SymmetricTensors/fermionham.svg deleted file mode 100644 index 97095372..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/fermionham.svg +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/fermionham_bis.svg b/pr-preview/pr-27/_static/SymmetricTensors/fermionham_bis.svg deleted file mode 100644 index 61d755d0..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/fermionham_bis.svg +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/fermionops.svg b/pr-preview/pr-27/_static/SymmetricTensors/fermionops.svg deleted file mode 100644 index ec70cfce..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/fermionops.svg +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/fusiontree.svg b/pr-preview/pr-27/_static/SymmetricTensors/fusiontree.svg deleted file mode 100644 index 06ec13f3..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/fusiontree.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/none2symm.svg b/pr-preview/pr-27/_static/SymmetricTensors/none2symm.svg deleted file mode 100644 index 5fcd78e7..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/none2symm.svg +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/symmetric_tensor.svg b/pr-preview/pr-27/_static/SymmetricTensors/symmetric_tensor.svg deleted file mode 100644 index a9490062..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/symmetric_tensor.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/symmtens.svg b/pr-preview/pr-27/_static/SymmetricTensors/symmtens.svg deleted file mode 100644 index eea9e734..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/symmtens.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/SymmetricTensors/wignereckart.svg b/pr-preview/pr-27/_static/SymmetricTensors/wignereckart.svg deleted file mode 100644 index ded5ba28..00000000 --- a/pr-preview/pr-27/_static/SymmetricTensors/wignereckart.svg +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworkStates/full_state.svg b/pr-preview/pr-27/_static/TensorNetworkStates/full_state.svg deleted file mode 100644 index 46d8b304..00000000 --- a/pr-preview/pr-27/_static/TensorNetworkStates/full_state.svg +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworkStates/peps.svg b/pr-preview/pr-27/_static/TensorNetworkStates/peps.svg deleted file mode 100644 index 419b0947..00000000 --- a/pr-preview/pr-27/_static/TensorNetworkStates/peps.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworkStates/svd1.svg b/pr-preview/pr-27/_static/TensorNetworkStates/svd1.svg deleted file mode 100644 index 675b705b..00000000 --- a/pr-preview/pr-27/_static/TensorNetworkStates/svd1.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworkStates/tn_state.svg b/pr-preview/pr-27/_static/TensorNetworkStates/tn_state.svg deleted file mode 100644 index 16e53425..00000000 --- a/pr-preview/pr-27/_static/TensorNetworkStates/tn_state.svg +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/R-tensor.svg b/pr-preview/pr-27/_static/TensorNetworks/R-tensor.svg deleted file mode 100644 index e9167e2f..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/R-tensor.svg +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/contraction.svg b/pr-preview/pr-27/_static/TensorNetworks/contraction.svg deleted file mode 100644 index 2a03ffca..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/contraction.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/eig.svg b/pr-preview/pr-27/_static/TensorNetworks/eig.svg deleted file mode 100644 index 916fd63b..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/eig.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/grouping.svg b/pr-preview/pr-27/_static/TensorNetworks/grouping.svg deleted file mode 100644 index d0a0d2a5..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/grouping.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/indexing.svg b/pr-preview/pr-27/_static/TensorNetworks/indexing.svg deleted file mode 100644 index 3dea74c6..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/indexing.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/ladder1.svg b/pr-preview/pr-27/_static/TensorNetworks/ladder1.svg deleted file mode 100644 index c67f46e8..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/ladder1.svg +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/ladder2.svg b/pr-preview/pr-27/_static/TensorNetworks/ladder2.svg deleted file mode 100644 index 2cb6ebc7..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/ladder2.svg +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/leftOrth.svg b/pr-preview/pr-27/_static/TensorNetworks/leftOrth.svg deleted file mode 100644 index 1b1908ed..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/leftOrth.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/matmat.svg b/pr-preview/pr-27/_static/TensorNetworks/matmat.svg deleted file mode 100644 index ae6b7b7e..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/matmat.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/matvec.svg b/pr-preview/pr-27/_static/TensorNetworks/matvec.svg deleted file mode 100644 index 6170d736..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/matvec.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/network.svg b/pr-preview/pr-27/_static/TensorNetworks/network.svg deleted file mode 100644 index 04645538..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/network.svg +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/outer-product.svg b/pr-preview/pr-27/_static/TensorNetworks/outer-product.svg deleted file mode 100644 index dca3b94a..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/outer-product.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/polar.svg b/pr-preview/pr-27/_static/TensorNetworks/polar.svg deleted file mode 100644 index 58615820..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/polar.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/qr.svg b/pr-preview/pr-27/_static/TensorNetworks/qr.svg deleted file mode 100644 index 490b8dc6..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/qr.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/svd.svg b/pr-preview/pr-27/_static/TensorNetworks/svd.svg deleted file mode 100644 index 560a1d95..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/svd.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/tr.svg b/pr-preview/pr-27/_static/TensorNetworks/tr.svg deleted file mode 100644 index 68a55fd7..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/tr.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/trace-cyclic.svg b/pr-preview/pr-27/_static/TensorNetworks/trace-cyclic.svg deleted file mode 100644 index 241d3830..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/trace-cyclic.svg +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/trace.svg b/pr-preview/pr-27/_static/TensorNetworks/trace.svg deleted file mode 100644 index f881bb6b..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/trace.svg +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/unitary.svg b/pr-preview/pr-27/_static/TensorNetworks/unitary.svg deleted file mode 100644 index 62d28306..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/unitary.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TensorNetworks/vecvec.svg b/pr-preview/pr-27/_static/TensorNetworks/vecvec.svg deleted file mode 100644 index eef1b7ce..00000000 --- a/pr-preview/pr-27/_static/TensorNetworks/vecvec.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/AncillaMPS.svg b/pr-preview/pr-27/_static/TimeEvolution/AncillaMPS.svg deleted file mode 100644 index c013f239..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/AncillaMPS.svg +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/DensityMatrix.svg b/pr-preview/pr-27/_static/TimeEvolution/DensityMatrix.svg deleted file mode 100644 index c73a9dff..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/DensityMatrix.svg +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/FirstOrderTrick.svg b/pr-preview/pr-27/_static/TimeEvolution/FirstOrderTrick.svg deleted file mode 100644 index ce5a029a..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/FirstOrderTrick.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/Heffs.svg b/pr-preview/pr-27/_static/TimeEvolution/Heffs.svg deleted file mode 100644 index e8e2ce48..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/Heffs.svg +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/ImagTimeEvolution.svg b/pr-preview/pr-27/_static/TimeEvolution/ImagTimeEvolution.svg deleted file mode 100644 index 207c2ffc..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/ImagTimeEvolution.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/MPOHam.svg b/pr-preview/pr-27/_static/TimeEvolution/MPOHam.svg deleted file mode 100644 index 881042d5..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/MPOHam.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/Mconstraint.svg b/pr-preview/pr-27/_static/TimeEvolution/Mconstraint.svg deleted file mode 100644 index 09f0661e..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/Mconstraint.svg +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/TDVPProjector.svg b/pr-preview/pr-27/_static/TimeEvolution/TDVPProjector.svg deleted file mode 100644 index a1af1a4c..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/TDVPProjector.svg +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/TimeEvolution.svg b/pr-preview/pr-27/_static/TimeEvolution/TimeEvolution.svg deleted file mode 100644 index f5805700..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/TimeEvolution.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/TimeEvolution/TimeMPO_1stOrder.svg b/pr-preview/pr-27/_static/TimeEvolution/TimeMPO_1stOrder.svg deleted file mode 100644 index a792d4f9..00000000 --- a/pr-preview/pr-27/_static/TimeEvolution/TimeMPO_1stOrder.svg +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/_sphinx_javascript_frameworks_compat.js b/pr-preview/pr-27/_static/_sphinx_javascript_frameworks_compat.js deleted file mode 100644 index 8549469d..00000000 --- a/pr-preview/pr-27/_static/_sphinx_javascript_frameworks_compat.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * _sphinx_javascript_frameworks_compat.js - * ~~~~~~~~~~ - * - * Compatability shim for jQuery and underscores.js. - * - * WILL BE REMOVED IN Sphinx 6.0 - * xref RemovedInSphinx60Warning - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - - -/** - * small helper function to urldecode strings - * - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL - */ -jQuery.urldecode = function(x) { - if (!x) { - return x - } - return decodeURIComponent(x.replace(/\+/g, ' ')); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s === 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node, addItems) { - if (node.nodeType === 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && - !jQuery(node.parentNode).hasClass(className) && - !jQuery(node.parentNode).hasClass("nohighlight")) { - var span; - var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.className = className; - } - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - if (isInSVG) { - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - var bbox = node.parentElement.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute('class', className); - addItems.push({ - "parent": node.parentNode, - "target": rect}); - } - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this, addItems); - }); - } - } - var addItems = []; - var result = this.each(function() { - highlight(this, addItems); - }); - for (var i = 0; i < addItems.length; ++i) { - jQuery(addItems[i].parent).before(addItems[i].target); - } - return result; -}; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} diff --git a/pr-preview/pr-27/_static/basic.css b/pr-preview/pr-27/_static/basic.css deleted file mode 100644 index 5685b52e..00000000 --- a/pr-preview/pr-27/_static/basic.css +++ /dev/null @@ -1,928 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -div.section::after { - display: block; - content: ''; - clear: left; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 270px; - margin-left: -100%; - font-size: 90%; - word-wrap: break-word; - overflow-wrap : break-word; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox form.search { - overflow: hidden; -} - -div.sphinxsidebar #searchbox input[type="text"] { - float: left; - width: 80%; - padding: 0.25em; - box-sizing: border-box; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - float: left; - width: 20%; - border-left: none; - padding: 0.25em; - box-sizing: border-box; -} - - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li p.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; - margin-left: auto; - margin-right: auto; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable ul { - margin-top: 0; - margin-bottom: 0; - list-style-type: none; -} - -table.indextable > tbody > tr > td > ul { - padding-left: 0em; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- domain module index --------------------------------------------------- */ - -table.modindextable td { - padding: 2px; - border-collapse: collapse; -} - -/* -- general body styles --------------------------------------------------- */ - -div.body { - min-width: 360px; - max-width: 800px; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - -moz-hyphens: auto; - -ms-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; -} - -a.headerlink { - visibility: hidden; -} -a.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink, -caption:hover > a.headerlink, -p.caption:hover > a.headerlink, -div.code-block-caption:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, figure.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, figure.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, figure.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -img.align-default, figure.align-default, .figure.align-default { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-default { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar, -aside.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px; - background-color: #ffe; - width: 40%; - float: right; - clear: right; - overflow-x: auto; -} - -p.sidebar-title { - font-weight: bold; -} -div.admonition, div.topic, blockquote { - clear: left; -} - -/* -- topics ---------------------------------------------------------------- */ -div.topic { - border: 1px solid #ccc; - padding: 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- content of sidebars/topics/admonitions -------------------------------- */ - -div.sidebar > :last-child, -aside.sidebar > :last-child, -div.topic > :last-child, -div.admonition > :last-child { - margin-bottom: 0; -} - -div.sidebar::after, -aside.sidebar::after, -div.topic::after, -div.admonition::after, -blockquote::after { - display: block; - content: ''; - clear: both; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - margin-top: 10px; - margin-bottom: 10px; - border: 0; - border-collapse: collapse; -} - -table.align-center { - margin-left: auto; - margin-right: auto; -} - -table.align-default { - margin-left: auto; - margin-right: auto; -} - -table caption span.caption-number { - font-style: italic; -} - -table caption span.caption-text { -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -th > :first-child, -td > :first-child { - margin-top: 0px; -} - -th > :last-child, -td > :last-child { - margin-bottom: 0px; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure, figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption, figcaption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number, -figcaption span.caption-number { - font-style: italic; -} - -div.figure p.caption span.caption-text, -figcaption span.caption-text { -} - -/* -- field list styles ----------------------------------------------------- */ - -table.field-list td, table.field-list th { - border: 0 !important; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.field-name { - -moz-hyphens: manual; - -ms-hyphens: manual; - -webkit-hyphens: manual; - hyphens: manual; -} - -/* -- hlist styles ---------------------------------------------------------- */ - -table.hlist { - margin: 1em 0; -} - -table.hlist td { - vertical-align: top; -} - -/* -- object description styles --------------------------------------------- */ - -.sig { - font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; -} - -.sig-name, code.descname { - background-color: transparent; - font-weight: bold; -} - -.sig-name { - font-size: 1.1em; -} - -code.descname { - font-size: 1.2em; -} - -.sig-prename, code.descclassname { - background-color: transparent; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.sig-param.n { - font-style: italic; -} - -/* C++ specific styling */ - -.sig-inline.c-texpr, -.sig-inline.cpp-texpr { - font-family: unset; -} - -.sig.c .k, .sig.c .kt, -.sig.cpp .k, .sig.cpp .kt { - color: #0033B3; -} - -.sig.c .m, -.sig.cpp .m { - color: #1750EB; -} - -.sig.c .s, .sig.c .sc, -.sig.cpp .s, .sig.cpp .sc { - color: #067D17; -} - - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -:not(li) > ol > li:first-child > :first-child, -:not(li) > ul > li:first-child > :first-child { - margin-top: 0px; -} - -:not(li) > ol > li:last-child > :last-child, -:not(li) > ul > li:last-child > :last-child { - margin-bottom: 0px; -} - -ol.simple ol p, -ol.simple ul p, -ul.simple ol p, -ul.simple ul p { - margin-top: 0; -} - -ol.simple > li:not(:first-child) > p, -ul.simple > li:not(:first-child) > p { - margin-top: 0; -} - -ol.simple p, -ul.simple p { - margin-bottom: 0; -} - -/* Docutils 0.17 and older (footnotes & citations) */ -dl.footnote > dt, -dl.citation > dt { - float: left; - margin-right: 0.5em; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd:after { - content: ""; - clear: both; -} - -/* Docutils 0.18+ (footnotes & citations) */ -aside.footnote > span, -div.citation > span { - float: left; -} -aside.footnote > span:last-of-type, -div.citation > span:last-of-type { - padding-right: 0.5em; -} -aside.footnote > p { - margin-left: 2em; -} -div.citation > p { - margin-left: 4em; -} -aside.footnote > p:last-of-type, -div.citation > p:last-of-type { - margin-bottom: 0em; -} -aside.footnote > p:last-of-type:after, -div.citation > p:last-of-type:after { - content: ""; - clear: both; -} - -/* Footnotes & citations ends */ - -dl.field-list { - display: grid; - grid-template-columns: fit-content(30%) auto; -} - -dl.field-list > dt { - font-weight: bold; - word-break: break-word; - padding-left: 0.5em; - padding-right: 5px; -} - -dl.field-list > dt:after { - content: ":"; -} - -dl.field-list > dd { - padding-left: 0.5em; - margin-top: 0em; - margin-left: 0em; - margin-bottom: 0em; -} - -dl { - margin-bottom: 15px; -} - -dd > :first-child { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dl > dd:last-child, -dl > dd:last-child > :last-child { - margin-bottom: 0; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -.classifier:before { - font-style: normal; - margin: 0 0.5em; - content: ":"; - display: inline-block; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -pre, div[class*="highlight-"] { - clear: both; -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; - white-space: nowrap; -} - -div[class*="highlight-"] { - margin: 1em 0; -} - -td.linenos pre { - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - display: block; -} - -table.highlighttable tbody { - display: block; -} - -table.highlighttable tr { - display: flex; -} - -table.highlighttable td { - margin: 0; - padding: 0; -} - -table.highlighttable td.linenos { - padding-right: 0.5em; -} - -table.highlighttable td.code { - flex: 1; - overflow: hidden; -} - -.highlight .hll { - display: block; -} - -div.highlight pre, -table.highlighttable pre { - margin: 0; -} - -div.code-block-caption + div { - margin-top: 0; -} - -div.code-block-caption { - margin-top: 1em; - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -table.highlighttable td.linenos, -span.linenos, -div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; - -webkit-user-select: text; /* Safari fallback only */ - -webkit-user-select: none; /* Chrome/Safari */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* IE10+ */ -} - -div.code-block-caption span.caption-number { - padding: 0.1em 0.3em; - font-style: italic; -} - -div.code-block-caption span.caption-text { -} - -div.literal-block-wrapper { - margin: 1em 0; -} - -code.xref, a code { - background-color: transparent; - font-weight: bold; -} - -h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -span.eqno a.headerlink { - position: absolute; - z-index: 1; -} - -div.math:hover a.headerlink { - visibility: visible; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/pr-preview/pr-27/_static/check-solid.svg b/pr-preview/pr-27/_static/check-solid.svg deleted file mode 100644 index 92fad4b5..00000000 --- a/pr-preview/pr-27/_static/check-solid.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/pr-preview/pr-27/_static/clipboard.min.js b/pr-preview/pr-27/_static/clipboard.min.js deleted file mode 100644 index 54b3c463..00000000 --- a/pr-preview/pr-27/_static/clipboard.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * clipboard.js v2.0.8 - * https://clipboardjs.com/ - * - * Licensed MIT © Zeno Rocha - */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1 - - - - diff --git a/pr-preview/pr-27/_static/copybutton.css b/pr-preview/pr-27/_static/copybutton.css deleted file mode 100644 index f1916ec7..00000000 --- a/pr-preview/pr-27/_static/copybutton.css +++ /dev/null @@ -1,94 +0,0 @@ -/* Copy buttons */ -button.copybtn { - position: absolute; - display: flex; - top: .3em; - right: .3em; - width: 1.7em; - height: 1.7em; - opacity: 0; - transition: opacity 0.3s, border .3s, background-color .3s; - user-select: none; - padding: 0; - border: none; - outline: none; - border-radius: 0.4em; - /* The colors that GitHub uses */ - border: #1b1f2426 1px solid; - background-color: #f6f8fa; - color: #57606a; -} - -button.copybtn.success { - border-color: #22863a; - color: #22863a; -} - -button.copybtn svg { - stroke: currentColor; - width: 1.5em; - height: 1.5em; - padding: 0.1em; -} - -div.highlight { - position: relative; -} - -/* Show the copybutton */ -.highlight:hover button.copybtn, button.copybtn.success { - opacity: 1; -} - -.highlight button.copybtn:hover { - background-color: rgb(235, 235, 235); -} - -.highlight button.copybtn:active { - background-color: rgb(187, 187, 187); -} - -/** - * A minimal CSS-only tooltip copied from: - * https://codepen.io/mildrenben/pen/rVBrpK - * - * To use, write HTML like the following: - * - *

Short

- */ - .o-tooltip--left { - position: relative; - } - - .o-tooltip--left:after { - opacity: 0; - visibility: hidden; - position: absolute; - content: attr(data-tooltip); - padding: .2em; - font-size: .8em; - left: -.2em; - background: grey; - color: white; - white-space: nowrap; - z-index: 2; - border-radius: 2px; - transform: translateX(-102%) translateY(0); - transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); -} - -.o-tooltip--left:hover:after { - display: block; - opacity: 1; - visibility: visible; - transform: translateX(-100%) translateY(0); - transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); - transition-delay: .5s; -} - -/* By default the copy button shouldn't show up when printing a page */ -@media print { - button.copybtn { - display: none; - } -} diff --git a/pr-preview/pr-27/_static/copybutton.js b/pr-preview/pr-27/_static/copybutton.js deleted file mode 100644 index 2ea7ff3e..00000000 --- a/pr-preview/pr-27/_static/copybutton.js +++ /dev/null @@ -1,248 +0,0 @@ -// Localization support -const messages = { - 'en': { - 'copy': 'Copy', - 'copy_to_clipboard': 'Copy to clipboard', - 'copy_success': 'Copied!', - 'copy_failure': 'Failed to copy', - }, - 'es' : { - 'copy': 'Copiar', - 'copy_to_clipboard': 'Copiar al portapapeles', - 'copy_success': '¡Copiado!', - 'copy_failure': 'Error al copiar', - }, - 'de' : { - 'copy': 'Kopieren', - 'copy_to_clipboard': 'In die Zwischenablage kopieren', - 'copy_success': 'Kopiert!', - 'copy_failure': 'Fehler beim Kopieren', - }, - 'fr' : { - 'copy': 'Copier', - 'copy_to_clipboard': 'Copier dans le presse-papier', - 'copy_success': 'Copié !', - 'copy_failure': 'Échec de la copie', - }, - 'ru': { - 'copy': 'Скопировать', - 'copy_to_clipboard': 'Скопировать в буфер', - 'copy_success': 'Скопировано!', - 'copy_failure': 'Не удалось скопировать', - }, - 'zh-CN': { - 'copy': '复制', - 'copy_to_clipboard': '复制到剪贴板', - 'copy_success': '复制成功!', - 'copy_failure': '复制失败', - }, - 'it' : { - 'copy': 'Copiare', - 'copy_to_clipboard': 'Copiato negli appunti', - 'copy_success': 'Copiato!', - 'copy_failure': 'Errore durante la copia', - } -} - -let locale = 'en' -if( document.documentElement.lang !== undefined - && messages[document.documentElement.lang] !== undefined ) { - locale = document.documentElement.lang -} - -let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT; -if (doc_url_root == '#') { - doc_url_root = ''; -} - -/** - * SVG files for our copy buttons - */ -let iconCheck = ` - ${messages[locale]['copy_success']} - - -` - -// If the user specified their own SVG use that, otherwise use the default -let iconCopy = ``; -if (!iconCopy) { - iconCopy = ` - ${messages[locale]['copy_to_clipboard']} - - - -` -} - -/** - * Set up copy/paste for code blocks - */ - -const runWhenDOMLoaded = cb => { - if (document.readyState != 'loading') { - cb() - } else if (document.addEventListener) { - document.addEventListener('DOMContentLoaded', cb) - } else { - document.attachEvent('onreadystatechange', function() { - if (document.readyState == 'complete') cb() - }) - } -} - -const codeCellId = index => `codecell${index}` - -// Clears selected text since ClipboardJS will select the text when copying -const clearSelection = () => { - if (window.getSelection) { - window.getSelection().removeAllRanges() - } else if (document.selection) { - document.selection.empty() - } -} - -// Changes tooltip text for a moment, then changes it back -// We want the timeout of our `success` class to be a bit shorter than the -// tooltip and icon change, so that we can hide the icon before changing back. -var timeoutIcon = 2000; -var timeoutSuccessClass = 1500; - -const temporarilyChangeTooltip = (el, oldText, newText) => { - el.setAttribute('data-tooltip', newText) - el.classList.add('success') - // Remove success a little bit sooner than we change the tooltip - // So that we can use CSS to hide the copybutton first - setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) - setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) -} - -// Changes the copy button icon for two seconds, then changes it back -const temporarilyChangeIcon = (el) => { - el.innerHTML = iconCheck; - setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) -} - -const addCopyButtonToCodeCells = () => { - // If ClipboardJS hasn't loaded, wait a bit and try again. This - // happens because we load ClipboardJS asynchronously. - if (window.ClipboardJS === undefined) { - setTimeout(addCopyButtonToCodeCells, 250) - return - } - - // Add copybuttons to all of our code cells - const COPYBUTTON_SELECTOR = 'div.highlight pre'; - const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) - codeCells.forEach((codeCell, index) => { - const id = codeCellId(index) - codeCell.setAttribute('id', id) - - const clipboardButton = id => - `` - codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) - }) - -function escapeRegExp(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string -} - -/** - * Removes excluded text from a Node. - * - * @param {Node} target Node to filter. - * @param {string} exclude CSS selector of nodes to exclude. - * @returns {DOMString} Text from `target` with text removed. - */ -function filterText(target, exclude) { - const clone = target.cloneNode(true); // clone as to not modify the live DOM - if (exclude) { - // remove excluded nodes - clone.querySelectorAll(exclude).forEach(node => node.remove()); - } - return clone.innerText; -} - -// Callback when a copy button is clicked. Will be passed the node that was clicked -// should then grab the text and replace pieces of text that shouldn't be used in output -function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { - var regexp; - var match; - - // Do we check for line continuation characters and "HERE-documents"? - var useLineCont = !!lineContinuationChar - var useHereDoc = !!hereDocDelim - - // create regexp to capture prompt and remaining line - if (isRegexp) { - regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') - } else { - regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') - } - - const outputLines = []; - var promptFound = false; - var gotLineCont = false; - var gotHereDoc = false; - const lineGotPrompt = []; - for (const line of textContent.split('\n')) { - match = line.match(regexp) - if (match || gotLineCont || gotHereDoc) { - promptFound = regexp.test(line) - lineGotPrompt.push(promptFound) - if (removePrompts && promptFound) { - outputLines.push(match[2]) - } else { - outputLines.push(line) - } - gotLineCont = line.endsWith(lineContinuationChar) & useLineCont - if (line.includes(hereDocDelim) & useHereDoc) - gotHereDoc = !gotHereDoc - } else if (!onlyCopyPromptLines) { - outputLines.push(line) - } else if (copyEmptyLines && line.trim() === '') { - outputLines.push(line) - } - } - - // If no lines with the prompt were found then just use original lines - if (lineGotPrompt.some(v => v === true)) { - textContent = outputLines.join('\n'); - } - - // Remove a trailing newline to avoid auto-running when pasting - if (textContent.endsWith("\n")) { - textContent = textContent.slice(0, -1) - } - return textContent -} - - -var copyTargetText = (trigger) => { - var target = document.querySelector(trigger.attributes['data-clipboard-target'].value); - - // get filtered text - let exclude = '.linenos'; - - let text = filterText(target, exclude); - return formatCopyText(text, '', false, true, true, true, '', '') -} - - // Initialize with a callback so we can modify the text before copy - const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText}) - - // Update UI with error/success messages - clipboard.on('success', event => { - clearSelection() - temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success']) - temporarilyChangeIcon(event.trigger) - }) - - clipboard.on('error', event => { - temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure']) - }) -} - -runWhenDOMLoaded(addCopyButtonToCodeCells) \ No newline at end of file diff --git a/pr-preview/pr-27/_static/copybutton_funcs.js b/pr-preview/pr-27/_static/copybutton_funcs.js deleted file mode 100644 index dbe1aaad..00000000 --- a/pr-preview/pr-27/_static/copybutton_funcs.js +++ /dev/null @@ -1,73 +0,0 @@ -function escapeRegExp(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string -} - -/** - * Removes excluded text from a Node. - * - * @param {Node} target Node to filter. - * @param {string} exclude CSS selector of nodes to exclude. - * @returns {DOMString} Text from `target` with text removed. - */ -export function filterText(target, exclude) { - const clone = target.cloneNode(true); // clone as to not modify the live DOM - if (exclude) { - // remove excluded nodes - clone.querySelectorAll(exclude).forEach(node => node.remove()); - } - return clone.innerText; -} - -// Callback when a copy button is clicked. Will be passed the node that was clicked -// should then grab the text and replace pieces of text that shouldn't be used in output -export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { - var regexp; - var match; - - // Do we check for line continuation characters and "HERE-documents"? - var useLineCont = !!lineContinuationChar - var useHereDoc = !!hereDocDelim - - // create regexp to capture prompt and remaining line - if (isRegexp) { - regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') - } else { - regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') - } - - const outputLines = []; - var promptFound = false; - var gotLineCont = false; - var gotHereDoc = false; - const lineGotPrompt = []; - for (const line of textContent.split('\n')) { - match = line.match(regexp) - if (match || gotLineCont || gotHereDoc) { - promptFound = regexp.test(line) - lineGotPrompt.push(promptFound) - if (removePrompts && promptFound) { - outputLines.push(match[2]) - } else { - outputLines.push(line) - } - gotLineCont = line.endsWith(lineContinuationChar) & useLineCont - if (line.includes(hereDocDelim) & useHereDoc) - gotHereDoc = !gotHereDoc - } else if (!onlyCopyPromptLines) { - outputLines.push(line) - } else if (copyEmptyLines && line.trim() === '') { - outputLines.push(line) - } - } - - // If no lines with the prompt were found then just use original lines - if (lineGotPrompt.some(v => v === true)) { - textContent = outputLines.join('\n'); - } - - // Remove a trailing newline to avoid auto-running when pasting - if (textContent.endsWith("\n")) { - textContent = textContent.slice(0, -1) - } - return textContent -} diff --git a/pr-preview/pr-27/_static/design-style.4045f2051d55cab465a707391d5b2007.min.css b/pr-preview/pr-27/_static/design-style.4045f2051d55cab465a707391d5b2007.min.css deleted file mode 100644 index 3225661c..00000000 --- a/pr-preview/pr-27/_static/design-style.4045f2051d55cab465a707391d5b2007.min.css +++ /dev/null @@ -1 +0,0 @@ -.sd-bg-primary{background-color:var(--sd-color-primary) !important}.sd-bg-text-primary{color:var(--sd-color-primary-text) !important}button.sd-bg-primary:focus,button.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}a.sd-bg-primary:focus,a.sd-bg-primary:hover{background-color:var(--sd-color-primary-highlight) !important}.sd-bg-secondary{background-color:var(--sd-color-secondary) !important}.sd-bg-text-secondary{color:var(--sd-color-secondary-text) !important}button.sd-bg-secondary:focus,button.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}a.sd-bg-secondary:focus,a.sd-bg-secondary:hover{background-color:var(--sd-color-secondary-highlight) !important}.sd-bg-success{background-color:var(--sd-color-success) !important}.sd-bg-text-success{color:var(--sd-color-success-text) !important}button.sd-bg-success:focus,button.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}a.sd-bg-success:focus,a.sd-bg-success:hover{background-color:var(--sd-color-success-highlight) !important}.sd-bg-info{background-color:var(--sd-color-info) !important}.sd-bg-text-info{color:var(--sd-color-info-text) !important}button.sd-bg-info:focus,button.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}a.sd-bg-info:focus,a.sd-bg-info:hover{background-color:var(--sd-color-info-highlight) !important}.sd-bg-warning{background-color:var(--sd-color-warning) !important}.sd-bg-text-warning{color:var(--sd-color-warning-text) !important}button.sd-bg-warning:focus,button.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}a.sd-bg-warning:focus,a.sd-bg-warning:hover{background-color:var(--sd-color-warning-highlight) !important}.sd-bg-danger{background-color:var(--sd-color-danger) !important}.sd-bg-text-danger{color:var(--sd-color-danger-text) !important}button.sd-bg-danger:focus,button.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}a.sd-bg-danger:focus,a.sd-bg-danger:hover{background-color:var(--sd-color-danger-highlight) !important}.sd-bg-light{background-color:var(--sd-color-light) !important}.sd-bg-text-light{color:var(--sd-color-light-text) !important}button.sd-bg-light:focus,button.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}a.sd-bg-light:focus,a.sd-bg-light:hover{background-color:var(--sd-color-light-highlight) !important}.sd-bg-muted{background-color:var(--sd-color-muted) !important}.sd-bg-text-muted{color:var(--sd-color-muted-text) !important}button.sd-bg-muted:focus,button.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}a.sd-bg-muted:focus,a.sd-bg-muted:hover{background-color:var(--sd-color-muted-highlight) !important}.sd-bg-dark{background-color:var(--sd-color-dark) !important}.sd-bg-text-dark{color:var(--sd-color-dark-text) !important}button.sd-bg-dark:focus,button.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}a.sd-bg-dark:focus,a.sd-bg-dark:hover{background-color:var(--sd-color-dark-highlight) !important}.sd-bg-black{background-color:var(--sd-color-black) !important}.sd-bg-text-black{color:var(--sd-color-black-text) !important}button.sd-bg-black:focus,button.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}a.sd-bg-black:focus,a.sd-bg-black:hover{background-color:var(--sd-color-black-highlight) !important}.sd-bg-white{background-color:var(--sd-color-white) !important}.sd-bg-text-white{color:var(--sd-color-white-text) !important}button.sd-bg-white:focus,button.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}a.sd-bg-white:focus,a.sd-bg-white:hover{background-color:var(--sd-color-white-highlight) !important}.sd-text-primary,.sd-text-primary>p{color:var(--sd-color-primary) !important}a.sd-text-primary:focus,a.sd-text-primary:hover{color:var(--sd-color-primary-highlight) !important}.sd-text-secondary,.sd-text-secondary>p{color:var(--sd-color-secondary) !important}a.sd-text-secondary:focus,a.sd-text-secondary:hover{color:var(--sd-color-secondary-highlight) !important}.sd-text-success,.sd-text-success>p{color:var(--sd-color-success) !important}a.sd-text-success:focus,a.sd-text-success:hover{color:var(--sd-color-success-highlight) !important}.sd-text-info,.sd-text-info>p{color:var(--sd-color-info) !important}a.sd-text-info:focus,a.sd-text-info:hover{color:var(--sd-color-info-highlight) !important}.sd-text-warning,.sd-text-warning>p{color:var(--sd-color-warning) !important}a.sd-text-warning:focus,a.sd-text-warning:hover{color:var(--sd-color-warning-highlight) !important}.sd-text-danger,.sd-text-danger>p{color:var(--sd-color-danger) !important}a.sd-text-danger:focus,a.sd-text-danger:hover{color:var(--sd-color-danger-highlight) !important}.sd-text-light,.sd-text-light>p{color:var(--sd-color-light) !important}a.sd-text-light:focus,a.sd-text-light:hover{color:var(--sd-color-light-highlight) !important}.sd-text-muted,.sd-text-muted>p{color:var(--sd-color-muted) !important}a.sd-text-muted:focus,a.sd-text-muted:hover{color:var(--sd-color-muted-highlight) !important}.sd-text-dark,.sd-text-dark>p{color:var(--sd-color-dark) !important}a.sd-text-dark:focus,a.sd-text-dark:hover{color:var(--sd-color-dark-highlight) !important}.sd-text-black,.sd-text-black>p{color:var(--sd-color-black) !important}a.sd-text-black:focus,a.sd-text-black:hover{color:var(--sd-color-black-highlight) !important}.sd-text-white,.sd-text-white>p{color:var(--sd-color-white) !important}a.sd-text-white:focus,a.sd-text-white:hover{color:var(--sd-color-white-highlight) !important}.sd-outline-primary{border-color:var(--sd-color-primary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-primary:focus,a.sd-outline-primary:hover{border-color:var(--sd-color-primary-highlight) !important}.sd-outline-secondary{border-color:var(--sd-color-secondary) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-secondary:focus,a.sd-outline-secondary:hover{border-color:var(--sd-color-secondary-highlight) !important}.sd-outline-success{border-color:var(--sd-color-success) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-success:focus,a.sd-outline-success:hover{border-color:var(--sd-color-success-highlight) !important}.sd-outline-info{border-color:var(--sd-color-info) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-info:focus,a.sd-outline-info:hover{border-color:var(--sd-color-info-highlight) !important}.sd-outline-warning{border-color:var(--sd-color-warning) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-warning:focus,a.sd-outline-warning:hover{border-color:var(--sd-color-warning-highlight) !important}.sd-outline-danger{border-color:var(--sd-color-danger) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-danger:focus,a.sd-outline-danger:hover{border-color:var(--sd-color-danger-highlight) !important}.sd-outline-light{border-color:var(--sd-color-light) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-light:focus,a.sd-outline-light:hover{border-color:var(--sd-color-light-highlight) !important}.sd-outline-muted{border-color:var(--sd-color-muted) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-muted:focus,a.sd-outline-muted:hover{border-color:var(--sd-color-muted-highlight) !important}.sd-outline-dark{border-color:var(--sd-color-dark) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-dark:focus,a.sd-outline-dark:hover{border-color:var(--sd-color-dark-highlight) !important}.sd-outline-black{border-color:var(--sd-color-black) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-black:focus,a.sd-outline-black:hover{border-color:var(--sd-color-black-highlight) !important}.sd-outline-white{border-color:var(--sd-color-white) !important;border-style:solid !important;border-width:1px !important}a.sd-outline-white:focus,a.sd-outline-white:hover{border-color:var(--sd-color-white-highlight) !important}.sd-bg-transparent{background-color:transparent !important}.sd-outline-transparent{border-color:transparent !important}.sd-text-transparent{color:transparent !important}.sd-p-0{padding:0 !important}.sd-pt-0,.sd-py-0{padding-top:0 !important}.sd-pr-0,.sd-px-0{padding-right:0 !important}.sd-pb-0,.sd-py-0{padding-bottom:0 !important}.sd-pl-0,.sd-px-0{padding-left:0 !important}.sd-p-1{padding:.25rem !important}.sd-pt-1,.sd-py-1{padding-top:.25rem !important}.sd-pr-1,.sd-px-1{padding-right:.25rem !important}.sd-pb-1,.sd-py-1{padding-bottom:.25rem !important}.sd-pl-1,.sd-px-1{padding-left:.25rem !important}.sd-p-2{padding:.5rem !important}.sd-pt-2,.sd-py-2{padding-top:.5rem !important}.sd-pr-2,.sd-px-2{padding-right:.5rem !important}.sd-pb-2,.sd-py-2{padding-bottom:.5rem !important}.sd-pl-2,.sd-px-2{padding-left:.5rem !important}.sd-p-3{padding:1rem !important}.sd-pt-3,.sd-py-3{padding-top:1rem !important}.sd-pr-3,.sd-px-3{padding-right:1rem !important}.sd-pb-3,.sd-py-3{padding-bottom:1rem !important}.sd-pl-3,.sd-px-3{padding-left:1rem !important}.sd-p-4{padding:1.5rem !important}.sd-pt-4,.sd-py-4{padding-top:1.5rem !important}.sd-pr-4,.sd-px-4{padding-right:1.5rem !important}.sd-pb-4,.sd-py-4{padding-bottom:1.5rem !important}.sd-pl-4,.sd-px-4{padding-left:1.5rem !important}.sd-p-5{padding:3rem !important}.sd-pt-5,.sd-py-5{padding-top:3rem !important}.sd-pr-5,.sd-px-5{padding-right:3rem !important}.sd-pb-5,.sd-py-5{padding-bottom:3rem !important}.sd-pl-5,.sd-px-5{padding-left:3rem !important}.sd-m-auto{margin:auto !important}.sd-mt-auto,.sd-my-auto{margin-top:auto !important}.sd-mr-auto,.sd-mx-auto{margin-right:auto !important}.sd-mb-auto,.sd-my-auto{margin-bottom:auto !important}.sd-ml-auto,.sd-mx-auto{margin-left:auto !important}.sd-m-0{margin:0 !important}.sd-mt-0,.sd-my-0{margin-top:0 !important}.sd-mr-0,.sd-mx-0{margin-right:0 !important}.sd-mb-0,.sd-my-0{margin-bottom:0 !important}.sd-ml-0,.sd-mx-0{margin-left:0 !important}.sd-m-1{margin:.25rem !important}.sd-mt-1,.sd-my-1{margin-top:.25rem !important}.sd-mr-1,.sd-mx-1{margin-right:.25rem !important}.sd-mb-1,.sd-my-1{margin-bottom:.25rem !important}.sd-ml-1,.sd-mx-1{margin-left:.25rem !important}.sd-m-2{margin:.5rem !important}.sd-mt-2,.sd-my-2{margin-top:.5rem !important}.sd-mr-2,.sd-mx-2{margin-right:.5rem !important}.sd-mb-2,.sd-my-2{margin-bottom:.5rem !important}.sd-ml-2,.sd-mx-2{margin-left:.5rem !important}.sd-m-3{margin:1rem !important}.sd-mt-3,.sd-my-3{margin-top:1rem !important}.sd-mr-3,.sd-mx-3{margin-right:1rem !important}.sd-mb-3,.sd-my-3{margin-bottom:1rem !important}.sd-ml-3,.sd-mx-3{margin-left:1rem !important}.sd-m-4{margin:1.5rem !important}.sd-mt-4,.sd-my-4{margin-top:1.5rem !important}.sd-mr-4,.sd-mx-4{margin-right:1.5rem !important}.sd-mb-4,.sd-my-4{margin-bottom:1.5rem !important}.sd-ml-4,.sd-mx-4{margin-left:1.5rem !important}.sd-m-5{margin:3rem !important}.sd-mt-5,.sd-my-5{margin-top:3rem !important}.sd-mr-5,.sd-mx-5{margin-right:3rem !important}.sd-mb-5,.sd-my-5{margin-bottom:3rem !important}.sd-ml-5,.sd-mx-5{margin-left:3rem !important}.sd-w-25{width:25% !important}.sd-w-50{width:50% !important}.sd-w-75{width:75% !important}.sd-w-100{width:100% !important}.sd-w-auto{width:auto !important}.sd-h-25{height:25% !important}.sd-h-50{height:50% !important}.sd-h-75{height:75% !important}.sd-h-100{height:100% !important}.sd-h-auto{height:auto !important}.sd-d-none{display:none !important}.sd-d-inline{display:inline !important}.sd-d-inline-block{display:inline-block !important}.sd-d-block{display:block !important}.sd-d-grid{display:grid !important}.sd-d-flex-row{display:-ms-flexbox !important;display:flex !important;flex-direction:row !important}.sd-d-flex-column{display:-ms-flexbox !important;display:flex !important;flex-direction:column !important}.sd-d-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}@media(min-width: 576px){.sd-d-sm-none{display:none !important}.sd-d-sm-inline{display:inline !important}.sd-d-sm-inline-block{display:inline-block !important}.sd-d-sm-block{display:block !important}.sd-d-sm-grid{display:grid !important}.sd-d-sm-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-sm-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 768px){.sd-d-md-none{display:none !important}.sd-d-md-inline{display:inline !important}.sd-d-md-inline-block{display:inline-block !important}.sd-d-md-block{display:block !important}.sd-d-md-grid{display:grid !important}.sd-d-md-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-md-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 992px){.sd-d-lg-none{display:none !important}.sd-d-lg-inline{display:inline !important}.sd-d-lg-inline-block{display:inline-block !important}.sd-d-lg-block{display:block !important}.sd-d-lg-grid{display:grid !important}.sd-d-lg-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-lg-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 1200px){.sd-d-xl-none{display:none !important}.sd-d-xl-inline{display:inline !important}.sd-d-xl-inline-block{display:inline-block !important}.sd-d-xl-block{display:block !important}.sd-d-xl-grid{display:grid !important}.sd-d-xl-flex{display:-ms-flexbox !important;display:flex !important}.sd-d-xl-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}.sd-align-major-start{justify-content:flex-start !important}.sd-align-major-end{justify-content:flex-end !important}.sd-align-major-center{justify-content:center !important}.sd-align-major-justify{justify-content:space-between !important}.sd-align-major-spaced{justify-content:space-evenly !important}.sd-align-minor-start{align-items:flex-start !important}.sd-align-minor-end{align-items:flex-end !important}.sd-align-minor-center{align-items:center !important}.sd-align-minor-stretch{align-items:stretch !important}.sd-text-justify{text-align:justify !important}.sd-text-left{text-align:left !important}.sd-text-right{text-align:right !important}.sd-text-center{text-align:center !important}.sd-font-weight-light{font-weight:300 !important}.sd-font-weight-lighter{font-weight:lighter !important}.sd-font-weight-normal{font-weight:400 !important}.sd-font-weight-bold{font-weight:700 !important}.sd-font-weight-bolder{font-weight:bolder !important}.sd-font-italic{font-style:italic !important}.sd-text-decoration-none{text-decoration:none !important}.sd-text-lowercase{text-transform:lowercase !important}.sd-text-uppercase{text-transform:uppercase !important}.sd-text-capitalize{text-transform:capitalize !important}.sd-text-wrap{white-space:normal !important}.sd-text-nowrap{white-space:nowrap !important}.sd-text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-fs-1,.sd-fs-1>p{font-size:calc(1.375rem + 1.5vw) !important;line-height:unset !important}.sd-fs-2,.sd-fs-2>p{font-size:calc(1.325rem + 0.9vw) !important;line-height:unset !important}.sd-fs-3,.sd-fs-3>p{font-size:calc(1.3rem + 0.6vw) !important;line-height:unset !important}.sd-fs-4,.sd-fs-4>p{font-size:calc(1.275rem + 0.3vw) !important;line-height:unset !important}.sd-fs-5,.sd-fs-5>p{font-size:1.25rem !important;line-height:unset !important}.sd-fs-6,.sd-fs-6>p{font-size:1rem !important;line-height:unset !important}.sd-border-0{border:0 solid !important}.sd-border-top-0{border-top:0 solid !important}.sd-border-bottom-0{border-bottom:0 solid !important}.sd-border-right-0{border-right:0 solid !important}.sd-border-left-0{border-left:0 solid !important}.sd-border-1{border:1px solid !important}.sd-border-top-1{border-top:1px solid !important}.sd-border-bottom-1{border-bottom:1px solid !important}.sd-border-right-1{border-right:1px solid !important}.sd-border-left-1{border-left:1px solid !important}.sd-border-2{border:2px solid !important}.sd-border-top-2{border-top:2px solid !important}.sd-border-bottom-2{border-bottom:2px solid !important}.sd-border-right-2{border-right:2px solid !important}.sd-border-left-2{border-left:2px solid !important}.sd-border-3{border:3px solid !important}.sd-border-top-3{border-top:3px solid !important}.sd-border-bottom-3{border-bottom:3px solid !important}.sd-border-right-3{border-right:3px solid !important}.sd-border-left-3{border-left:3px solid !important}.sd-border-4{border:4px solid !important}.sd-border-top-4{border-top:4px solid !important}.sd-border-bottom-4{border-bottom:4px solid !important}.sd-border-right-4{border-right:4px solid !important}.sd-border-left-4{border-left:4px solid !important}.sd-border-5{border:5px solid !important}.sd-border-top-5{border-top:5px solid !important}.sd-border-bottom-5{border-bottom:5px solid !important}.sd-border-right-5{border-right:5px solid !important}.sd-border-left-5{border-left:5px solid !important}.sd-rounded-0{border-radius:0 !important}.sd-rounded-1{border-radius:.2rem !important}.sd-rounded-2{border-radius:.3rem !important}.sd-rounded-3{border-radius:.5rem !important}.sd-rounded-pill{border-radius:50rem !important}.sd-rounded-circle{border-radius:50% !important}.shadow-none{box-shadow:none !important}.sd-shadow-sm{box-shadow:0 .125rem .25rem var(--sd-color-shadow) !important}.sd-shadow-md{box-shadow:0 .5rem 1rem var(--sd-color-shadow) !important}.sd-shadow-lg{box-shadow:0 1rem 3rem var(--sd-color-shadow) !important}@keyframes sd-slide-from-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@keyframes sd-slide-from-right{0%{transform:translateX(200%)}100%{transform:translateX(0)}}@keyframes sd-grow100{0%{transform:scale(0);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50{0%{transform:scale(0.5);opacity:.5}100%{transform:scale(1);opacity:1}}@keyframes sd-grow50-rot20{0%{transform:scale(0.5) rotateZ(-20deg);opacity:.5}75%{transform:scale(1) rotateZ(5deg);opacity:1}95%{transform:scale(1) rotateZ(-1deg);opacity:1}100%{transform:scale(1) rotateZ(0);opacity:1}}.sd-animate-slide-from-left{animation:1s ease-out 0s 1 normal none running sd-slide-from-left}.sd-animate-slide-from-right{animation:1s ease-out 0s 1 normal none running sd-slide-from-right}.sd-animate-grow100{animation:1s ease-out 0s 1 normal none running sd-grow100}.sd-animate-grow50{animation:1s ease-out 0s 1 normal none running sd-grow50}.sd-animate-grow50-rot20{animation:1s ease-out 0s 1 normal none running sd-grow50-rot20}.sd-badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.sd-badge:empty{display:none}a.sd-badge{text-decoration:none}.sd-btn .sd-badge{position:relative;top:-1px}.sd-btn{background-color:transparent;border:1px solid transparent;border-radius:.25rem;cursor:pointer;display:inline-block;font-weight:400;font-size:1rem;line-height:1.5;padding:.375rem .75rem;text-align:center;text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;vertical-align:middle;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none}.sd-btn:hover{text-decoration:none}@media(prefers-reduced-motion: reduce){.sd-btn{transition:none}}.sd-btn-primary,.sd-btn-outline-primary:hover,.sd-btn-outline-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-primary:hover,.sd-btn-primary:focus{color:var(--sd-color-primary-text) !important;background-color:var(--sd-color-primary-highlight) !important;border-color:var(--sd-color-primary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-primary{color:var(--sd-color-primary) !important;border-color:var(--sd-color-primary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary,.sd-btn-outline-secondary:hover,.sd-btn-outline-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-secondary:hover,.sd-btn-secondary:focus{color:var(--sd-color-secondary-text) !important;background-color:var(--sd-color-secondary-highlight) !important;border-color:var(--sd-color-secondary-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-secondary{color:var(--sd-color-secondary) !important;border-color:var(--sd-color-secondary) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success,.sd-btn-outline-success:hover,.sd-btn-outline-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-success:hover,.sd-btn-success:focus{color:var(--sd-color-success-text) !important;background-color:var(--sd-color-success-highlight) !important;border-color:var(--sd-color-success-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-success{color:var(--sd-color-success) !important;border-color:var(--sd-color-success) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info,.sd-btn-outline-info:hover,.sd-btn-outline-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-info:hover,.sd-btn-info:focus{color:var(--sd-color-info-text) !important;background-color:var(--sd-color-info-highlight) !important;border-color:var(--sd-color-info-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-info{color:var(--sd-color-info) !important;border-color:var(--sd-color-info) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning,.sd-btn-outline-warning:hover,.sd-btn-outline-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-warning:hover,.sd-btn-warning:focus{color:var(--sd-color-warning-text) !important;background-color:var(--sd-color-warning-highlight) !important;border-color:var(--sd-color-warning-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-warning{color:var(--sd-color-warning) !important;border-color:var(--sd-color-warning) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger,.sd-btn-outline-danger:hover,.sd-btn-outline-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-danger:hover,.sd-btn-danger:focus{color:var(--sd-color-danger-text) !important;background-color:var(--sd-color-danger-highlight) !important;border-color:var(--sd-color-danger-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-danger{color:var(--sd-color-danger) !important;border-color:var(--sd-color-danger) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light,.sd-btn-outline-light:hover,.sd-btn-outline-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-light:hover,.sd-btn-light:focus{color:var(--sd-color-light-text) !important;background-color:var(--sd-color-light-highlight) !important;border-color:var(--sd-color-light-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-light{color:var(--sd-color-light) !important;border-color:var(--sd-color-light) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted,.sd-btn-outline-muted:hover,.sd-btn-outline-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-muted:hover,.sd-btn-muted:focus{color:var(--sd-color-muted-text) !important;background-color:var(--sd-color-muted-highlight) !important;border-color:var(--sd-color-muted-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-muted{color:var(--sd-color-muted) !important;border-color:var(--sd-color-muted) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark,.sd-btn-outline-dark:hover,.sd-btn-outline-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-dark:hover,.sd-btn-dark:focus{color:var(--sd-color-dark-text) !important;background-color:var(--sd-color-dark-highlight) !important;border-color:var(--sd-color-dark-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-dark{color:var(--sd-color-dark) !important;border-color:var(--sd-color-dark) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black,.sd-btn-outline-black:hover,.sd-btn-outline-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-black:hover,.sd-btn-black:focus{color:var(--sd-color-black-text) !important;background-color:var(--sd-color-black-highlight) !important;border-color:var(--sd-color-black-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-black{color:var(--sd-color-black) !important;border-color:var(--sd-color-black) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white,.sd-btn-outline-white:hover,.sd-btn-outline-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-btn-white:hover,.sd-btn-white:focus{color:var(--sd-color-white-text) !important;background-color:var(--sd-color-white-highlight) !important;border-color:var(--sd-color-white-highlight) !important;border-width:1px !important;border-style:solid !important}.sd-btn-outline-white{color:var(--sd-color-white) !important;border-color:var(--sd-color-white) !important;border-width:1px !important;border-style:solid !important}.sd-stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:""}.sd-hide-link-text{font-size:0}.sd-octicon,.sd-material-icon{display:inline-block;fill:currentColor;vertical-align:middle}.sd-avatar-xs{border-radius:50%;object-fit:cover;object-position:center;width:1rem;height:1rem}.sd-avatar-sm{border-radius:50%;object-fit:cover;object-position:center;width:3rem;height:3rem}.sd-avatar-md{border-radius:50%;object-fit:cover;object-position:center;width:5rem;height:5rem}.sd-avatar-lg{border-radius:50%;object-fit:cover;object-position:center;width:7rem;height:7rem}.sd-avatar-xl{border-radius:50%;object-fit:cover;object-position:center;width:10rem;height:10rem}.sd-avatar-inherit{border-radius:50%;object-fit:cover;object-position:center;width:inherit;height:inherit}.sd-avatar-initial{border-radius:50%;object-fit:cover;object-position:center;width:initial;height:initial}.sd-card{background-clip:border-box;background-color:var(--sd-color-card-background);border:1px solid var(--sd-color-card-border);border-radius:.25rem;color:var(--sd-color-card-text);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;position:relative;word-wrap:break-word}.sd-card>hr{margin-left:0;margin-right:0}.sd-card-hover:hover{border-color:var(--sd-color-card-border-hover);transform:scale(1.01)}.sd-card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem 1rem}.sd-card-title{margin-bottom:.5rem}.sd-card-subtitle{margin-top:-0.25rem;margin-bottom:0}.sd-card-text:last-child{margin-bottom:0}.sd-card-link:hover{text-decoration:none}.sd-card-link+.card-link{margin-left:1rem}.sd-card-header{padding:.5rem 1rem;margin-bottom:0;background-color:var(--sd-color-card-header);border-bottom:1px solid var(--sd-color-card-border)}.sd-card-header:first-child{border-radius:calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0}.sd-card-footer{padding:.5rem 1rem;background-color:var(--sd-color-card-footer);border-top:1px solid var(--sd-color-card-border)}.sd-card-footer:last-child{border-radius:0 0 calc(0.25rem - 1px) calc(0.25rem - 1px)}.sd-card-header-tabs{margin-right:-0.5rem;margin-bottom:-0.5rem;margin-left:-0.5rem;border-bottom:0}.sd-card-header-pills{margin-right:-0.5rem;margin-left:-0.5rem}.sd-card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1rem;border-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom,.sd-card-img-top{width:100%}.sd-card-img,.sd-card-img-top{border-top-left-radius:calc(0.25rem - 1px);border-top-right-radius:calc(0.25rem - 1px)}.sd-card-img,.sd-card-img-bottom{border-bottom-left-radius:calc(0.25rem - 1px);border-bottom-right-radius:calc(0.25rem - 1px)}.sd-cards-carousel{width:100%;display:flex;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row;overflow-x:hidden;scroll-snap-type:x mandatory}.sd-cards-carousel.sd-show-scrollbar{overflow-x:auto}.sd-cards-carousel:hover,.sd-cards-carousel:focus{overflow-x:auto}.sd-cards-carousel>.sd-card{flex-shrink:0;scroll-snap-align:start}.sd-cards-carousel>.sd-card:not(:last-child){margin-right:3px}.sd-card-cols-1>.sd-card{width:90%}.sd-card-cols-2>.sd-card{width:45%}.sd-card-cols-3>.sd-card{width:30%}.sd-card-cols-4>.sd-card{width:22.5%}.sd-card-cols-5>.sd-card{width:18%}.sd-card-cols-6>.sd-card{width:15%}.sd-card-cols-7>.sd-card{width:12.8571428571%}.sd-card-cols-8>.sd-card{width:11.25%}.sd-card-cols-9>.sd-card{width:10%}.sd-card-cols-10>.sd-card{width:9%}.sd-card-cols-11>.sd-card{width:8.1818181818%}.sd-card-cols-12>.sd-card{width:7.5%}.sd-container,.sd-container-fluid,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container-xl{margin-left:auto;margin-right:auto;padding-left:var(--sd-gutter-x, 0.75rem);padding-right:var(--sd-gutter-x, 0.75rem);width:100%}@media(min-width: 576px){.sd-container-sm,.sd-container{max-width:540px}}@media(min-width: 768px){.sd-container-md,.sd-container-sm,.sd-container{max-width:720px}}@media(min-width: 992px){.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:960px}}@media(min-width: 1200px){.sd-container-xl,.sd-container-lg,.sd-container-md,.sd-container-sm,.sd-container{max-width:1140px}}.sd-row{--sd-gutter-x: 1.5rem;--sd-gutter-y: 0;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:calc(var(--sd-gutter-y) * -1);margin-right:calc(var(--sd-gutter-x) * -0.5);margin-left:calc(var(--sd-gutter-x) * -0.5)}.sd-row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--sd-gutter-x) * 0.5);padding-left:calc(var(--sd-gutter-x) * 0.5);margin-top:var(--sd-gutter-y)}.sd-col{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-auto>*{flex:0 0 auto;width:auto}.sd-row-cols-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}@media(min-width: 576px){.sd-col-sm{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-sm-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-sm-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-sm-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-sm-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-sm-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-sm-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-sm-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-sm-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-sm-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-sm-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-sm-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-sm-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-sm-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 768px){.sd-col-md{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-md-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-md-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-md-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-md-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-md-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-md-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-md-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-md-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-md-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-md-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-md-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-md-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-md-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 992px){.sd-col-lg{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-lg-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-lg-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-lg-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-lg-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-lg-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-lg-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-lg-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-lg-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-lg-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-lg-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-lg-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-lg-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-lg-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}@media(min-width: 1200px){.sd-col-xl{flex:1 0 0%;-ms-flex:1 0 0%}.sd-row-cols-xl-auto{flex:1 0 auto;-ms-flex:1 0 auto;width:100%}.sd-row-cols-xl-1>*{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-row-cols-xl-2>*{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-row-cols-xl-3>*{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-row-cols-xl-4>*{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-row-cols-xl-5>*{flex:0 0 auto;-ms-flex:0 0 auto;width:20%}.sd-row-cols-xl-6>*{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-row-cols-xl-7>*{flex:0 0 auto;-ms-flex:0 0 auto;width:14.2857142857%}.sd-row-cols-xl-8>*{flex:0 0 auto;-ms-flex:0 0 auto;width:12.5%}.sd-row-cols-xl-9>*{flex:0 0 auto;-ms-flex:0 0 auto;width:11.1111111111%}.sd-row-cols-xl-10>*{flex:0 0 auto;-ms-flex:0 0 auto;width:10%}.sd-row-cols-xl-11>*{flex:0 0 auto;-ms-flex:0 0 auto;width:9.0909090909%}.sd-row-cols-xl-12>*{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}}.sd-col-auto{flex:0 0 auto;-ms-flex:0 0 auto;width:auto}.sd-col-1{flex:0 0 auto;-ms-flex:0 0 auto;width:8.3333333333%}.sd-col-2{flex:0 0 auto;-ms-flex:0 0 auto;width:16.6666666667%}.sd-col-3{flex:0 0 auto;-ms-flex:0 0 auto;width:25%}.sd-col-4{flex:0 0 auto;-ms-flex:0 0 auto;width:33.3333333333%}.sd-col-5{flex:0 0 auto;-ms-flex:0 0 auto;width:41.6666666667%}.sd-col-6{flex:0 0 auto;-ms-flex:0 0 auto;width:50%}.sd-col-7{flex:0 0 auto;-ms-flex:0 0 auto;width:58.3333333333%}.sd-col-8{flex:0 0 auto;-ms-flex:0 0 auto;width:66.6666666667%}.sd-col-9{flex:0 0 auto;-ms-flex:0 0 auto;width:75%}.sd-col-10{flex:0 0 auto;-ms-flex:0 0 auto;width:83.3333333333%}.sd-col-11{flex:0 0 auto;-ms-flex:0 0 auto;width:91.6666666667%}.sd-col-12{flex:0 0 auto;-ms-flex:0 0 auto;width:100%}.sd-g-0,.sd-gy-0{--sd-gutter-y: 0}.sd-g-0,.sd-gx-0{--sd-gutter-x: 0}.sd-g-1,.sd-gy-1{--sd-gutter-y: 0.25rem}.sd-g-1,.sd-gx-1{--sd-gutter-x: 0.25rem}.sd-g-2,.sd-gy-2{--sd-gutter-y: 0.5rem}.sd-g-2,.sd-gx-2{--sd-gutter-x: 0.5rem}.sd-g-3,.sd-gy-3{--sd-gutter-y: 1rem}.sd-g-3,.sd-gx-3{--sd-gutter-x: 1rem}.sd-g-4,.sd-gy-4{--sd-gutter-y: 1.5rem}.sd-g-4,.sd-gx-4{--sd-gutter-x: 1.5rem}.sd-g-5,.sd-gy-5{--sd-gutter-y: 3rem}.sd-g-5,.sd-gx-5{--sd-gutter-x: 3rem}@media(min-width: 576px){.sd-col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-sm-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-sm-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-sm-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-sm-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-sm-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-sm-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-sm-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-sm-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-sm-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-sm-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-sm-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-sm-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-sm-0,.sd-gy-sm-0{--sd-gutter-y: 0}.sd-g-sm-0,.sd-gx-sm-0{--sd-gutter-x: 0}.sd-g-sm-1,.sd-gy-sm-1{--sd-gutter-y: 0.25rem}.sd-g-sm-1,.sd-gx-sm-1{--sd-gutter-x: 0.25rem}.sd-g-sm-2,.sd-gy-sm-2{--sd-gutter-y: 0.5rem}.sd-g-sm-2,.sd-gx-sm-2{--sd-gutter-x: 0.5rem}.sd-g-sm-3,.sd-gy-sm-3{--sd-gutter-y: 1rem}.sd-g-sm-3,.sd-gx-sm-3{--sd-gutter-x: 1rem}.sd-g-sm-4,.sd-gy-sm-4{--sd-gutter-y: 1.5rem}.sd-g-sm-4,.sd-gx-sm-4{--sd-gutter-x: 1.5rem}.sd-g-sm-5,.sd-gy-sm-5{--sd-gutter-y: 3rem}.sd-g-sm-5,.sd-gx-sm-5{--sd-gutter-x: 3rem}}@media(min-width: 768px){.sd-col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-md-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-md-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-md-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-md-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-md-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-md-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-md-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-md-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-md-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-md-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-md-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-md-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-md-0,.sd-gy-md-0{--sd-gutter-y: 0}.sd-g-md-0,.sd-gx-md-0{--sd-gutter-x: 0}.sd-g-md-1,.sd-gy-md-1{--sd-gutter-y: 0.25rem}.sd-g-md-1,.sd-gx-md-1{--sd-gutter-x: 0.25rem}.sd-g-md-2,.sd-gy-md-2{--sd-gutter-y: 0.5rem}.sd-g-md-2,.sd-gx-md-2{--sd-gutter-x: 0.5rem}.sd-g-md-3,.sd-gy-md-3{--sd-gutter-y: 1rem}.sd-g-md-3,.sd-gx-md-3{--sd-gutter-x: 1rem}.sd-g-md-4,.sd-gy-md-4{--sd-gutter-y: 1.5rem}.sd-g-md-4,.sd-gx-md-4{--sd-gutter-x: 1.5rem}.sd-g-md-5,.sd-gy-md-5{--sd-gutter-y: 3rem}.sd-g-md-5,.sd-gx-md-5{--sd-gutter-x: 3rem}}@media(min-width: 992px){.sd-col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-lg-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-lg-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-lg-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-lg-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-lg-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-lg-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-lg-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-lg-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-lg-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-lg-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-lg-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-lg-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-lg-0,.sd-gy-lg-0{--sd-gutter-y: 0}.sd-g-lg-0,.sd-gx-lg-0{--sd-gutter-x: 0}.sd-g-lg-1,.sd-gy-lg-1{--sd-gutter-y: 0.25rem}.sd-g-lg-1,.sd-gx-lg-1{--sd-gutter-x: 0.25rem}.sd-g-lg-2,.sd-gy-lg-2{--sd-gutter-y: 0.5rem}.sd-g-lg-2,.sd-gx-lg-2{--sd-gutter-x: 0.5rem}.sd-g-lg-3,.sd-gy-lg-3{--sd-gutter-y: 1rem}.sd-g-lg-3,.sd-gx-lg-3{--sd-gutter-x: 1rem}.sd-g-lg-4,.sd-gy-lg-4{--sd-gutter-y: 1.5rem}.sd-g-lg-4,.sd-gx-lg-4{--sd-gutter-x: 1.5rem}.sd-g-lg-5,.sd-gy-lg-5{--sd-gutter-y: 3rem}.sd-g-lg-5,.sd-gx-lg-5{--sd-gutter-x: 3rem}}@media(min-width: 1200px){.sd-col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.sd-col-xl-1{-ms-flex:0 0 auto;flex:0 0 auto;width:8.3333333333%}.sd-col-xl-2{-ms-flex:0 0 auto;flex:0 0 auto;width:16.6666666667%}.sd-col-xl-3{-ms-flex:0 0 auto;flex:0 0 auto;width:25%}.sd-col-xl-4{-ms-flex:0 0 auto;flex:0 0 auto;width:33.3333333333%}.sd-col-xl-5{-ms-flex:0 0 auto;flex:0 0 auto;width:41.6666666667%}.sd-col-xl-6{-ms-flex:0 0 auto;flex:0 0 auto;width:50%}.sd-col-xl-7{-ms-flex:0 0 auto;flex:0 0 auto;width:58.3333333333%}.sd-col-xl-8{-ms-flex:0 0 auto;flex:0 0 auto;width:66.6666666667%}.sd-col-xl-9{-ms-flex:0 0 auto;flex:0 0 auto;width:75%}.sd-col-xl-10{-ms-flex:0 0 auto;flex:0 0 auto;width:83.3333333333%}.sd-col-xl-11{-ms-flex:0 0 auto;flex:0 0 auto;width:91.6666666667%}.sd-col-xl-12{-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.sd-g-xl-0,.sd-gy-xl-0{--sd-gutter-y: 0}.sd-g-xl-0,.sd-gx-xl-0{--sd-gutter-x: 0}.sd-g-xl-1,.sd-gy-xl-1{--sd-gutter-y: 0.25rem}.sd-g-xl-1,.sd-gx-xl-1{--sd-gutter-x: 0.25rem}.sd-g-xl-2,.sd-gy-xl-2{--sd-gutter-y: 0.5rem}.sd-g-xl-2,.sd-gx-xl-2{--sd-gutter-x: 0.5rem}.sd-g-xl-3,.sd-gy-xl-3{--sd-gutter-y: 1rem}.sd-g-xl-3,.sd-gx-xl-3{--sd-gutter-x: 1rem}.sd-g-xl-4,.sd-gy-xl-4{--sd-gutter-y: 1.5rem}.sd-g-xl-4,.sd-gx-xl-4{--sd-gutter-x: 1.5rem}.sd-g-xl-5,.sd-gy-xl-5{--sd-gutter-y: 3rem}.sd-g-xl-5,.sd-gx-xl-5{--sd-gutter-x: 3rem}}.sd-flex-row-reverse{flex-direction:row-reverse !important}details.sd-dropdown{position:relative}details.sd-dropdown .sd-summary-title{font-weight:700;padding-right:3em !important;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}details.sd-dropdown:hover{cursor:pointer}details.sd-dropdown .sd-summary-content{cursor:default}details.sd-dropdown summary{list-style:none;padding:1em}details.sd-dropdown summary .sd-octicon.no-title{vertical-align:middle}details.sd-dropdown[open] summary .sd-octicon.no-title{visibility:hidden}details.sd-dropdown summary::-webkit-details-marker{display:none}details.sd-dropdown summary:focus{outline:none}details.sd-dropdown .sd-summary-icon{margin-right:.5em}details.sd-dropdown .sd-summary-icon svg{opacity:.8}details.sd-dropdown summary:hover .sd-summary-up svg,details.sd-dropdown summary:hover .sd-summary-down svg{opacity:1;transform:scale(1.1)}details.sd-dropdown .sd-summary-up svg,details.sd-dropdown .sd-summary-down svg{display:block;opacity:.6}details.sd-dropdown .sd-summary-up,details.sd-dropdown .sd-summary-down{pointer-events:none;position:absolute;right:1em;top:1em}details.sd-dropdown[open]>.sd-summary-title .sd-summary-down{visibility:hidden}details.sd-dropdown:not([open])>.sd-summary-title .sd-summary-up{visibility:hidden}details.sd-dropdown:not([open]).sd-card{border:none}details.sd-dropdown:not([open])>.sd-card-header{border:1px solid var(--sd-color-card-border);border-radius:.25rem}details.sd-dropdown.sd-fade-in[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out;animation:sd-fade-in .5s ease-in-out}details.sd-dropdown.sd-fade-in-slide-down[open] summary~*{-moz-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;-webkit-animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out;animation:sd-fade-in .5s ease-in-out,sd-slide-down .5s ease-in-out}.sd-col>.sd-dropdown{width:100%}.sd-summary-content>.sd-tab-set:first-child{margin-top:0}@keyframes sd-fade-in{0%{opacity:0}100%{opacity:1}}@keyframes sd-slide-down{0%{transform:translate(0, -10px)}100%{transform:translate(0, 0)}}.sd-tab-set{border-radius:.125rem;display:flex;flex-wrap:wrap;margin:1em 0;position:relative}.sd-tab-set>input{opacity:0;position:absolute}.sd-tab-set>input:checked+label{border-color:var(--sd-color-tabs-underline-active);color:var(--sd-color-tabs-label-active)}.sd-tab-set>input:checked+label+.sd-tab-content{display:block}.sd-tab-set>input:not(:checked)+label:hover{color:var(--sd-color-tabs-label-hover);border-color:var(--sd-color-tabs-underline-hover)}.sd-tab-set>input:focus+label{outline-style:auto}.sd-tab-set>input:not(.focus-visible)+label{outline:none;-webkit-tap-highlight-color:transparent}.sd-tab-set>label{border-bottom:.125rem solid transparent;margin-bottom:0;color:var(--sd-color-tabs-label-inactive);border-color:var(--sd-color-tabs-underline-inactive);cursor:pointer;font-size:var(--sd-fontsize-tabs-label);font-weight:700;padding:1em 1.25em .5em;transition:color 250ms;width:auto;z-index:1}html .sd-tab-set>label:hover{color:var(--sd-color-tabs-label-active)}.sd-col>.sd-tab-set{width:100%}.sd-tab-content{box-shadow:0 -0.0625rem var(--sd-color-tabs-overline),0 .0625rem var(--sd-color-tabs-underline);display:none;order:99;padding-bottom:.75rem;padding-top:.75rem;width:100%}.sd-tab-content>:first-child{margin-top:0 !important}.sd-tab-content>:last-child{margin-bottom:0 !important}.sd-tab-content>.sd-tab-set{margin:0}.sd-sphinx-override,.sd-sphinx-override *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sd-sphinx-override p{margin-top:0}:root{--sd-color-primary: #007bff;--sd-color-secondary: #6c757d;--sd-color-success: #28a745;--sd-color-info: #17a2b8;--sd-color-warning: #f0b37e;--sd-color-danger: #dc3545;--sd-color-light: #f8f9fa;--sd-color-muted: #6c757d;--sd-color-dark: #212529;--sd-color-black: black;--sd-color-white: white;--sd-color-primary-highlight: #0069d9;--sd-color-secondary-highlight: #5c636a;--sd-color-success-highlight: #228e3b;--sd-color-info-highlight: #148a9c;--sd-color-warning-highlight: #cc986b;--sd-color-danger-highlight: #bb2d3b;--sd-color-light-highlight: #d3d4d5;--sd-color-muted-highlight: #5c636a;--sd-color-dark-highlight: #1c1f23;--sd-color-black-highlight: black;--sd-color-white-highlight: #d9d9d9;--sd-color-primary-text: #fff;--sd-color-secondary-text: #fff;--sd-color-success-text: #fff;--sd-color-info-text: #fff;--sd-color-warning-text: #212529;--sd-color-danger-text: #fff;--sd-color-light-text: #212529;--sd-color-muted-text: #fff;--sd-color-dark-text: #fff;--sd-color-black-text: #fff;--sd-color-white-text: #212529;--sd-color-shadow: rgba(0, 0, 0, 0.15);--sd-color-card-border: rgba(0, 0, 0, 0.125);--sd-color-card-border-hover: hsla(231, 99%, 66%, 1);--sd-color-card-background: transparent;--sd-color-card-text: inherit;--sd-color-card-header: transparent;--sd-color-card-footer: transparent;--sd-color-tabs-label-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-hover: hsla(231, 99%, 66%, 1);--sd-color-tabs-label-inactive: hsl(0, 0%, 66%);--sd-color-tabs-underline-active: hsla(231, 99%, 66%, 1);--sd-color-tabs-underline-hover: rgba(178, 206, 245, 0.62);--sd-color-tabs-underline-inactive: transparent;--sd-color-tabs-overline: rgb(222, 222, 222);--sd-color-tabs-underline: rgb(222, 222, 222);--sd-fontsize-tabs-label: 1rem} diff --git a/pr-preview/pr-27/_static/design-tabs.js b/pr-preview/pr-27/_static/design-tabs.js deleted file mode 100644 index 36b38cf0..00000000 --- a/pr-preview/pr-27/_static/design-tabs.js +++ /dev/null @@ -1,27 +0,0 @@ -var sd_labels_by_text = {}; - -function ready() { - const li = document.getElementsByClassName("sd-tab-label"); - for (const label of li) { - syncId = label.getAttribute("data-sync-id"); - if (syncId) { - label.onclick = onLabelClick; - if (!sd_labels_by_text[syncId]) { - sd_labels_by_text[syncId] = []; - } - sd_labels_by_text[syncId].push(label); - } - } -} - -function onLabelClick() { - // Activate other inputs with the same sync id. - syncId = this.getAttribute("data-sync-id"); - for (label of sd_labels_by_text[syncId]) { - if (label === this) continue; - label.previousElementSibling.checked = true; - } - window.localStorage.setItem("sphinx-design-last-tab", syncId); -} - -document.addEventListener("DOMContentLoaded", ready, false); diff --git a/pr-preview/pr-27/_static/doctools.js b/pr-preview/pr-27/_static/doctools.js deleted file mode 100644 index c3db08d1..00000000 --- a/pr-preview/pr-27/_static/doctools.js +++ /dev/null @@ -1,264 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Base JavaScript utilities for all Sphinx HTML documentation. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ -"use strict"; - -const _ready = (callback) => { - if (document.readyState !== "loading") { - callback(); - } else { - document.addEventListener("DOMContentLoaded", callback); - } -}; - -/** - * highlight a given string on a node by wrapping it in - * span elements with the given class name. - */ -const _highlight = (node, addItems, text, className) => { - if (node.nodeType === Node.TEXT_NODE) { - const val = node.nodeValue; - const parent = node.parentNode; - const pos = val.toLowerCase().indexOf(text); - if ( - pos >= 0 && - !parent.classList.contains(className) && - !parent.classList.contains("nohighlight") - ) { - let span; - - const closestNode = parent.closest("body, svg, foreignObject"); - const isInSVG = closestNode && closestNode.matches("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.classList.add(className); - } - - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - parent.insertBefore( - span, - parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling - ) - ); - node.nodeValue = val.substr(0, pos); - - if (isInSVG) { - const rect = document.createElementNS( - "http://www.w3.org/2000/svg", - "rect" - ); - const bbox = parent.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute("class", className); - addItems.push({ parent: parent, target: rect }); - } - } - } else if (node.matches && !node.matches("button, select, textarea")) { - node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); - } -}; -const _highlightText = (thisNode, text, className) => { - let addItems = []; - _highlight(thisNode, addItems, text, className); - addItems.forEach((obj) => - obj.parent.insertAdjacentElement("beforebegin", obj.target) - ); -}; - -/** - * Small JavaScript module for the documentation. - */ -const Documentation = { - init: () => { - Documentation.highlightSearchWords(); - Documentation.initDomainIndexTable(); - Documentation.initOnKeyListeners(); - }, - - /** - * i18n support - */ - TRANSLATIONS: {}, - PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), - LOCALE: "unknown", - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext: (string) => { - const translated = Documentation.TRANSLATIONS[string]; - switch (typeof translated) { - case "undefined": - return string; // no translation - case "string": - return translated; // translation exists - default: - return translated[0]; // (singular, plural) translation tuple exists - } - }, - - ngettext: (singular, plural, n) => { - const translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated !== "undefined") - return translated[Documentation.PLURAL_EXPR(n)]; - return n === 1 ? singular : plural; - }, - - addTranslations: (catalog) => { - Object.assign(Documentation.TRANSLATIONS, catalog.messages); - Documentation.PLURAL_EXPR = new Function( - "n", - `return (${catalog.plural_expr})` - ); - Documentation.LOCALE = catalog.locale; - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords: () => { - const highlight = - new URLSearchParams(window.location.search).get("highlight") || ""; - const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); - if (terms.length === 0) return; // nothing to do - - // There should never be more than one element matching "div.body" - const divBody = document.querySelectorAll("div.body"); - const body = divBody.length ? divBody[0] : document.querySelector("body"); - window.setTimeout(() => { - terms.forEach((term) => _highlightText(body, term, "highlighted")); - }, 10); - - const searchBox = document.getElementById("searchbox"); - if (searchBox === null) return; - searchBox.appendChild( - document - .createRange() - .createContextualFragment( - '" - ) - ); - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords: () => { - document - .querySelectorAll("#searchbox .highlight-link") - .forEach((el) => el.remove()); - document - .querySelectorAll("span.highlighted") - .forEach((el) => el.classList.remove("highlighted")); - const url = new URL(window.location); - url.searchParams.delete("highlight"); - window.history.replaceState({}, "", url); - }, - - /** - * helper function to focus on search bar - */ - focusSearchBar: () => { - document.querySelectorAll("input[name=q]")[0]?.focus(); - }, - - /** - * Initialise the domain index toggle buttons - */ - initDomainIndexTable: () => { - const toggler = (el) => { - const idNumber = el.id.substr(7); - const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); - if (el.src.substr(-9) === "minus.png") { - el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; - toggledRows.forEach((el) => (el.style.display = "none")); - } else { - el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; - toggledRows.forEach((el) => (el.style.display = "")); - } - }; - - const togglerElements = document.querySelectorAll("img.toggler"); - togglerElements.forEach((el) => - el.addEventListener("click", (event) => toggler(event.currentTarget)) - ); - togglerElements.forEach((el) => (el.style.display = "")); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); - }, - - initOnKeyListeners: () => { - // only install a listener if it is really needed - if ( - !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && - !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS - ) - return; - - const blacklistedElements = new Set([ - "TEXTAREA", - "INPUT", - "SELECT", - "BUTTON", - ]); - document.addEventListener("keydown", (event) => { - if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements - if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys - - if (!event.shiftKey) { - switch (event.key) { - case "ArrowLeft": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const prevLink = document.querySelector('link[rel="prev"]'); - if (prevLink && prevLink.href) { - window.location.href = prevLink.href; - event.preventDefault(); - } - break; - case "ArrowRight": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const nextLink = document.querySelector('link[rel="next"]'); - if (nextLink && nextLink.href) { - window.location.href = nextLink.href; - event.preventDefault(); - } - break; - case "Escape": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.hideSearchWords(); - event.preventDefault(); - } - } - - // some keyboard layouts may need Shift to get / - switch (event.key) { - case "/": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.focusSearchBar(); - event.preventDefault(); - } - }); - }, -}; - -// quick alias for translations -const _ = Documentation.gettext; - -_ready(Documentation.init); diff --git a/pr-preview/pr-27/_static/documentation_options.js b/pr-preview/pr-27/_static/documentation_options.js deleted file mode 100644 index 162a6ba8..00000000 --- a/pr-preview/pr-27/_static/documentation_options.js +++ /dev/null @@ -1,14 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '', - LANGUAGE: 'en', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - LINK_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '', - NAVIGATION_WITH_KEYS: false, - SHOW_SEARCH_SUMMARY: true, - ENABLE_SEARCH_SHORTCUTS: false, -}; \ No newline at end of file diff --git a/pr-preview/pr-27/_static/figures/alg/boundary_mps.svg b/pr-preview/pr-27/_static/figures/alg/boundary_mps.svg deleted file mode 100644 index ee734cd8..00000000 --- a/pr-preview/pr-27/_static/figures/alg/boundary_mps.svg +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/ctmrg.svg b/pr-preview/pr-27/_static/figures/alg/ctmrg.svg deleted file mode 100644 index 0aed1ad7..00000000 --- a/pr-preview/pr-27/_static/figures/alg/ctmrg.svg +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/lambda.svg b/pr-preview/pr-27/_static/figures/alg/lambda.svg deleted file mode 100644 index a07314d0..00000000 --- a/pr-preview/pr-27/_static/figures/alg/lambda.svg +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/lattice.svg b/pr-preview/pr-27/_static/figures/alg/lattice.svg deleted file mode 100644 index 17b60c98..00000000 --- a/pr-preview/pr-27/_static/figures/alg/lattice.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/simple_update.svg b/pr-preview/pr-27/_static/figures/alg/simple_update.svg deleted file mode 100644 index 3e8768d5..00000000 --- a/pr-preview/pr-27/_static/figures/alg/simple_update.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/tebd.svg b/pr-preview/pr-27/_static/figures/alg/tebd.svg deleted file mode 100644 index ea02b62f..00000000 --- a/pr-preview/pr-27/_static/figures/alg/tebd.svg +++ /dev/null @@ -1,613 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/tebd_mps.svg b/pr-preview/pr-27/_static/figures/alg/tebd_mps.svg deleted file mode 100644 index a9f6fdc1..00000000 --- a/pr-preview/pr-27/_static/figures/alg/tebd_mps.svg +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/tebd_trunc.svg b/pr-preview/pr-27/_static/figures/alg/tebd_trunc.svg deleted file mode 100644 index e4f88c49..00000000 --- a/pr-preview/pr-27/_static/figures/alg/tebd_trunc.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/tensor_network.svg b/pr-preview/pr-27/_static/figures/alg/tensor_network.svg deleted file mode 100644 index 0308da40..00000000 --- a/pr-preview/pr-27/_static/figures/alg/tensor_network.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/figures/alg/transfer.svg b/pr-preview/pr-27/_static/figures/alg/transfer.svg deleted file mode 100644 index 0f8acda0..00000000 --- a/pr-preview/pr-27/_static/figures/alg/transfer.svg +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pr-preview/pr-27/_static/file.png b/pr-preview/pr-27/_static/file.png deleted file mode 100644 index a858a410e4faa62ce324d814e4b816fff83a6fb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 286 zcmV+(0pb3MP)s`hMrGg#P~ix$^RISR_I47Y|r1 z_CyJOe}D1){SET-^Amu_i71Lt6eYfZjRyw@I6OQAIXXHDfiX^GbOlHe=Ae4>0m)d(f|Me07*qoM6N<$f}vM^LjV8( diff --git a/pr-preview/pr-27/_static/jquery-3.6.0.js b/pr-preview/pr-27/_static/jquery-3.6.0.js deleted file mode 100644 index fc6c299b..00000000 --- a/pr-preview/pr-27/_static/jquery-3.6.0.js +++ /dev/null @@ -1,10881 +0,0 @@ -/*! - * jQuery JavaScript Library v3.6.0 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright OpenJS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2021-03-02T17:08Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var flat = arr.flat ? function( array ) { - return arr.flat.call( array ); -} : function( array ) { - return arr.concat.apply( [], array ); -}; - - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 - // Plus for old WebKit, typeof returns "function" for HTML collections - // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) - return typeof obj === "function" && typeof obj.nodeType !== "number" && - typeof obj.item !== "function"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - -var document = window.document; - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.6.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - even: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return ( i + 1 ) % 2; - } ) ); - }, - - odd: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return i % 2; - } ) ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function( code, options, doc ) { - DOMEval( code, { nonce: options && options.nonce }, doc ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return flat( ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), - function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); - } ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.6 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2021-02-16 - */ -( function( window ) { -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ( {} ).hasOwnProperty, - arr = [], - pop = arr.pop, - pushNative = arr.push, - push = arr.push, - slice = arr.slice, - - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram - identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + - "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - - // "Attribute values must be CSS identifiers [capture 5] - // or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + - whitespace + "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + - "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), - funescape = function( escape, nonHex ) { - var high = "0x" + escape.slice( 1 ) - 0x10000; - - return nonHex ? - - // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - ( arr = slice.call( preferredDoc.childNodes ) ), - preferredDoc.childNodes - ); - - // Support: Android<4.0 - // Detect silently failing push.apply - // eslint-disable-next-line no-unused-expressions - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - pushNative.apply( target, slice.call( els ) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - setDocument( context ); - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { - - // ID selector - if ( ( m = match[ 1 ] ) ) { - - // Document context - if ( nodeType === 9 ) { - if ( ( elem = context.getElementById( m ) ) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && ( elem = newContext.getElementById( m ) ) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[ 2 ] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && - - // Support: IE 8 only - // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // The technique has to be used as well when a leading combinator is used - // as such selectors are not recognized by querySelectorAll. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && - ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - - // We can use :scope instead of the ID hack if the browser - // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { - - // Capture the context ID, setting it first if necessary - if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", ( nid = expando ) ); - } - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + - toSelector( groups[ i ] ); - } - newSelector = groups.join( "," ); - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return ( cache[ key + " " ] = value ); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement( "fieldset" ); - - try { - return !!fn( el ); - } catch ( e ) { - return false; - } finally { - - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction( function( argument ) { - argument = +argument; - return markFunction( function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ ( j = matchIndexes[ i ] ) ] ) { - seed[ j ] = !( matches[ j ] = seed[ j ] ); - } - } - } ); - } ); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem && elem.namespaceURI, - docElem = elem && ( elem.ownerDocument || elem ).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9 - 11+, Edge 12 - 18+ - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && - ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; - } ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert( function( el ) { - el.className = "i"; - return !el.getAttribute( "className" ); - } ); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); - - // ID filter and find - if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute( "id" ) === attrId; - }; - }; - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode( "id" ); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( ( elem = elems[ i++ ] ) ) { - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert( function( el ) { - - var input; - - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } - - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); - } - - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: Opera 10 - 11 only - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); - } - - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { - - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - } ); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - ) ); - } : - function( a, b ) { - if ( b ) { - while ( ( b = b.parentNode ) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { - - // Choose the first element that is related to our preferred document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( a == document || a.ownerDocument == preferredDoc && - contains( preferredDoc, a ) ) { - return -1; - } - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( b == document || b.ownerDocument == preferredDoc && - contains( preferredDoc, b ) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - return a == document ? -1 : - b == document ? 1 : - /* eslint-enable eqeqeq */ - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( ( cur = cur.parentNode ) ) { - ap.unshift( cur ); - } - cur = b; - while ( ( cur = cur.parentNode ) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[ i ] === bp[ i ] ) { - i++; - } - - return i ? - - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[ i ], bp[ i ] ) : - - // Otherwise nodes in our document sort first - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - ap[ i ] == preferredDoc ? -1 : - bp[ i ] == preferredDoc ? 1 : - /* eslint-enable eqeqeq */ - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - setDocument( elem ); - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch ( e ) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( context.ownerDocument || context ) != document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( elem.ownerDocument || elem ) != document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return ( sel + "" ).replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - - // If no nodeType, this is expected to be an array - while ( ( node = elem[ i++ ] ) ) { - - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[ 1 ] = match[ 1 ].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[ 3 ] = ( match[ 3 ] || match[ 4 ] || - match[ 5 ] || "" ).replace( runescape, funescape ); - - if ( match[ 2 ] === "~=" ) { - match[ 3 ] = " " + match[ 3 ] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[ 1 ] = match[ 1 ].toLowerCase(); - - if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { - - // nth-* requires argument - if ( !match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[ 4 ] = +( match[ 4 ] ? - match[ 5 ] + ( match[ 6 ] || 1 ) : - 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); - match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); - - // other types prohibit arguments - } else if ( match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[ 6 ] && match[ 2 ]; - - if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[ 3 ] ) { - match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - - // Get excess from tokenize (recursively) - ( excess = tokenize( unquoted, true ) ) && - - // advance to the next closing parenthesis - ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { - - // excess is a negative index - match[ 0 ] = match[ 0 ].slice( 0, excess ); - match[ 2 ] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { - return true; - } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - ( pattern = new RegExp( "(^|" + whitespace + - ")" + className + "(" + whitespace + "|$)" ) ) && classCache( - className, function( elem ) { - return pattern.test( - typeof elem.className === "string" && elem.className || - typeof elem.getAttribute !== "undefined" && - elem.getAttribute( "class" ) || - "" - ); - } ); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - /* eslint-disable max-len */ - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - /* eslint-enable max-len */ - - }; - }, - - "CHILD": function( type, what, _argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, _context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( ( node = node[ dir ] ) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( ( node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - - // Use previously-cached element index if available - if ( useCache ) { - - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - - // Use the same loop as above to seek `elem` from the start - while ( ( node = ++nodeIndex && node && node[ dir ] || - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || - ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction( function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[ i ] ); - seed[ idx ] = !( matches[ idx ] = matched[ i ] ); - } - } ) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - - // Potentially complex pseudos - "not": markFunction( function( selector ) { - - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction( function( seed, matches, _context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( ( elem = unmatched[ i ] ) ) { - seed[ i ] = !( matches[ i ] = elem ); - } - } - } ) : - function( elem, _context, xml ) { - input[ 0 ] = elem; - matcher( input, null, xml, results ); - - // Don't keep the element (issue #299) - input[ 0 ] = null; - return !results.pop(); - }; - } ), - - "has": markFunction( function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - } ), - - "contains": markFunction( function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - } ), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - - // lang value must be a valid identifier - if ( !ridentifier.test( lang || "" ) ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( ( elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); - return false; - }; - } ), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && - ( !document.hasFocus || document.hasFocus() ) && - !!( elem.type || elem.href || ~elem.tabIndex ); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return ( nodeName === "input" && !!elem.checked ) || - ( nodeName === "option" && !!elem.selected ); - }, - - "selected": function( elem ) { - - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - // eslint-disable-next-line no-unused-expressions - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos[ "empty" ]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( ( attr = elem.getAttribute( "type" ) ) == null || - attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo( function() { - return [ 0 ]; - } ), - - "last": createPositionalPseudo( function( _matchIndexes, length ) { - return [ length - 1 ]; - } ), - - "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - } ), - - "even": createPositionalPseudo( function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "odd": createPositionalPseudo( function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ) - } -}; - -Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || ( match = rcomma.exec( soFar ) ) ) { - if ( match ) { - - // Don't consume trailing commas as valid - soFar = soFar.slice( match[ 0 ].length ) || soFar; - } - groups.push( ( tokens = [] ) ); - } - - matched = false; - - // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - - // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || - ( match = preFilters[ type ]( match ) ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[ i ].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || ( elem[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || - ( outerCache[ elem.uniqueID ] = {} ); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( ( oldCache = uniqueCache[ key ] ) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return ( newCache[ 2 ] = oldCache[ 2 ] ); - } else { - - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[ i ]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[ 0 ]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[ i ], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( ( elem = unmatched[ i ] ) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction( function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [ context ] : context, - [] - ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( ( elem = temp[ i ] ) ) { - matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) ) { - - // Restore matcherIn since elem is not yet a final match - temp.push( ( matcherIn[ i ] = elem ) ); - } - } - postFinder( null, ( matcherOut = [] ), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) && - ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { - - seed[ temp ] = !( results[ temp ] = elem ); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - } ); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[ 0 ].type ], - implicitRelative = leadingRelative || Expr.relative[ " " ], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - ( checkContext = context ).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; - } else { - matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[ j ].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens - .slice( 0, i - 1 ) - .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), - - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), - len = elems.length; - - if ( outermost ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - outermostContext = context == document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( !context && elem.ownerDocument != document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( ( matcher = elementMatchers[ j++ ] ) ) { - if ( matcher( elem, context || document, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - - // They will have gone through all possible matchers - if ( ( elem = !matcher && elem ) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( ( matcher = setMatchers[ j++ ] ) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !( unmatched[ i ] || setMatched[ i ] ) ) { - setMatched[ i ] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[ i ] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( - selector, - matcherFromGroupMatchers( elementMatchers, setMatchers ) - ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( ( selector = compiled.selector || selector ) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[ 0 ] = match[ 0 ].slice( 0 ); - if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { - - context = ( Expr.find[ "ID" ]( token.matches[ 0 ] - .replace( runescape, funescape ), context ) || [] )[ 0 ]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[ i ]; - - // Abort if we hit a combinator - if ( Expr.relative[ ( type = token.type ) ] ) { - break; - } - if ( ( find = Expr.find[ type ] ) ) { - - // Search, expanding context for leading sibling combinators - if ( ( seed = find( - token.matches[ 0 ].replace( runescape, funescape ), - rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || - context - ) ) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert( function( el ) { - - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; -} ); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert( function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute( "href" ) === "#"; -} ) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - } ); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert( function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -} ) ) { - addHandle( "value", function( elem, _name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - } ); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert( function( el ) { - return el.getAttribute( "disabled" ) == null; -} ) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; - } - } ); -} - -return Sizzle; - -} )( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -} -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, _i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, _i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, _i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( elem.contentDocument != null && - - // Support: IE 11+ - // elements with no `data` attribute has an object - // `contentDocument` with a `null` prototype. - getProto( elem.contentDocument ) ) { - - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( _i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the primary Deferred - primary = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - primary.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( primary.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return primary.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); - } - - return primary.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, _key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( _all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // Support: IE <=9 only - // IE <=9 replaces "; - support.option = !!div.lastChild; -} )(); - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: IE <=9 only -if ( !support.option ) { - wrapMap.optgroup = wrapMap.option = [ 1, "" ]; -} - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Only attach events to objects that accept data - if ( !acceptData( elem ) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = Object.create( null ); - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( nativeEvent ), - - handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - - // Support: Chrome 86+ - // In Chrome, if an element having a focusout handler is blurred by - // clicking outside of it, it invokes the handler synchronously. If - // that handler calls `.remove()` on the element, the data is cleared, - // leaving `result` undefined. We need to guard against this. - return result && result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - which: true -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - // Suppress native focus or blur as it's already being fired - // in leverageNative. - _default: function() { - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.get( src ); - events = pdataOld.events; - - if ( events ) { - dataPriv.remove( dest, "handle events" ); - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = flat( args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - }, doc ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html; - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var swap = function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableTrDimensionsVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - }, - - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - // - // Support: Firefox 70+ - // Only Firefox includes border widths - // in computed dimensions. (gh-4529) - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if ( reliableTrDimensionsVal == null ) { - table = document.createElement( "table" ); - tr = document.createElement( "tr" ); - trChild = document.createElement( "div" ); - - table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; - tr.style.cssText = "border:1px solid"; - - // Support: Chrome 86+ - // Height set through cssText does not get applied. - // Computed height then comes back as 0. - tr.style.height = "1px"; - trChild.style.height = "9px"; - - // Support: Android 8 Chrome 86+ - // In our bodyBackground.html iframe, - // display for all div elements is set to "inline", - // which causes a problem only in Android 8 Chrome 86. - // Ensuring the div is display: block - // gets around this issue. - trChild.style.display = "block"; - - documentElement - .appendChild( table ) - .appendChild( tr ) - .appendChild( trChild ); - - trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + - parseInt( trStyle.borderTopWidth, 10 ) + - parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; - - documentElement.removeChild( table ); - } - return reliableTrDimensionsVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( _elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Support: IE 9 - 11 only - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( !support.boxSizingReliable() && isBorderBox || - - // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || - - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - - // Make sure the element is visible & connected - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( _i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - - // Handle: regular nodes (via `this.ownerDocument`), window - // (via `this.document`) & document (via `this`). - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = { guid: Date.now() }; - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml, parserErrorElem; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) {} - - parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; - if ( !xml || parserErrorElem ) { - jQuery.error( "Invalid XML: " + ( - parserErrorElem ? - jQuery.map( parserErrorElem.childNodes, function( el ) { - return el.textContent; - } ).join( "\n" ) : - data - ) ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ).filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ).map( function( _i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - -originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + - uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Use a noop converter for missing script but not if jsonp - if ( !isSuccess && - jQuery.inArray( "script", s.dataTypes ) > -1 && - jQuery.inArray( "json", s.dataTypes ) < 0 ) { - s.converters[ "text script" ] = function() {}; - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( _i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - -jQuery.ajaxPrefilter( function( s ) { - var i; - for ( i in s.headers ) { - if ( i.toLowerCase() === "content-type" ) { - s.contentType = s.headers[ i ] || ""; - } - } -} ); - - -jQuery._evalUrl = function( url, options, doc ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options, doc ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " -{% endmacro %} - -{% macro body_post() %} - - - -{% endmacro %} \ No newline at end of file diff --git a/pr-preview/pr-27/genindex.html b/pr-preview/pr-27/genindex.html deleted file mode 100644 index 036a71f2..00000000 --- a/pr-preview/pr-27/genindex.html +++ /dev/null @@ -1,559 +0,0 @@ - - - - - - - - - - - - - Index — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- - -

Index

- -
- -
- - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/index.html b/pr-preview/pr-27/index.html deleted file mode 100644 index 3157386d..00000000 --- a/pr-preview/pr-27/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/pr-preview/pr-27/index_toc.html b/pr-preview/pr-27/index_toc.html deleted file mode 100644 index 0453403b..00000000 --- a/pr-preview/pr-27/index_toc.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - -

You should have been redirected.

- If not, click here to continue. - - diff --git a/pr-preview/pr-27/intro.html b/pr-preview/pr-27/intro.html deleted file mode 100644 index 12f99284..00000000 --- a/pr-preview/pr-27/intro.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - - - - - - - - - Tensor Network Methods with Julia — TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - - - - - -
- -
- -
- -
- -

TensorTutorials

- -

Tensor Network Methods with Julia

- -
- -

Jacob Bridgeman, Lander Burgelman, Lukas Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort

- -
- - - - -
- -
- -
-

Tensor Network Methods with Julia#

-

This is a series of tutorials on tensor network methods and their applications in quantum -physics as well as statistical mechanics. It illustrates the theory, and aims to give -hands-on practise by providing Julia code examples, as well as showcasing the software -libraries that have been developed.

-

The lectures have been designed and written by Jacob Bridgeman, Lander Burgelman, Lukas -Devos, Jutho Haegeman, Daan Maertens, Bram Vancraeynest-De Cuiper and Kevin Vervoort.

- - - - -
-

Tensor Network Algorithms

- -
- -
-

Other

- -
-
- - - - -
- -
- - - -
- -

- -

Creative Commons License – This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International.

- -
- -
- - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/objects.inv b/pr-preview/pr-27/objects.inv deleted file mode 100644 index a49613522db3e37695057cdcbabf6dbcfe5d8b47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2356 zcmV-43Cs2)AX9K?X>NERX>N99Zgg*Qc_4OWa&u{KZXhxWBOp+6Z)#;@bUGkVd30!R zZVDqHR%LQ?X>V>iAPOTORA^-&a%F8{X>Md?av*PJAarPHb0B7EY-J#6b0A}HZE$jB zb8}^6Aa!$TZf78RY-wUH3V7PBnqP0@xDmkL^(hEsA9m65a&fLN`?i~G+HEhp?m1VW zMFD}4Xq$~hYDvn8Q}nxchLmJUmTj2|u)xL?=QsQ_Lk@@hna(xOL@p%Lf}6|VxKX7} zxFN=-A5)bOdPROdROzR+%`@`5;ma~3O=;Axzfep2%rrm7tm}B>pSiU{uE@eNZFx$b zg& zl6xk%pH;d&qNA?jRXnUY`HRRNxwe%iwIo=DI?Q~%H3NP5{%E+~u*a-B1BYvQW$=}2 zZt5|!AdUTM(}eW>EA!K>s4Cv`WX&XeKhl(bRo|XQQ$xV!2y4h(8Cz!9!UIYl)J?_= zw2Eb?)wU{k6jQ6{4s*|n0!Aj9(FZP#(%-m!R{F_Y{wgGA`ct;zkD9f$9k1zCy}vIr zE9eK}zme+WzLv!{&$&e_KdNF^>DgN9S%2)cILi!!gAJ^(zy0A4v73GOQE&&QLY1 z1^hPQ386P(s?_SwC61TI%r&o#Q9Mnr~fI4_rv3Qm=+aOeP}B zSYG&g8GGc}Sz~|k&QX+IbG`xY?jpfB3bN0kz{DqSPs=-2; z3u(?VwAQ$^2(i+8T^Pk_F{o$UwA%IEm7wk3DD2aVuv<{8b-XNPGG;FNo8kpZQzuP# zq}epotYVFA)S<1(jcN*`1l`R2E;V5>;>+cpvy9ugytr5e+69+fuePeN;kw(qN(XY{ zGy>9hTIKapR}HZtR*`$u*gm1Ow=U4Qnb6veRC>ZlzZCJNI&z$AgCI*$wxP_XU}ihc z^%Tyv=kUb3xDI(GpSpCmfYbvAl+4~-3y#SW)+3mcO6o+6p!&PS~z=m z0&&_Fhn9kk@w}M0r&N@BTd88b2Pnd^Dm4c^5NHi7`sXcCI|_E~X&MS#EOtH?vu+rD zu1`7?b)RSpbs(B=DKKXTt(r^L+ejZJW@RzT%NnZat z>v{c(l`B4Z#vKJlk4dxK+s{TCvt!U51E^dInetvJQs zV`hCz@Tfs}la0ViSfsfrGdr=#g^4lZ<{8^Rz>G9igwQtRruFw7gz|oic4iu8l_JI9 zLEv)P&OW$;!35+zw`-Lef9LSmG7~I%(n|8=sXsSi$McM(Fhy5^4(6q2q0)S5b_2LyvX&5XFyaPjLM{Gkp7fU8DrJ2jiV<6I`_YaTQeuDqP%hOu^P`*D?352Lc zy0?Lz5iGPAvtUTh`D`Nj!awAobLtjoKe%EJR-uF`>xzu40HLzRvPX2z=!;0<<8H_(MTp87aF zRj|Rx&>#pm7U`oOS*`40b|+!&pBV@OL!wMMls?{b2y{D-D(gkxf|JQU_+f#S_M&O6T-4tdSsLxzirL3fN%PaA60R>eu@HNy$* z{r3!weyivXbo7yfrq;)^VbiI*cXbV*cUuQ_cO{V)tM!z)(#bb_s;5njEIqRuS{jJk zl3rlx%c>_A{`;J*cx2pTfp{pe8};7c!UJdp0Oe2(&FC#orZvkQOR>IywcS}k`)E45 zjZ8Ty%K_rOEQcxOG@u*+uDLK=Lg={);kBgy4H4#A=l@;&{=fI%K45|ahApcyy^-0Z zlUHb9T!rSzoP6Dlc*sphbhs|9-FzQ;DmUJHXtakkd-wgO(ZSD!zZ?CI2~}VN&Q?Gp zn{K9N+YwP`PabanF?UP|c>crju3$t`2^i(WTQ0HvBT9 zt2pG^sjJN#c<<((1T=ZNU@Jz8*-?5=k=`irXY)AaiOR#`Gn>;&+K~$NJT9#^1oFbj zDb!T|2Snrlona&Q^Y4+B)2>LYY%WM_XlRBnGWZl(nrxFyBvTOK=W*YH>O}7ECIa%Q z{q3{{#Y0au#<$EdXvIJ(EM!o5?6Nw5^nhw@Ew84;OyyNCWGX|O^{x`W4wr@!yjBP^ zp-OtfNueS%XN3(ObPo9{zA<3O-H;8)|h_76$7_a=#%kH2Ubz%o&E5a=K a7gX!K9(a9yi9^y_AV-}Xjs6eKRzNTO#-zId diff --git a/pr-preview/pr-27/search.html b/pr-preview/pr-27/search.html deleted file mode 100644 index 1a33b44f..00000000 --- a/pr-preview/pr-27/search.html +++ /dev/null @@ -1,586 +0,0 @@ - - - - - - - - - - - - Search - TensorTutorials - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - -
- -
- -
- - - - - -
- -
- - - -
- - \ No newline at end of file diff --git a/pr-preview/pr-27/searchindex.js b/pr-preview/pr-27/searchindex.js deleted file mode 100644 index d3c48351..00000000 --- a/pr-preview/pr-27/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({"docnames": ["0-Preliminaries/Resources", "0-Preliminaries/Software", "1-Introduction/FockSpace", "1-Introduction/ManyBody", "1-Introduction/Observables", "1-Introduction/QuantumMechanics", "1-Introduction/QuantumToClassical", "2-TensorNetworks/LinearAlgebra", "2-TensorNetworks/Symmetries", "2-TensorNetworks/TensorNetworkStates", "2-TensorNetworks/TensorNetworks", "3-MatrixProductStates/Algorithms", "3-MatrixProductStates/InfiniteMPS", "3-MatrixProductStates/MatrixProductOperators", "3-MatrixProductStates/MatrixProductStates", "4-Algorithms/FixedpointAlgorithms", "4-Algorithms/TimeEvolutionAlgorithms", "5-Tutorials/FiniteEntanglementScaling", "5-Tutorials/SymmetricTensors", "References", "intro"], "filenames": ["0-Preliminaries/Resources.md", "0-Preliminaries/Software.md", "1-Introduction/FockSpace.md", "1-Introduction/ManyBody.md", "1-Introduction/Observables.md", "1-Introduction/QuantumMechanics.md", "1-Introduction/QuantumToClassical.md", "2-TensorNetworks/LinearAlgebra.md", "2-TensorNetworks/Symmetries.md", "2-TensorNetworks/TensorNetworkStates.md", "2-TensorNetworks/TensorNetworks.md", "3-MatrixProductStates/Algorithms.md", "3-MatrixProductStates/InfiniteMPS.md", "3-MatrixProductStates/MatrixProductOperators.md", "3-MatrixProductStates/MatrixProductStates.md", "4-Algorithms/FixedpointAlgorithms.md", "4-Algorithms/TimeEvolutionAlgorithms.md", "5-Tutorials/FiniteEntanglementScaling.md", "5-Tutorials/SymmetricTensors.md", "References.md", "intro.md"], "titles": ["2. Useful Resources", "1. Getting Started with Numerics", "5. Fock Space and Second Quantisation", "4. The Hilbert Space of Many-Body Physics", "6. Interesting States and Observables in Quantum Many-Body Physics", "3. Quantum Mechanics and its Postulates", "7. Quantum-to-Classical Mapping", "8. (Multi-) Linear Algebra", "11. Symmetries in Quantum Many-Body Physics", "10. Tensor Network States", "9. Tensor Network Theory", "14. A Simple Tensor Network Algorithm", "13. Infinite Matrix Product States", "15. Matrix Product Operators and Applications", "12. Matrix Product States", "16. Fixed-Point algorithms", "17. Time Evolution", "19. Finite Entanglement Scaling", "18. A Symmetric Tensor Deep Dive: Constructing Your First Tensor Map", "20. References", "Tensor Network Methods with Julia"], "terms": {"other": [0, 1, 3, 4, 6, 7, 8, 10, 11, 13, 14, 16, 18, 19], "learn": [0, 1, 6, 10, 12], "about": [0, 1, 2, 3, 4, 5, 8, 15, 18], "tensor": [0, 2, 6, 12, 14, 15, 16, 19], "network": [0, 3, 4, 7, 8, 12, 14, 16, 18, 19], "includ": [0, 2, 4], "ar": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "certainli": [0, 3], "limit": [0, 2, 4, 5, 6, 8, 11, 14, 15, 16], "tensornetwork": 0, "org": [0, 19], "net": 0, "On": [1, 4, 6, 18, 19], "thi": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20], "page": [1, 19], "some": [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18], "link": [1, 12, 19], "relev": [1, 4, 5, 9, 10, 11, 13, 18], "inform": [1, 3, 4, 5, 6, 10, 14, 18], "comput": [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], "we": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "point": [1, 4, 6, 8, 9, 10, 12, 13, 14, 18, 20], "refer": [1, 2, 3, 4, 5, 8, 9, 12, 13, 18, 20], "program": 1, "languag": [1, 5, 7, 10, 16, 18], "well": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 18, 20], "resourc": [1, 20], "tool": [1, 4, 10, 12, 13], "us": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 20], "develop": [1, 4, 5, 10, 11, 16, 20], "sometim": [1, 3, 8], "field": [1, 3, 4, 5, 6, 8, 10, 13, 15, 18], "manag": [1, 11], "track": [1, 8, 16], "chang": [1, 2, 4, 5, 8, 10, 14, 18], "made": [1, 3, 4, 6, 10, 11, 13, 18], "project": [1, 10, 11, 14, 16, 18], "s": [1, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 19], "sourc": 1, "code": [1, 13, 18, 20], "document": 1, "ani": [1, 3, 4, 6, 8, 9, 10, 11, 12, 14, 16, 18], "set": [1, 2, 3, 4, 6, 7, 8, 9, 10, 13, 14, 15, 16, 18], "file": 1, "It": [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 13, 15, 16, 18, 20], "allow": [1, 3, 7, 8, 9, 10, 12, 13, 14, 18], "multipl": [1, 3, 4, 8, 10, 18], "contributor": 1, "work": [1, 2, 3, 4, 11, 12, 14, 15, 16, 18], "collabor": 1, "keep": [1, 3, 4, 6, 7, 8, 9, 14, 16, 18], "histori": 1, "facilit": [1, 10], "organ": 1, "synchron": 1, "differ": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18], "The": [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19, 20], "most": [1, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 18], "popular": 1, "system": [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 19], "git": 1, "which": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "free": [1, 2, 4, 13, 15, 16], "linu": 1, "torvald": 1, "2005": [1, 11, 16, 19], "ha": [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "becom": [1, 2, 4, 6, 8, 10, 11, 14, 15, 18], "de": [1, 4, 20], "facto": 1, "standard": [1, 5, 6, 12, 13, 18], "industri": 1, "again": [1, 3, 4, 7, 8, 10, 11, 12, 13, 14, 15, 18], "avail": [1, 7], "from": [1, 2, 3, 5, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18], "offici": 1, "websit": 1, "book": 1, "pro": 1, "good": [1, 4, 8, 9, 10, 18], "place": [1, 5, 8, 10, 11, 12, 14], "For": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "more": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "dynam": [1, 6, 11, 16], "approach": [1, 6, 9, 11, 13, 15], "you": [1, 2, 3, 8, 9, 14, 15, 18], "can": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "through": [1, 7, 10, 12, 13, 15, 18], "interact": [1, 2, 3, 4, 5, 6, 9, 11, 13, 15, 18, 19], "tutori": [1, 3, 9, 12, 16, 17, 18], "In": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19], "order": [1, 3, 4, 5, 6, 7, 11, 13, 16, 18, 19], "mani": [1, 2, 5, 6, 7, 9, 10, 11, 12, 13, 14, 16, 18], "alreadi": [1, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 16, 18], "full": [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 14, 15, 18], "exposit": [1, 12, 15], "found": [1, 10, 11, 12, 13, 16], "exampl": [1, 2, 3, 4, 5, 7, 9, 10, 13, 18, 20], "here": [1, 3, 4, 6, 7, 8, 10, 11, 13, 15, 16, 18], "There": [1, 2, 4, 5, 6, 8, 11, 18], "also": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18], "topic": [1, 8], "list": [1, 7, 18], "much": [1, 4, 5, 7, 8, 11, 12, 18], "addition": [1, 7, 10, 13], "an": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19], "activ": 1, "forum": 1, "ask": 1, "question": [1, 4, 5, 8, 9, 11, 14], "slack": 1, "channel": 1, "stack": 1, "overflow": 1, "veri": [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 18], "open": [1, 10, 15], "commun": 1, "purpos": [1, 6, 11, 18], "These": [1, 2, 3, 5, 7, 8, 10, 14, 16, 18], "typic": [1, 2, 3, 4, 5, 7, 10, 12, 13], "have": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20], "own": [1, 4], "host": [1, 6], "github": 1, "incomplet": 1, "cours": [1, 2, 3, 5, 6, 8, 10, 19], "given": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "below": [1, 4, 5, 6, 8, 15, 16, 18], "tensorkit": [1, 7, 8, 10, 12, 13, 15, 16, 18], "jl": [1, 7, 10, 12, 13, 17, 18], "tensoroper": [1, 10, 12], "krylovkit": 1, "optimkit": 1, "mpskit": [1, 13, 15, 17, 18], "pepskit": 1, "check": [1, 8, 12, 13, 16, 18], "out": [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18], "our": [1, 3, 4, 5, 8, 9, 11, 12, 14, 15, 18], "repositori": 1, "addit": [1, 4, 6, 7, 8, 10, 11, 13, 16, 18], "librari": [1, 20], "gener": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 19], "quantum": [1, 2, 3, 10, 12, 14, 16, 19], "physic": [1, 2, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19], "research": [1, 10], "find": [1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16, 18, 19], "itensor": 1, "c": [1, 2, 3, 4, 5, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19], "calcul": [1, 2, 14], "tenpi": 1, "python": 1, "quimb": 1, "bodi": [1, 2, 5, 6, 9, 10, 13, 16], "when": [2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 18], "basi": [2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 16], "vector": [2, 3, 4, 5, 8, 9, 10, 12, 13, 15, 18], "occupp": 2, "number": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], "represent": [2, 3, 6, 9, 10, 11, 13, 14, 15, 18], "might": [2, 3, 4, 5, 6, 7, 8, 15, 18], "consid": [2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], "drop": [2, 16], "overal": [2, 4, 6], "constraint": [2, 3, 16], "sum_": [2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 18], "j": [2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 18, 19], "1": [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 19], "l": [2, 3, 4, 5, 8, 9, 10, 12, 13, 14, 15, 18, 19], "n_j": [2, 3, 18], "n": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 19], "amount": [2, 3, 4, 5, 8, 9, 10, 16], "larger": [2, 4, 10], "hilbert": [2, 4, 5, 6, 9, 14, 18, 20], "known": [2, 3, 4, 5, 6, 8, 10, 11, 15, 18], "consist": [2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 16, 18], "direct": [2, 3, 4, 6, 10, 13, 15, 18], "sum": [2, 3, 4, 6, 10, 11, 12, 13, 16, 18], "all": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "symmetris": [2, 3], "antisymmetris": [2, 3], "mathbb": [2, 3, 4, 5, 6, 8, 9, 10, 12, 14], "h": [2, 3, 4, 5, 6, 8, 9, 11, 13, 15, 16, 18, 19], "particl": [2, 4, 5, 8, 11, 18], "go": [2, 4, 12, 18], "wai": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18], "0": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19], "bigoplus_": [2, 8, 18], "infti": [2, 4, 6, 8, 11, 13, 16], "case": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18], "fermion": [2, 3], "finit": [2, 3, 5, 6, 7, 8, 12, 14, 15, 19, 20], "dimension": [2, 3, 4, 5, 7, 8, 9, 10, 13, 14, 15, 19], "singl": [2, 3, 4, 5, 6, 8, 10, 12, 13, 14, 18], "cong": [2, 3, 7, 18], "upper": [2, 4, 10, 16], "i": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19], "e": [2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 18, 19], "state": [2, 3, 6, 8, 10, 11, 15, 16, 18, 19], "so": [2, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "associ": [2, 3, 4, 5, 7, 8, 12, 13, 18], "zero": [2, 3, 5, 9, 10, 13, 18], "furthermor": [2, 3, 4, 6, 7, 10, 14], "contain": [2, 3, 4, 6, 11, 16, 18], "discuss": [2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], "befor": [2, 4, 6, 7, 8, 11, 13, 14, 18], "previou": [2, 3, 8, 12, 14, 15, 18], "subsect": [2, 18], "start": [2, 3, 4, 5, 6, 9, 10, 12, 13, 15, 16, 18, 20], "construct": [2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 16, 19, 20], "onli": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "correspond": [2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18], "occup": [2, 3, 18], "henc": [2, 3, 4, 6, 8, 15], "span": [2, 3, 4, 5, 8, 18], "denot": [2, 3, 4, 5, 6, 7, 8, 11, 13, 14, 18], "ket": [2, 3, 4, 5, 6, 8, 9, 11, 12, 13, 14, 15, 16, 18], "omega": [2, 4], "dot": [2, 3, 4, 5, 13, 16], "vacuum": [2, 18], "note": [2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 18, 19], "normalis": [2, 3, 4, 5], "thu": [2, 3, 4, 5, 6, 7, 8, 10, 13, 15, 16], "actual": [2, 3, 4, 6, 8, 9, 11, 18], "norm": [2, 3, 5, 10, 12, 15], "simpli": [2, 3, 4, 8, 10, 11, 15, 16, 18], "incorpor": 2, "inner": [2, 3, 5, 10, 18], "product": [2, 5, 6, 11, 15, 18, 19], "each": [2, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "its": [2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 16, 18, 20], "summand": [2, 8], "within": [2, 6, 11, 14, 18], "defin": [2, 3, 4, 5, 7, 8, 10, 12, 13, 15, 18], "orthogon": [2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 18], "braket": [2, 3, 4, 5, 6, 8, 13, 14, 15, 16], "varphi": [2, 3, 5], "m": [2, 4, 5, 6, 8, 10, 11, 12, 13, 14, 16, 18, 19], "vert": [2, 3, 4, 5, 6], "psi": [2, 3, 4, 5, 8, 9, 11, 12, 13, 14, 15, 16], "neq": [2, 3, 4, 8], "main": [2, 10], "benefit": [2, 8], "formal": [2, 3, 4, 5, 8, 11, 12], "lose": 2, "oper": [2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 19, 20], "particular": [2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 16, 18], "describ": [2, 3, 4, 5, 6, 7, 8, 14, 18], "hamiltonian": [2, 3, 4, 5, 6, 8, 9, 13, 14, 15, 16], "first": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20], "need": [2, 3, 4, 5, 10, 13, 16, 18], "specifi": [2, 3, 10, 12, 13, 15], "extern": [2, 4, 8], "paramet": [2, 4, 6, 9, 15], "now": [2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18], "action": [2, 3, 6, 7, 8, 16], "immedi": [2, 5, 8, 16, 18], "arbitrari": [2, 3, 4, 5, 6, 7, 9, 12, 14, 15, 18], "even": [2, 3, 4, 5, 6, 8, 10, 11, 13, 14, 15, 18], "superposit": [2, 3, 4, 9], "over": [2, 3, 4, 5, 8, 10, 13, 15, 18], "hereto": [2, 4], "introduc": [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18], "enabl": [2, 5, 6, 10, 12, 15], "connect": [2, 4, 9, 12, 14], "sector": [2, 12, 18], "creat": [2, 3, 4, 7, 10, 16], "ad": [2, 7, 8, 14], "annihil": [2, 6], "remov": [2, 13, 16], "hat": [2, 3, 4, 5, 6, 16], "_j": [2, 4, 18], "add": [2, 5, 10, 18], "new": [2, 3, 4, 5, 6, 7, 8, 10, 12, 16], "mode": [2, 3], "As": [2, 3, 4, 7, 8, 10, 11, 13, 14, 15, 16, 18], "turn": [2, 3, 4, 8, 9, 11, 14, 15, 16, 18], "both": [2, 3, 4, 6, 7, 10, 13, 14, 16, 18], "relat": [2, 3, 4, 5, 6, 7, 8, 12, 14, 18], "via": [2, 4, 5, 8, 10, 16], "adjoint": [2, 4, 5, 16, 18], "phi": [2, 6, 14], "simpler": [2, 18], "notat": [2, 3, 5, 7, 8, 12, 14, 18], "dagger": [2, 4, 5, 8, 10, 12, 15, 18], "creation": 2, "To": [2, 3, 4, 9, 11, 12, 13, 14], "mathemat": [2, 3, 4, 5, 7, 8, 13, 19], "precis": [2, 3, 4, 9, 10, 14, 15, 18, 19], "somewhat": [2, 4, 13], "tediou": 2, "see": [2, 3, 6, 8, 9, 11, 12, 14, 15, 16, 18], "wikipedia": 2, "just": [2, 3, 4, 7, 10, 12, 13, 14, 18], "summar": [2, 7, 8, 14, 18], "properti": [2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 16, 18], "want": [2, 4, 5, 8, 9, 11], "anti": [2, 3, 8], "symmetr": [2, 3, 20], "satisfi": [2, 4, 5, 8, 12, 14, 18], "j_1": [2, 3, 4, 7], "j_2": [2, 3, 4, 7], "ldot": [2, 3, 4, 5], "j_n": [2, 3, 7], "_": [2, 3, 4, 14, 15, 16, 18], "cdot": [2, 3, 6, 7, 8, 10, 18], "clear": [2, 4, 5, 6, 8, 10, 15, 18], "becaus": [2, 3, 4, 5, 6, 7, 10, 12, 13, 15, 16], "symmetri": [2, 3, 4, 5, 12, 13, 14, 20], "requir": [2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 16, 18], "_i": [2, 4, 6, 15, 16, 18], "text": [2, 3, 4, 10, 13, 16, 18], "boson": [2, 3, 18], "quad": [2, 4, 18], "follow": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "delta_": [2, 3, 5, 8, 18], "With": [2, 3, 4, 5, 6, 12], "respect": [2, 3, 4, 5, 7, 8, 9, 10, 13, 14, 15, 18], "normal": [2, 4, 5, 10, 11, 14, 15, 16], "n_1": [2, 3], "n_2": [2, 3], "n_l": [2, 3], "frac": [2, 3, 4, 5, 6, 8, 11, 12, 13, 15, 16, 18], "sqrt": [2, 3, 4, 5, 8, 12, 13, 16, 18], "_1": [2, 3, 4, 5, 6], "_2": [2, 3, 4, 5, 6, 8, 15], "_l": [2, 4], "pm": [2, 3, 6, 18], "n_": 2, "easili": [2, 4, 6, 7, 10, 12, 13, 14, 15, 18], "measur": [2, 3, 4, 9, 13], "total": [2, 4, 8, 9, 13, 15, 18], "doe": [2, 3, 4, 5, 6, 8, 10, 11, 15], "eigenst": [2, 4, 8, 11, 16, 18], "studi": [2, 4, 6, 9, 10, 13, 14, 16], "how": [2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 15, 16], "equiv": [2, 7, 8], "under": [2, 3, 5, 8, 12, 15, 18], "transform": [2, 4, 5, 8, 10, 12, 14, 18], "deduc": 2, "suppos": [2, 3, 4, 12], "clariti": 2, "label": [2, 3, 6, 7, 8, 10, 18], "greek": 2, "letter": [2, 19], "kappa": [2, 4], "obtain": [2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16, 18], "qquad": [2, 11, 13, 15], "matrix": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 18, 19], "between": [2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 18], "two": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18, 19], "orthonorm": [2, 3, 4, 5, 12, 15, 18], "base": [2, 3, 4, 5, 7, 8, 10, 12, 18], "unitari": [2, 4, 5, 8, 10, 12, 15, 18], "rule": [2, 8, 18], "emploi": 2, "often": [2, 3, 4, 5, 6, 8, 10, 13, 18], "switch": 2, "posit": [2, 3, 4, 5, 6, 10, 12, 14, 16], "momentum": [2, 4, 8], "reminisc": [2, 3, 4], "diagonalis": [2, 4, 5, 6], "harmon": 2, "oscil": 2, "model": [2, 3, 4, 5, 6, 8, 13, 15, 19], "inde": [2, 3, 4, 6, 8, 10, 11, 12, 14, 16, 18], "everi": [2, 3, 4, 5, 6, 8, 9, 12, 14, 15, 18], "build": [2, 3, 4, 5, 8, 11, 13], "hermitian": [2, 4, 5, 10, 11, 18], "x": [2, 3, 4, 5, 6, 8, 10, 13, 15, 18, 19], "2": [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19], "p": [2, 4, 5, 8, 10, 14, 15, 16, 18, 19], "mathrm": [2, 4, 5, 6, 12, 13], "than": [2, 4, 7, 8, 9, 11, 12, 18], "commut": [2, 3, 5, 6, 7, 8, 11, 18], "left": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "_k": [2, 4], "right": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "k": [2, 3, 4, 5, 6, 8, 10, 14, 18], "built": [2, 7, 10, 18], "equival": [2, 4, 6, 7, 8, 10, 15], "thought": [2, 3, 4, 7, 8, 10, 13, 18], "regular": [2, 3, 7, 8, 13, 18], "distinguish": [2, 3], "move": [2, 3, 5, 9, 10, 12, 14, 15, 18], "real": [2, 3, 5, 6, 7, 8, 11, 15, 16], "line": [2, 3, 4, 6, 9, 13, 18], "technic": [2, 4, 5, 6, 12, 18], "r": [2, 3, 5, 8, 9, 10, 12, 15, 19], "otim": [2, 3, 4, 7, 8, 9, 12, 13, 14, 18], "eta": [2, 15], "thei": [2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 16, 18], "anticommut": [2, 8, 18], "alpha": [2, 5, 7, 8, 12, 14], "beta": [2, 4, 6, 12, 13, 14, 16], "type": [2, 3, 4, 7, 13, 16, 18], "behav": [2, 3, 4, 6, 7, 8], "similarli": [2, 3, 7, 8, 10, 12, 13, 15, 18], "one": [2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19], "chi": [2, 11], "2j": 2, "2l": 2, "majorana": 2, "look": [2, 4, 9, 12, 18], "remark": [2, 4, 18], "like": [2, 3, 4, 6, 7, 8, 10, 16, 18], "qubit": [2, 3, 5, 8], "while": [2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 18], "true": [2, 4, 5, 7, 10, 12, 16], "import": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18], "fact": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 16, 18], "should": [2, 3, 4, 6, 8, 9, 10, 12, 13, 14, 15, 16, 18], "local": [2, 4, 6, 8, 9, 11, 12, 13, 14, 15, 18], "act": [2, 3, 4, 6, 7, 8, 11, 12, 13, 14, 15, 16, 18], "nontrivi": [2, 3, 4, 5, 18], "site": [2, 3, 4, 5, 6, 8, 9, 11, 12, 13, 14, 15, 16, 18], "ident": [2, 4, 5, 6, 7, 8, 12, 18], "elsewher": [2, 3], "sinc": [2, 3, 4, 8, 9, 11, 12, 14, 15, 16, 18], "do": [2, 3, 4, 5, 6, 8, 11, 13, 14, 16, 18], "mutual": [2, 3, 6], "rather": [2, 4, 5, 8, 11, 15, 18], "possibl": [2, 3, 5, 7, 10, 11, 13, 16, 18], "map": [2, 3, 4, 5, 8, 10, 11, 12, 13, 14, 20], "nonloc": 2, "jordan": [2, 11, 19], "wigner": 2, "repres": [2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 15, 16, 18], "depend": [2, 3, 4, 5, 8, 12, 14, 16, 18, 19], "simplest": [2, 5, 8, 10, 11, 18], "were": [2, 4, 8, 10, 16], "easiest": [2, 4], "diagon": [2, 4, 5, 6, 8, 10, 12, 18], "chosen": [2, 4, 8, 9, 10, 13], "eigenmod": 2, "give": [2, 3, 4, 8, 9, 10, 12, 13, 14, 16, 18, 20], "contribut": [2, 3, 4, 9, 13], "equal": [2, 3, 4, 5, 7, 8, 9, 10, 14, 16], "eigenvalu": [2, 4, 5, 8, 11, 12, 13, 14, 15, 18], "o": [2, 3, 4, 5, 6, 8, 11, 12, 13, 14, 16, 18], "lambda_j": 2, "bra": [2, 4, 5, 11, 12, 14, 16, 18], "rightarrow": [2, 7, 8, 14], "howev": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18], "awai": 2, "o_": [2, 8], "vice": [2, 7, 8], "versa": [2, 7, 8], "term": [2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 16], "where": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "exactli": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 18], "annil": 2, "especi": [2, 4, 8, 10, 13], "easi": [2, 10, 11, 14, 18], "version": [2, 3, 7, 10, 12, 18], "form": [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "said": [2, 4, 8], "noninteract": 2, "class": [2, 4, 9, 13, 14, 15], "name": [2, 3, 4, 5, 7, 8, 10, 11, 14, 15, 18], "quadrat": [2, 18], "mean": [2, 3, 4, 5, 7, 8, 9, 11, 12, 14, 18], "either": [2, 3, 7, 10, 11, 13, 16], "Such": [2, 3, 4, 5], "gaussian": [2, 10], "bogoliubov": 2, "exist": [2, 3, 4, 5, 8, 9, 10, 11, 13, 18], "coulomb": 2, "electron": [2, 3, 5], "take": [2, 3, 4, 6, 7, 8, 10, 11, 12, 15, 16, 18], "translat": [2, 4, 8, 12, 15, 16, 18], "leq": [2, 3, 4, 5], "_m": [2, 5], "4": [2, 7, 8, 9, 10, 12, 13, 14, 15, 19], "soon": [2, 3, 4, 17], "present": [2, 4, 8, 13], "imposs": [2, 4, 6, 9], "simpl": [2, 3, 8, 10, 12, 13, 15, 18, 20], "exponenti": [2, 3, 4, 6, 9, 11, 12, 13, 14, 16, 19], "larg": [2, 4, 5, 6, 8, 9, 10, 11, 14, 15], "axiom": [3, 4], "remain": [3, 4, 12, 13], "valid": [3, 4, 5, 6, 18], "composit": [3, 4, 5, 8, 18], "sever": [3, 6, 9], "degre": [3, 4, 5, 6, 8, 16, 18], "freedom": [3, 4, 5, 6, 8, 10, 12, 16], "know": [3, 4, 5, 8, 18], "specif": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 18], "mechan": [3, 8, 19, 20], "forc": [3, 4, 7], "compos": [3, 4, 8], "subsystem": [3, 4, 11, 14], "call": [3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], "A": [3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 19, 20], "b": [3, 4, 5, 7, 8, 10, 11, 13, 14, 16, 19], "alic": 3, "bob": 3, "context": [3, 4, 5, 7, 8, 10, 13, 18], "themselv": [3, 7, 8, 18], "isol": [3, 4, 5, 18], "itself": [3, 4, 5, 6, 7, 8, 15, 18], "analogu": 3, "togeth": [3, 4, 6, 7, 8, 16], "still": [3, 4, 5, 7, 8, 10, 11, 12, 18], "treat": [3, 4, 6, 18], "them": [3, 4, 7, 8, 9, 10, 11, 13, 14], "independ": [3, 4, 5, 8, 9, 10, 16, 18], "prepar": [3, 4], "abl": [3, 8, 9, 14, 18], "jointli": 3, "must": [3, 4, 10, 13, 18], "argument": 3, "time": [3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 18, 19, 20], "live": [3, 16], "joint": [3, 4], "ab": [3, 4, 10], "yet": [3, 6], "determin": [3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 18, 19], "make": [3, 4, 5, 7, 9, 10, 11, 13, 14, 15, 16, 18], "sens": [3, 5, 12, 16, 18], "fix": [3, 4, 5, 10, 12, 13, 14, 18, 20], "descript": [3, 4, 5, 8, 11, 13], "lead": [3, 4, 6, 7, 8, 9, 10, 12, 13, 18], "a_1": [3, 5, 15, 16], "a_2": [3, 5, 13, 15, 16], "b_1": 3, "b_2": [3, 13], "try": [3, 11, 16, 18], "linear": [3, 4, 5, 8, 10, 14, 15, 16, 18, 20], "combin": [3, 4, 5, 6, 7, 10, 16, 18], "thereof": 3, "abov": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18], "hold": [3, 7, 18], "output": [3, 7, 18], "same": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18], "symbol": [3, 8, 13], "importantli": [3, 11, 13], "psi_1": [3, 4, 5], "varphi_1": 3, "psi_2": [3, 4, 5], "varphi_2": 3, "correl": [3, 6, 11, 19], "concept": [3, 4, 6, 7, 8, 10, 12, 16], "entangl": [3, 6, 9, 10, 13, 16, 19, 20], "fundament": [3, 5, 14], "That": [3, 8], "individu": [3, 4, 6, 10, 15, 18], "separ": [3, 4, 6, 9, 10, 14], "deduct": 3, "proof": [3, 4, 8, 10], "expect": [3, 4, 6, 7, 8, 11, 16, 18], "shown": [3, 8, 10, 12, 13, 16, 18], "extend": [3, 4, 9, 10, 12, 13, 16, 18], "definit": [3, 4, 5, 7, 10, 12, 16, 18], "second": [3, 4, 5, 8, 10, 12, 15, 16, 18, 20], "antilinear": 3, "practic": [3, 4, 5, 6, 10, 11, 14, 16, 18], "d": [3, 4, 5, 6, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19], "dimens": [3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19], "expand": [3, 4, 6, 13, 16], "psi_": [3, 4, 8], "jk": [3, 10], "expans": [3, 4], "coeffici": [3, 4, 5, 8, 9, 12, 14, 18], "indic": [3, 4, 7, 9, 13, 16, 18], "think": [3, 5, 7, 8, 18], "almost": [3, 5, 8], "alwai": [3, 4, 5, 8, 12, 13, 14, 18], "complic": [3, 5, 10, 13, 16, 18], "choic": [3, 4, 5, 6, 7, 8, 10, 12, 13, 18], "One": [3, 4, 6, 8, 10, 12, 14, 16, 18], "rememb": [3, 6, 8, 16, 18], "your": [3, 5, 20], "spin": [3, 5, 6, 8, 9, 12, 13, 14, 15], "If": [3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 18], "uparrow": [3, 6, 8, 18], "downarrow": [3, 6, 8, 18], "coupl": [3, 8, 18], "section": [3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18], "process": [3, 4, 6, 10, 13, 18], "simultan": [3, 7, 8], "kroneck": [3, 8, 10, 13], "interest": [3, 8, 9, 14, 18, 20], "without": [3, 5, 7, 8, 12, 15, 18], "anyth": [3, 6, 9], "_b": [3, 4], "omit": [3, 5], "explicit": [3, 4, 10, 14, 18], "certain": [3, 4, 5, 6, 10, 11, 18], "lift": [3, 7], "_a": [3, 4, 16], "readili": [3, 7, 12], "s_1": [3, 6, 8, 9, 14, 18], "s_2": [3, 6, 8, 9, 14, 18], "s_n": [3, 9, 14], "interpret": [3, 4, 6, 8, 9, 10, 12, 14, 18, 19], "length": [3, 4, 5, 10, 12, 14, 15, 18], "index": [3, 8, 9, 14, 18], "rang": [3, 4, 13, 15], "valu": [3, 4, 6, 8, 9, 11, 15, 16, 18], "increas": [3, 9, 10, 11, 14, 16, 18], "why": [3, 9, 12], "problem": [3, 6, 10, 11, 13, 15, 16, 18], "difficult": 3, "essenti": [3, 6, 8, 14, 18], "provid": [3, 4, 5, 7, 9, 10, 12, 18, 20], "speed": 3, "up": [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18], "factor": [3, 4, 6, 13, 14, 15, 16, 18], "final": [3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 18], "few": [3, 4, 10, 11, 13, 18], "reappear": 3, "throughout": [3, 4, 6], "Ising": [3, 4, 6, 8, 13, 15], "transvers": [3, 4, 6, 8, 13, 15, 18], "magnet": [3, 8, 18], "langl": [3, 5, 10, 12, 13, 18], "rangl": [3, 5, 10, 12, 13, 18], "sigma": [3, 4, 6, 8, 10], "z_i": [3, 4, 6, 8, 15, 18], "z_j": [3, 4, 6, 13, 15, 18], "sum_i": [3, 6, 8, 12, 14, 15, 16, 18], "x_i": [3, 6, 8, 10, 15, 18], "summat": [3, 10, 13], "variabl": [3, 13], "lattic": [3, 4, 5, 6, 8, 9, 11, 12, 13, 15, 18, 19], "pair": [3, 9, 10, 14, 18], "neighbour": [3, 4, 8, 10, 11], "enumer": 3, "would": [3, 4, 5, 8, 11, 12, 16, 18], "underbrac": 3, "begin": [3, 7, 8, 10, 13, 18], "bmatrix": 3, "end": [3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 16, 18], "unit": [3, 4, 8, 12, 13, 14, 16], "z": [3, 4, 5, 6, 8, 12, 13, 14, 15, 16, 19], "matric": [3, 4, 5, 8, 10, 12, 14, 15, 16, 18], "revis": 3, "chain": [3, 5, 8, 12, 13, 14, 15, 16, 19], "temporarili": 3, "assign": [3, 4, 10, 18], "fold": 3, "widetild": 3, "complet": [3, 4, 5, 7, 12, 14, 18], "cannot": [3, 5, 6, 8, 11, 18], "versu": 3, "occupi": 3, "gave": 3, "redefinit": 3, "permut": [3, 10, 18], "invari": [3, 4, 6, 8, 12, 13, 14, 15, 16, 18], "g": [3, 4, 5, 8, 16, 18, 19], "rotat": [3, 6, 8, 10, 13], "observ": [3, 8, 9, 12, 18, 20], "along": [3, 6, 7, 10, 13], "prefer": [3, 10], "detect": [3, 4, 14, 18], "restrict": [3, 4, 5, 8, 12, 15, 18], "subspac": [3, 4, 6, 8, 18], "affect": [3, 11], "due": [3, 4, 6, 7, 8, 10, 11, 18], "rai": [3, 4, 5], "pick": [3, 16, 18], "phase": [3, 4, 5, 10, 14, 16, 19], "appli": [3, 5, 6, 9, 10, 11, 12, 13, 16, 18], "result": [3, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18], "theori": [3, 4, 5, 6, 14, 18, 19, 20], "group": [3, 9, 11, 15, 18], "absent": 3, "odd": [3, 11, 18], "sign": [3, 6, 8, 18], "atur": 3, "wherea": [3, 4, 8, 15], "those": [3, 4, 6, 13, 15, 18], "nontriv": 3, "automat": [3, 8, 12, 13, 18], "rise": [3, 4, 8, 9, 12, 13, 18], "p_": 3, "12": [3, 10, 15, 18], "antisymmetr": 3, "tild": [3, 12, 15, 16], "onto": [3, 4, 5, 8, 12, 14, 16, 18], "symmer": 3, "psi_n": [3, 4], "epsilon_": 3, "element": [3, 4, 5, 7, 8, 10, 12, 13, 15, 18], "biject": 3, "integ": [3, 8, 10, 18], "whether": [3, 4, 18], "elementari": 3, "transposit": 3, "tau_": 3, "interchang": [3, 18], "foral": [3, 5, 8], "land": 3, "necessarili": [3, 4, 7, 8, 10, 13, 18], "yield": [3, 4, 5, 6, 13, 15, 16], "imag": [3, 10], "proper": 3, "behaviour": [3, 4], "relabel": 3, "auxiliari": [3, 4, 18], "scenario": [3, 4], "happen": [3, 4, 8, 9, 10], "constrain": [3, 18], "notabl": 3, "gaug": [3, 8, 11, 15, 16], "extens": [3, 4, 12, 14, 16], "being": [3, 4, 8, 10, 15, 18], "let": [3, 4, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18], "henceforth": [3, 4], "applic": [3, 10, 18, 19, 20], "j_k": 3, "select": [3, 4, 8], "coincid": [3, 7, 18], "elimin": [3, 10], "linearli": [3, 4, 5, 8], "impli": [3, 4, 8, 10, 12, 18], "wonder": [3, 6, 8, 14, 18], "prefactor": 3, "i_1": [3, 7, 10], "i_2": [3, 7, 10], "i_n": [3, 7], "situat": [3, 4, 5], "exprress": 3, "characteris": [3, 4, 5, 6], "instead": [3, 4, 6, 9, 11, 12, 16, 18], "absorb": [3, 9, 12, 13, 14, 16], "suitabl": [3, 6, 14, 18], "structur": [3, 4, 7, 8, 10, 11, 13, 14, 18], "could": [3, 6, 8, 11, 14, 16], "infinit": [3, 4, 5, 8, 13, 14, 16, 18, 19, 20], "global": [3, 4, 8, 12, 15, 18], "vari": [3, 4, 9, 10], "caution": 3, "what": [3, 4, 7, 8, 9, 10, 18], "correct": [3, 18], "quantis": [3, 20], "next": [3, 4, 5, 6, 8, 10, 12, 13, 14, 18], "peopl": 3, "framework": [3, 4, 8, 12, 18], "approxim": [3, 4, 6, 9, 10, 11, 13, 14, 15, 16, 19], "quit": [3, 13, 18], "cumbersom": [3, 13, 18], "seen": [3, 9, 10, 11, 12, 14, 18], "slightli": [3, 13], "easier": [3, 18], "slater": 3, "formula": [3, 6, 9, 18, 19], "leibniz": 3, "varphi_n": 3, "overlap": [3, 4, 11, 12, 18], "varphi_m": 3, "hartre": 3, "fock": [3, 18, 20], "atom": [3, 5, 9], "molecul": 3, "occur": [3, 18], "bose": [3, 19], "einstein": [3, 10], "condens": 3, "cold": 3, "minu": [3, 4, 18], "permen": 3, "unlik": [3, 4, 16], "hard": [3, 6, 10, 11, 18], "realli": [3, 4, 7, 8, 10, 15, 18], "explicitli": [3, 4, 6, 8, 10, 12, 13, 14, 18], "space": [4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 19, 20], "far": [4, 6, 9, 18], "mention": [4, 8, 11, 15], "answer": [4, 8, 14], "abstractli": 4, "rho": [4, 16], "mapsto": [4, 5, 7, 18], "endomorph": 4, "algebra": [4, 8, 10, 15, 20], "terminolog": [4, 7], "ast": [4, 5], "generalis": [4, 5], "encount": [4, 8], "written": [4, 7, 10, 13, 14, 20], "tr": [4, 6, 10, 12, 13, 14, 16], "dual": [4, 18], "nonneg": 4, "probabl": [4, 5, 6, 8, 13], "geq": [4, 5, 8], "projector": [4, 5, 12, 14, 16], "densiti": [4, 13, 15, 16, 19], "express": [4, 6, 7, 8, 9, 10, 12, 13, 16, 18], "self": [4, 5, 18], "trace": 4, "wa": [4, 7, 8, 10, 15, 18], "pure": [4, 16], "Being": 4, "admit": [4, 5, 10, 13, 18], "spectral": [4, 5, 10, 12, 13, 14], "decomposit": [4, 5, 8, 9, 11, 12, 13, 14, 15, 16, 18], "p_n": [4, 5], "phi_n": [4, 5], "aris": [4, 15], "world": 4, "complement": 4, "therein": 4, "deal": [4, 8, 11, 12, 13, 18], "classic": [4, 8, 13, 18, 19, 20], "uncertaint": 4, "statist": [4, 18, 19, 20], "ensembl": [4, 5], "p_1": 4, "p_2": 4, "psi_i": [4, 5, 11], "nonetheless": 4, "aani": 4, "convex": 4, "von": 4, "neumann": 4, "entropi": [4, 9, 14, 19], "log": [4, 6, 9, 12, 14], "evalu": [4, 10, 11, 12, 13, 14, 15], "lim_": [4, 6, 11, 13, 16], "maxim": [4, 9, 12, 14], "sim": [4, 6, 9, 14, 16], "scale": [4, 5, 9, 10, 11, 12, 14, 20], "quantiti": [4, 8, 13, 14], "volum": [4, 19], "conclud": [4, 8, 11], "proport": [4, 8, 18], "bipartit": [4, 9, 12, 14], "non": [4, 6, 8, 9, 11, 12, 13, 16], "trivial": [4, 7, 8, 12, 13, 16, 18], "environ": [4, 11, 13, 16], "seem": [4, 6, 7, 8, 14, 18], "overkil": 4, "whole": [4, 16], "univers": [4, 9], "reduc": [4, 5, 8, 9, 10, 12, 13, 15, 18], "simplifi": [4, 10, 11, 16], "assum": [4, 5, 8, 9, 11, 12, 15, 18], "psi_k": 4, "varphi_l": 4, "write": [4, 6, 8, 12, 13, 14, 16, 18], "partial": [4, 9, 10, 16], "doubl": 4, "perform": [4, 5, 10, 12, 14, 16, 18], "directli": [4, 6, 9, 11, 13, 15], "expos": 4, "opeat": 4, "necessari": [4, 5, 7, 10, 18], "quantifi": [4, 9, 18], "doesn": 4, "t": [4, 5, 6, 7, 8, 11, 13, 15, 16, 18, 19], "matter": [4, 7, 8, 10], "random": [4, 6, 11, 15, 16], "harder": [4, 12], "differenti": [4, 5], "analyz": 4, "bit": [4, 13, 14, 15, 18], "entri": [4, 8, 13, 18], "multipli": [4, 7, 8, 16], "conjug": [4, 18], "d_1": [4, 10, 13], "d_2": [4, 10, 13], "squar": [4, 5, 8, 9, 10, 13, 14], "ba": [4, 10], "nonzero": [4, 5, 18], "count": [4, 6], "degeneraci": [4, 8, 18], "decompos": [4, 8, 9, 10, 14, 18], "u": [4, 5, 8, 10, 12, 15, 16, 19], "v": [4, 7, 10, 12, 18, 19], "size": [4, 9, 10, 12, 13, 14, 15, 16, 18, 19], "descend": 4, "singular": [4, 8, 9, 11, 12, 14, 15, 16], "further": [4, 13, 16], "s_i": [4, 6, 9, 13, 14], "s_": [4, 6], "min": 4, "a_i": [4, 8, 15, 18], "b_i": 4, "schmidt": [4, 9, 12, 14], "appear": [4, 8, 15, 18], "immidi": 4, "p_i": 4, "spectrum": [4, 14], "foot": 4, "probe": [4, 8], "unentangl": 4, "factoris": 4, "bound": [4, 5, 9, 12, 14], "logarithm": 4, "smallest": [4, 11, 15], "randomli": 4, "close": [4, 7, 8, 11, 15, 16, 18], "hand": [4, 6, 15, 18, 19, 20], "firstli": [4, 5], "contact": 4, "heat": 4, "bath": 4, "equilibr": 4, "equilibrium": 4, "gibb": 4, "partit": [4, 6, 10], "k_b": 4, "boltzmann": [4, 6, 13], "constant": [4, 9, 14, 16], "invers": [4, 8, 10, 16, 18], "thermodynam": [4, 6, 15], "notion": [4, 7, 8, 10, 18], "thermal": [4, 6, 16], "energi": [4, 5, 6, 8, 9, 11, 13, 14, 15, 16, 18], "minimis": 4, "At": [4, 15, 16], "reach": [4, 11, 15, 16], "_0": 4, "eigenspac": [4, 5], "lowest": [4, 11, 16], "d_0": 4, "ground": [4, 6, 8, 9, 12, 14, 15, 16, 18], "least": [4, 8, 10], "small": [4, 6, 8, 11, 13, 15, 16, 18], "indepen": 4, "constitut": [4, 8], "violat": [4, 18], "infam": 4, "third": [4, 8, 16], "law": [4, 5, 8, 13, 14], "copi": [4, 5, 8, 10], "purif": 4, "_e": 4, "advantag": [4, 10, 15], "effici": [4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19], "mere": 4, "psi_0": [4, 6, 11, 16], "_s": 4, "organis": 4, "match": [4, 18], "taken": [4, 6, 8, 11, 13, 14, 15], "exp": [4, 5, 6, 8, 13, 16, 18], "similar": [4, 6, 10, 11, 12, 14, 18], "evolv": [4, 5, 6, 10, 16], "replac": [4, 11, 13], "method": [4, 6, 10, 12, 13, 14, 16, 18, 19], "solv": [4, 6, 10, 11, 13, 15, 16, 18], "schr\u00f6dinger": 4, "equat": [4, 5, 10, 13, 15, 16, 18], "suffici": [4, 6, 11, 14, 16, 18], "imaginari": [4, 6], "coordin": [4, 5], "thermofield": 4, "high": 4, "literatur": [4, 8], "holographi": 4, "graviti": 4, "effect": [4, 5, 11, 12, 13, 15, 16, 18], "pronounc": 4, "regim": [4, 6], "mostli": [4, 7, 8, 10, 12], "variat": [4, 9, 12, 14, 15, 16, 19], "principl": [4, 6, 8, 9, 16, 18, 19], "trial": 4, "qualiti": [4, 9, 11], "varianc": 4, "patch": 4, "low": [4, 8, 9, 10, 14], "special": [4, 8, 13], "region": [4, 9], "arbitrarili": [4, 10], "smaller": [4, 11, 12], "less": [4, 7, 10, 18], "common": [4, 5, 6, 7, 10, 13, 14, 18], "area": [4, 10, 13, 14], "behavior": [4, 18], "kei": [4, 8, 9, 13, 14], "motiv": [4, 8], "short": [4, 8], "across": [4, 9, 12, 14], "boundari": [4, 6, 8, 9, 11, 12, 13, 14, 15, 16], "exclud": 4, "long": [4, 6, 10, 11, 13, 18], "asid": [4, 9], "excit": [4, 8, 9], "understand": [4, 7, 10, 11, 13, 18], "react": 4, "perturb": 4, "macroscop": 4, "discret": [4, 5, 6, 8], "level": [4, 5, 13, 14, 16], "gap": [4, 6, 15], "bump": 4, "anergi": 4, "cost": [4, 11, 12], "kinet": 4, "deloc": 4, "surplu": 4, "epsilon": [4, 6, 15], "everywher": 4, "lower": [4, 12, 19], "delta": [4, 6, 8, 11, 13, 16, 18], "gapless": 4, "transit": [4, 8, 13, 14, 19], "natur": [4, 6, 7, 9, 10, 12, 13, 14, 16, 18], "radic": 4, "per": [4, 13, 18], "conveni": [4, 10, 13, 18], "shift": 4, "diagram": [4, 9, 10, 12, 13, 14, 18], "dispers": 4, "apear": 4, "band": 4, "higher": [4, 5, 8, 10, 11, 13, 18, 19], "travel": 4, "indivu": 4, "rel": [4, 16, 18], "continu": [4, 6, 8, 10, 11, 18], "depenc": 4, "suddenli": 4, "sudden": 4, "setup": 4, "longer": [4, 13, 18], "preserv": [4, 7, 10], "evolut": [4, 5, 6, 10, 14, 19, 20], "anoth": [4, 5, 7, 8, 11, 14, 16, 19], "grow": [4, 8, 11, 13, 16], "rapidli": 4, "tend": 4, "perspect": [4, 5], "initi": [4, 5, 6, 9, 11, 12, 14, 15, 16, 18], "until": [4, 11, 15, 16], "satur": [4, 14], "propert": 4, "thermalis": 4, "indistinguish": 4, "albeit": [4, 13], "highli": 4, "except": 4, "magnetis": [4, 8, 13], "longitudin": [4, 6], "z_n": 4, "divid": 4, "come": [4, 8, 10, 11, 14, 17, 18], "potenti": 4, "break": [4, 15], "acquir": 4, "bigotimes_": [4, 9], "x_n": 4, "proportion": [4, 6, 18], "plu": 4, "uniqu": [4, 6, 7, 8, 10, 12, 18], "reason": [4, 6, 8, 9, 10, 12, 16, 18], "beyond": [4, 8, 13, 15, 18], "explain": [4, 15, 16], "presenc": 4, "neighbourhood": 4, "cell": [4, 12, 13, 16], "subtract": 4, "redefin": 4, "proven": [4, 15], "asymptot": [4, 19], "decai": [4, 12, 14], "distanc": [4, 5], "xi": [4, 12], "power": [4, 11, 12, 13, 14, 16], "expon": [4, 6], "spatial": [4, 6, 8, 11, 13, 14, 19], "etc": 4, "rich": [4, 8], "analys": 4, "conform": 4, "extrem": [4, 7, 8], "diagnost": 4, "vanish": [4, 5, 8, 16], "particularli": [4, 6, 8, 10, 11, 12, 18], "insensit": 4, "whenev": 4, "c_": [4, 9, 14, 18], "strictli": [4, 13, 18], "speak": [4, 8], "qualit": 4, "row": [4, 7, 13], "column": [4, 5, 7, 10, 12, 13], "multidimension": 4, "fourier": [4, 5, 18], "argu": [4, 8], "techniqu": [4, 6, 11, 12, 13, 15, 16], "maxima": 4, "momenta": 4, "minima": 4, "critic": [4, 6, 8, 12, 14, 15], "diverg": [4, 13], "dirac": [4, 5, 16], "unless": [4, 6], "repeat": [4, 5, 8, 10, 12, 15, 16], "pattern": [4, 8], "broken": [4, 8], "detail": [4, 6, 10, 12, 13, 14, 15, 18], "quantit": 4, "e_0": [4, 6, 11, 16], "heisenberg": [4, 8, 13], "pictur": [4, 14], "onc": [4, 10, 14, 18], "frequenc": 4, "e_n": 4, "consequ": [4, 8, 16, 18], "By": [4, 5, 8, 9, 12, 15, 16, 18], "hydrogen": 5, "plai": [5, 10, 12], "role": [5, 10, 12, 18], "histor": 5, "becam": [5, 10], "challeng": 5, "briefli": [5, 11, 16], "reiter": [5, 7], "wonderful": 5, "lectur": [5, 7, 10, 11, 13, 15, 19, 20], "john": [5, 19], "preskil": 5, "complex": [5, 7, 9, 12, 13, 18], "metric": 5, "unpack": 5, "scalar": [5, 7, 10, 18], "skew": 5, "last": [5, 6, 13, 15, 18], "lvert": 5, "rvert": 5, "leftrightarrow": [5, 8], "triangl": [5, 16], "inequ": 5, "guarante": [5, 6, 12], "sequenc": [5, 10, 11, 13, 19], "seri": [5, 16, 20], "choos": [5, 11, 12, 14, 15, 16], "best": [5, 10, 15, 18], "integr": [5, 6, 16, 19], "function": [5, 6, 7, 10, 11, 18, 19], "int_": 5, "euclidean": [5, 6], "varphi_i": 5, "variou": [5, 10, 14], "realis": [5, 13], "forget": 5, "localis": 5, "strongli": [5, 7], "hypercub": [5, 6], "straightforward": [5, 6, 18], "countabl": 5, "Of": [5, 10], "goal": [5, 7, 8, 13], "return": [5, 6, 13, 14, 18], "devot": 5, "eigenvector": [5, 8, 10, 11, 12, 13, 15], "distinct": [5, 7, 8, 10, 18], "lambda_n": 5, "_n": [5, 8], "denomin": [5, 15], "rephras": 5, "prescrib": 5, "compact": 5, "averag": 5, "exploit": [5, 8, 11, 14, 16], "moment": 5, "distribut": [5, 6, 7, 13], "outcom": [5, 18], "familiar": [5, 8, 10, 18], "part": [5, 6, 8, 11, 12, 13, 15, 18], "intermedi": 5, "probabilist": 5, "after": [5, 8, 9, 10, 11, 16, 18], "wave": [5, 19], "longrightarrow": 5, "otherwis": 5, "been": [5, 8, 10, 11, 14, 16, 18, 20], "dure": 5, "interv": [5, 6, 11], "unitarili": [5, 8], "accord": [5, 6, 8, 9, 14, 15, 16, 18], "schr": 5, "dinger": 5, "mai": [5, 6, 12, 13, 14, 18], "clearli": [5, 8, 9, 12, 16, 18], "down": [5, 10, 12, 13, 15, 16, 18], "caveat": 6, "encod": [6, 9, 12, 13, 14, 15, 18], "tau": [6, 11, 16, 18], "eigenbasi": [6, 16], "condit": [6, 8, 11, 12, 13, 14, 15, 16, 18], "gg": [6, 8], "e_1": [6, 16], "basic": [6, 7, 10, 12, 16, 18], "ingredi": 6, "numer": [6, 10, 12, 13, 16, 18, 19, 20], "algorithm": [6, 8, 9, 10, 12, 13, 14, 19], "compar": [6, 15, 18], "ship": 6, "infinitesim": 6, "step": [6, 8, 11, 15, 16, 18], "baker": 6, "campbel": 6, "hausdorff": 6, "better": 6, "zassenhau": 6, "prod_i": [6, 18], "mathcal": [6, 9, 11, 13, 14, 15, 16], "chose": [6, 15], "error": [6, 11], "split": [6, 9, 11, 13, 16, 18], "segment": [6, 16], "deriv": [6, 11, 14, 15], "path": 6, "insert": [6, 12, 18], "resolut": 6, "h_x": [6, 8, 15], "h_z": [6, 15], "remaind": 6, "s_k": 6, "s_m": 6, "approx": [6, 9, 11, 16], "cosh": 6, "sinh": 6, "f_0": 6, "tanh": 6, "period": [6, 8, 11, 13, 14], "transfer": [6, 12, 14], "don": [6, 8, 15, 18], "strategi": [6, 11], "axi": [6, 8], "emerg": [6, 10], "k_": 6, "perp": 6, "ignor": [6, 11, 18], "irrelev": [6, 16], "parallel": [6, 11], "anisotrop": 6, "strength": 6, "phenomena": [6, 8, 12], "temperatur": [6, 19], "never": [6, 16, 18], "extra": 6, "caus": 6, "analyt": [6, 8, 15], "invert": [6, 8, 14, 18], "codimens": 6, "slice": 6, "target": [6, 9, 12], "fit": 6, "scheme": [6, 16], "relativist": 6, "catch": 6, "overlook": 6, "weight": [6, 13], "major": [6, 7, 10], "behind": [6, 18], "mont": 6, "carlo": 6, "success": [6, 15], "flavour": 6, "sampl": 6, "lost": 6, "procedur": [6, 9, 11, 12, 14, 18], "design": [6, 15, 20], "secondli": 6, "anisotropi": 6, "lorentz": 6, "15": [6, 10, 15], "year": 6, "idea": [6, 7, 8, 10, 11, 14, 16], "toolbox": 6, "character": [6, 9, 12, 15, 18], "cover": [7, 18], "serv": [7, 10], "foundat": [7, 10], "intuit": [7, 8, 10, 12, 13, 18], "insist": 7, "too": 7, "rigour": 7, "resort": [7, 11, 13], "usual": [7, 15], "showcas": [7, 10, 13, 18, 20], "featur": [7, 8, 9, 10, 14], "julia": [7, 10, 12, 18], "packag": [7, 12, 13, 18], "suit": [7, 8, 9], "demonstr": [7, 15, 18], "instruct": [7, 13], "noth": [7, 10, 12, 18], "viewpoint": 7, "arrai": [7, 10, 18], "nevertheless": [7, 8, 10, 15], "object": [7, 8, 12, 14, 15, 18], "compon": [7, 8, 9, 10], "vec": [7, 8, 10, 18], "v_1": 7, "v_2": 7, "remind": 7, "sure": 7, "w": [7, 10, 13], "word": [7, 8, 9, 10, 11, 13, 16, 18], "colon": 7, "v_i": 7, "w_i": 7, "rcl": 7, "sum_j": 7, "a_": [7, 10, 14, 15, 18], "ij": [7, 10, 11, 18], "v_j": 7, "abstract": 7, "concret": [7, 8, 10, 18], "input": 7, "domain": [7, 8, 10, 18], "codomain": [7, 8, 10, 18], "syntax": 7, "\u2102": [7, 10, 12, 13, 15, 18], "bbc": 7, "tab": 7, "complexspac": [7, 12, 13, 18], "3": [7, 8, 10, 12, 13, 15, 16, 19], "tensormap": [7, 8, 10, 12, 13, 18], "rand": [7, 10], "float64": [7, 8, 10], "leftarrow": [7, 12, 15], "tast": 7, "convent": [7, 10, 13], "read": [7, 8, 18], "usag": 7, "support": [7, 18], "unicod": 7, "default": [7, 15], "logic": 7, "origin": [7, 9, 12, 14, 18], "lambda": [7, 8, 9, 10, 14, 15, 18], "\u03bb": [7, 15], "equip": 7, "canon": [7, 12, 14, 15], "w_j": 7, "t_": 7, "i_1i_2": 7, "v_": [7, 15], "w_": 7, "shorthand": [7, 18], "extract": 7, "stridedview": 7, "typeof": 7, "526571": 7, "413696": 7, "719603": 7, "487646": 7, "238492": 7, "286419": 7, "tent": 7, "induc": 7, "reshap": [7, 10], "th": [7, 12], "laid": [7, 14], "slight": 7, "misus": 7, "cartesian": 7, "trick": [7, 11, 16], "reinterpret": [7, 10], "linearindic": 7, "tupl": 7, "unitrang": [7, 10], "int64": [7, 10], "5": [7, 10, 12, 13, 15, 16], "6": [7, 8, 9, 10, 13, 15, 16, 18], "collect": [7, 18], "cartesianindic": 7, "print": 7, "cartesianindex": 7, "mind": [7, 16], "8": [7, 10, 13, 15, 18, 19], "compris": 7, "establish": [7, 10], "w_1": 7, "w_2": 7, "w_m": 7, "v_n": 7, "i_m": 7, "v1": [7, 18], "v2": [7, 18], "w1": 7, "w2": 7, "attent": 7, "reader": [7, 8, 18], "resembl": [7, 16], "identifi": [7, 8, 18], "identif": [7, 19], "isomorph": [7, 10], "entir": [7, 9, 11, 12, 18], "constitu": [7, 10, 11], "facet": 7, "gentl": 8, "introduct": [8, 9, 10, 18], "illustr": [8, 10, 11, 15, 18, 20], "gradual": 8, "finish": 8, "goe": [8, 13], "sai": 8, "scratch": 8, "surfac": [8, 10], "vast": 8, "immens": 8, "recal": [8, 9, 12, 18], "Its": 8, "z_": 8, "besid": [8, 16], "obviou": [8, 18], "flip": [8, 10, 18], "pauli": [8, 15, 18], "align": [8, 18], "implement": [8, 10, 11, 12, 13, 15, 16, 18], "correctli": 8, "bigotimes_i": 8, "notic": [8, 15], "twice": 8, "leav": [8, 10, 12, 14, 16, 18], "untouch": 8, "hp": 8, "though": [8, 15], "regardless": 8, "phenomenon": 8, "spontan": 8, "ssb": 8, "investig": 8, "effectli": 8, "paramagnet": 8, "disord": [8, 19], "minim": [8, 10, 11, 15, 16], "ferromagnet": 8, "obvious": [8, 15], "contrari": [8, 15], "get": [8, 13, 16, 18, 20], "smoothli": 8, "slowli": 8, "therefor": [8, 9, 11, 12, 18], "belong": [8, 14], "abruptli": 8, "inspir": 8, "credo": 8, "wit": 8, "op": 8, "latter": [8, 9, 10], "ill": [8, 11], "remedi": 8, "synopsi": 8, "hallmark": 8, "paradigm": 8, "classifi": 8, "put": [8, 9, 11, 14, 16, 18], "forward": [8, 16], "landau": [8, 19], "1937": [8, 19], "bear": 8, "hi": 8, "theorem": [8, 13, 14], "lagrangian": 8, "current": [8, 15, 18], "dt": [8, 16], "exercis": [8, 10, 11, 18], "hamiltonain": 8, "o_i": [8, 13, 14], "o_it": 8, "pi": [8, 18, 19], "ip": 8, "virtu": [8, 13, 14], "understood": [8, 18], "translation": [8, 14], "implic": [8, 18], "xxz": [8, 19], "whose": [8, 18], "x_": [8, 13], "y_i": [8, 10], "y_": 8, "2s": 8, "mathfrak": [8, 15], "su": [8, 15], "b_j": 8, "sum_c": 8, "varepsilon_": 8, "abc": 8, "c_i": [8, 12, 16, 18], "xxx": [8, 15], "y": [8, 10, 16, 18, 19], "half": [8, 12], "simeq": 8, "retain": [8, 11, 16], "theta": [8, 18], "around": [8, 10, 16, 18], "angl": 8, "m_z": 8, "gentli": [8, 18], "backbon": 8, "roughli": 8, "carri": [8, 10, 14, 18], "theta_2": 8, "theta_1": 8, "g_1": 8, "g_2": 8, "endow": 8, "1g": 8, "g1": 8, "abelian": 8, "hk": 8, "gh": 8, "undon": 8, "opposit": 8, "subgroup": 8, "suggest": [8, 15, 18], "subset": 8, "li": 8, "heart": 8, "explan": [8, 15], "undergo": 8, "modulo": [8, 18], "unimodular": 8, "det": 8, "uu": 8, "none": 8, "3d": [8, 13], "mm": 8, "tm": 8, "absenc": 8, "underli": [8, 10, 18], "rais": 8, "plethora": 8, "kind": [8, 10, 11, 13], "ones": [8, 11, 18], "sake": 8, "x_g": 8, "x_gx_h": 8, "x_0": 8, "x_1": 8, "x_1x_1": 8, "bar": [8, 12], "x_h": 8, "overlin": [8, 18], "y_g": 8, "oplu": [8, 18], "ux_gu": 8, "pmatrix": [8, 13], "show": [8, 11, 12, 13, 14, 16, 18], "crux": 8, "appropri": [8, 11, 14, 16, 18], "brought": [8, 11], "block": 8, "fbox": 8, "1_g": 8, "2_g": 8, "vdot": 8, "ddot": 8, "amongst": 8, "irrep": 8, "d_": 8, "fusion": 8, "clebsch": [8, 18], "gordan": [8, 18], "schur": [8, 18], "lemma": [8, 18], "x_gy": 8, "yx_g": 8, "pose": 8, "tabul": 8, "strong": 8, "didn": 8, "bring": [8, 11, 12, 14, 15, 18], "bigoplus_c": 8, "b_c": 8, "_c": [8, 16], "store": [8, 9, 10, 12, 18], "paragraph": 8, "herebi": 8, "drastic": 8, "memori": [8, 10], "manipul": [8, 9], "maximum": [8, 14, 18], "rank": [8, 9, 10, 14, 19], "su\u2082spac": 8, "rep": [8, 18], "su\u2082": [8, 18], "ss": [8, 13, 18], "data": [8, 10, 18], "fusiontre": [8, 18], "fals": [8, 16, 18], "inspect": [8, 18], "assert": [8, 12, 18], "dim": [8, 18], "sortedvectordict": 8, "su2irrep": [8, 18], "fill": [8, 18], "compat": 8, "fuse": [8, 16, 18], "3342e": 8, "313": 8, "15379e": 8, "39519e": 8, "92768e": 8, "310": 8, "four": [8, 9, 10, 18], "ubiquit": 8, "redund": 8, "brief": [8, 10, 15], "overview": [8, 12], "neglect": 8, "reflect": [8, 10], "anymor": 8, "classif": 8, "notori": 8, "beauti": [8, 15], "tremend": 8, "speedup": 8, "stabil": [8, 11], "uniform": [8, 12, 15, 17, 19], "indefinit": 8, "discoveri": 8, "topolog": [8, 18, 19], "anyon": [8, 19], "fascin": [8, 10], "explor": [8, 10], "categor": [8, 18], "scope": [8, 15, 18], "intric": 8, "categori": [8, 18], "feiguin": [8, 19], "et": [8, 10, 11, 12, 13, 15, 16], "al": [8, 10, 11, 12, 13, 15, 16], "2007": [8, 19], "storag": 8, "qualifi": 9, "broadli": 9, "comment": [9, 11, 15, 18], "simul": [9, 10, 16, 19], "h_i": [9, 15], "locat": [9, 12], "100": 9, "10": [9, 10, 15, 16, 18, 19], "30": [9, 10, 15], "altern": [9, 12, 14], "parametr": [9, 12, 16], "s_3": 9, "s_4": 9, "recov": 9, "consecut": [9, 14], "svd": [9, 10, 11, 14, 18], "rewrit": [9, 18], "horizont": [9, 14], "edg": [9, 13, 14], "virtual": [9, 12, 13, 14, 16], "bond": [9, 11, 12, 13, 14, 15, 16], "rest": [9, 11, 12], "done": [9, 10, 14, 16, 18], "signific": 9, "truncat": [9, 10, 11], "largest": [9, 10, 11, 12, 13], "control": [9, 14], "repeatedli": [9, 12, 15], "geometri": 9, "contract": [9, 12, 13, 14, 16, 18, 19], "leg": [9, 10, 12, 13, 16], "downward": 9, "polynomi": 9, "gain": [9, 11, 13], "reduct": 9, "shade": 9, "eq": [9, 11, 18], "back": [9, 10, 15, 18], "shchmidt": 9, "cut": [9, 10, 14], "convinc": 9, "yourself": 9, "arriv": [9, 12], "perimet": 9, "obei": [9, 14, 15, 18], "temparatur": 9, "inher": [9, 12, 18], "tini": 9, "corner": 9, "famili": [9, 11], "optim": [9, 10, 11, 12, 15, 16, 19], "ly": 9, "depict": [9, 10], "highlight": [9, 10], "futur": 9, "modern": 10, "bridgeman": [10, 15, 19, 20], "chubb": [10, 15, 19], "2017": [10, 13, 15, 19], "re": 10, "export": [10, 12, 18], "macro": [10, 12, 18], "load": 10, "test": [10, 18], "journei": 10, "profound": [10, 18], "theoret": [10, 19], "varieti": [10, 11, 12], "machin": 10, "earli": 10, "root": [10, 13], "19th": 10, "centuri": 10, "pioneer": 10, "mathematician": 10, "arthur": 10, "caylei": 10, "jame": 10, "sylvest": 10, "multi": [10, 12, 20], "began": 10, "late": 10, "20th": 10, "dmrg": 10, "birth": 10, "attribut": 10, "mp": [10, 11, 12, 13, 15, 17], "1960": 10, "earliest": 10, "wide": 10, "steven": 10, "white": 10, "1992": 10, "1980": 10, "1990": 10, "driven": 10, "central": [10, 11, 12], "progress": 10, "tn": 10, "pep": [10, 13, 14], "renorm": [10, 13, 15], "ansatz": [10, 12, 15], "mera": 10, "2000": 10, "disciplin": 10, "promin": 10, "unsuprisingli": 10, "circuit": 10, "ongo": 10, "vibrant": 10, "greatli": 10, "involv": [10, 11, 13, 14, 16, 18], "node": 10, "graph": 10, "stick": [10, 15], "recoverd": 10, "r_": [10, 15], "i_3": 10, "i_4": 10, "freeli": [10, 12, 18], "shape": [10, 18], "ow": 10, "d_3": [10, 13], "d_i": [10, 14, 16], "immateri": 10, "adress": 10, "implicit": 10, "eltyp": 10, "7": [10, 13, 15, 16, 19], "9": [10, 15, 19], "11": [10, 15, 18, 19], "13": [10, 15], "14": [10, 11, 15, 18], "16": [10, 15, 19], "three": [10, 12, 13, 18], "join": 10, "signifi": 10, "cyclic": 10, "slide": 10, "loop": [10, 11], "placement": 10, "drawn": 10, "x_j": [10, 13], "b_": [10, 16], "ii": 10, "wise": 10, "implicitli": [10, 12, 18], "alloc": 10, "quickli": [10, 11], "unwieldi": 10, "wish": [10, 12, 14], "pairwis": 10, "spirit": 10, "minor": 10, "modif": 10, "ncon": 10, "neg": 10, "f": [10, 18, 19], "66961": 10, "70201": 10, "73193": 10, "83059": 10, "wildli": 10, "2n": [10, 11], "float": 10, "flop": 10, "substanti": [10, 11], "boil": [10, 13, 15, 16], "heurist": 10, "bubbl": 10, "ineffici": 10, "infeas": 10, "ladder": 10, "np": 10, "40": 10, "pfeifer": [10, 19], "2014": [10, 19], "opt": 10, "keyword": 10, "compil": 10, "\u03b1": 10, "\u03b2": [10, 13], "\u03b3": 10, "\u03f5": [10, 15], "\u03b6": 10, "\u03b7": 10, "\u03b4": [10, 13], "instrument": 10, "everyth": [10, 12], "s1": 10, "s2": 10, "eigen": 10, "ax": 10, "av": 10, "diagrammat": [10, 15], "randn": [10, 12], "complexf64": [10, 12, 13, 15, 18], "eigendecomposit": 10, "eig": 10, "32m": [10, 18], "1mtest": [10, 18], "pass": [10, 18], "22m": [10, 15, 18], "39m": [10, 15, 18], "rectangular": 10, "isometr": [10, 15], "eckart": [10, 19], "young": [10, 19], "1936": [10, 19], "tensori": 10, "tsvd": 10, "id": [10, 12], "semi": [10, 16], "q": [10, 13, 18], "leftorth": 10, "alg": [10, 16], "triangular": 10, "solut": [10, 11, 13, 15, 16], "overdetermin": 10, "variant": 10, "qrpo": 10, "transpos": 10, "rq": 10, "ql": 10, "lq": 10, "reveal": 10, "trade": 10, "off": [10, 18], "expens": [10, 11], "leftnul": 10, "atol": [10, 18], "1e": [10, 18], "commonli": [10, 12, 13], "focu": [11, 16], "advanc": 11, "desir": [11, 16, 18], "later": [11, 14, 18], "naiv": [11, 18], "prohibit": 11, "exhibit": 11, "h_": [11, 15, 18], "although": [11, 18], "unfeas": 11, "ih_": 11, "suzuki": [11, 19], "trotter": 11, "h_e": 11, "h_o": 11, "hatano": [11, 19], "aforement": [11, 18], "sum_n": 11, "layer": [11, 13], "face": 11, "difficulti": [11, 18], "damp": 11, "e_i": [11, 16], "regard": [11, 13, 14], "tackl": 11, "converg": [11, 12, 15, 16], "tip": 11, "iceberg": 11, "updat": [11, 12, 15, 16], "tebd_trunc": 11, "account": [11, 18], "surround": 11, "captur": [11, 12, 13, 14, 18], "jiang": [11, 19], "2008": [11, 19], "accur": [11, 12, 16, 19], "accuraci": 11, "excel": [12, 15], "review": [12, 19], "vanderstraeten": [12, 15, 16, 19], "2019": [12, 15, 16, 19], "thorough": 12, "tangent": [12, 16, 19], "supplement": 12, "routin": [12, 15], "impos": [12, 13, 14, 18], "transat": 12, "diagramat": 12, "magnitud": 12, "lambda_0": 12, "lambda_i": 12, "mangitud": 12, "properli": 12, "ensur": [12, 16, 18], "rescal": 12, "bulk": 12, "middl": [12, 18], "o_n": 12, "dictat": [12, 18], "beta_m": 12, "alpha_n": 12, "abritrari": 12, "disconnect": 12, "lambda_1": 12, "lambda_": [12, 13], "max": [12, 13, 15], "sublead": 12, "focuss": [12, 18], "exit": 12, "crucial": 12, "ram": [12, 19], "2018": [12, 13, 19], "despit": 12, "convers": [12, 18], "a_l": [12, 14, 15, 16, 18], "iter": [12, 15, 16, 18], "qr": [12, 14, 16], "docomposit": 12, "guess": [12, 15], "room": 12, "a_r": [12, 15, 16, 18], "mix": [12, 15, 16], "center": [12, 14, 15], "a_c": [12, 15, 16], "contrast": [12, 18], "lr": 12, "therebi": 12, "usv": 12, "residu": 12, "rm": [12, 14], "straightforwardli": 12, "i_l": 12, "i_r": 12, "isometri": [12, 14, 15, 16], "correspondingli": 12, "aspect": 12, "cr": 12, "linearalgebra": [12, 18], "ac": 12, "9999999999999999": 12, "verifi": [12, 13, 18], "al_id": 12, "conj": [12, 18], "ar_id": 12, "lh": 12, "rh": [12, 16], "expectation_valu": [12, 15, 16], "12559307141051923": 12, "10955622901083523im": 12, "correlation_length": 12, "40097713703530957": 12, "configur": [13, 18], "s_j": 13, "nearest": [13, 18], "neighbor": [13, 14, 18], "black": 13, "vertic": [13, 18], "convert": [13, 18], "vertex": [13, 18], "bottom": 13, "asymmetr": 13, "achiev": [13, 18], "321388457312336": 13, "0im": [13, 18], "49999999999999895": 13, "06766764161830616": 13, "49999999999999906": 13, "06766764161830614": 13, "499999999999999": 13, "led": 13, "famou": 13, "exact": [13, 15], "onsag": [13, 19], "1944": [13, 19], "solvabl": 13, "manner": [13, 15], "allevi": 13, "extrapol": [13, 19], "insight": 13, "infin": 13, "domin": [13, 14], "zauner": [13, 19], "stauber": [13, 19], "reli": [13, 15], "weigh": 13, "microst": 13, "sigma_z": 13, "3210757428908035": 13, "4953999296304103": 13, "0097568878600302e": 13, "17": [13, 15, 16], "4953999296304104": 13, "8901691517473414e": 13, "18": [13, 15, 18, 19], "49539992963041035": 13, "993515140140208e": 13, "top": [13, 18], "sandwich": 13, "g_l": 13, "g_r": 13, "sequent": 13, "0d": 13, "abil": 13, "hz": 13, "jx": 13, "v_l": [13, 15], "v_r": 13, "cb": 13, "cab": 13, "carefulli": [13, 14], "reconstruct": 13, "ws": 13, "v\u2097": 13, "v\u1d63": 13, "prod": 13, "d_4": 13, "c_1": [13, 18], "b_3": 13, "c_2": [13, 18], "b_4": 13, "c_3": 13, "a_3": 13, "mpss": 13, "care": [13, 18], "among": 13, "unclear": 13, "accredit": 13, "evenli": 13, "overcount": 13, "prove": [13, 14], "programat": 13, "ws_reg_right": 13, "ref": [13, 16], "ws_reg_left": 13, "hubig": [13, 19], "worth": 13, "snake": 13, "lunch": 13, "manual": [13, 18], "offer": [13, 15, 16], "j\u2081": 13, "s_exchang": 13, "predefin": 13, "infinitechain": [13, 18], "h\u2081": 13, "nearest_neighbour": [13, 18], "mpohamiltonian": [13, 18], "trivialtensormap": [13, 18], "sparsemposlic": [13, 18], "42426406871192834": 13, "42426406871192845": 13, "7071067811865476": [13, 18], "7071067811865475": [13, 18], "infinitecylind": 13, "h\u2082": 13, "j\u2082": 13, "h\u2083": 13, "next_nearest_neighbour": 13, "2828427124746189": 13, "282842712474619": 13, "versatil": 13, "recogn": [14, 18], "anzatz": 14, "manifold": [14, 15, 16], "ancillari": 14, "kl": 14, "teleport": 14, "confirm": 14, "statement": [14, 18], "faithfulli": 14, "Not": 14, "unchang": [14, 18], "view": [14, 18], "tenor": 14, "dagger_": 14, "1_": 14, "polar": [14, 15], "succinctli": 14, "_o": 14, "q_j": 14, "o_j": 14, "adopt": 14, "cp": 14, "lie": 14, "disk": 14, "min_": 15, "simplic": 15, "consider": [15, 18], "mpo": 15, "formul": 15, "tri": 15, "sequenti": 15, "sweep": [15, 16], "seemingli": 15, "daunt": 15, "forth": 15, "reus": 15, "manifestli": [15, 18], "suffer": 15, "artefact": 15, "surprisingli": 15, "variation": 15, "mpskitmodel": [15, 16, 18], "transverse_field_is": [15, 16], "summon": 15, "\u03c8": [15, 16], "finitemp": [15, 16], "\u03c8\u2080": 15, "find_groundst": [15, 16], "36m": 15, "1m": 15, "1minfo": 15, "39mdmrg": 15, "0005326848329962604": 15, "20": 15, "01638790045522": 15, "69387690237017e": 15, "16im": 15, "\u03b4t": 15, "646787812": 15, "3447595970721666e": 15, "016387900460202": 15, "3832857257682006e": 15, "17im": 15, "082970472": 15, "2547213592364735e": 15, "016387900460266": 15, "933982876424318e": 15, "022579385": 15, "2051191981316597e": 15, "016387900460273": 15, "779908258550268e": 15, "024247745": 15, "468305529377547e": 15, "01638790046028": 15, "2329965386914683e": 15, "15im": 15, "015626563": 15, "6576613024032395e": 15, "9513234593767897e": 15, "018433804": 15, "154532192441363e": 15, "016387900460302": 15, "923899804039612e": 15, "013056537": 15, "2868822183759553e": 15, "016387900460288": 15, "195021525164557e": 15, "011804665": 15, "504255231816188e": 15, "980536216141623e": 15, "01104208": 15, "164944418490319e": 15, "016387900460277": 15, "711808572814786e": 15, "010065283": 15, "1787761332126287e": 15, "868584677716098e": 15, "009222207": 15, "392374800389212e": 15, "2190353089600007e": 15, "008492783": 15, "6394607745955364e": 15, "28239256777398e": 15, "007997797": 15, "110346266128261e": 15, "532956536656155e": 15, "007693257": 15, "summari": 15, "0e": 15, "144352462": 15, "unbound": 15, "f_l": 15, "f_r": 15, "intial": 15, "h_c": 15, "a_lc": 15, "ca_r": 15, "minimum": 15, "intertwin": 15, "toler": 15, "arnoldi": 15, "epsilon_l": 15, "epsilon_r": 15, "soltuion": 15, "u_lv_l": 15, "u_l": 15, "sigma_lv_l": 15, "u_rv_r": 15, "u_r": 15, "sigma_rv_r": 15, "s_c": 15, "s_lc": 15, "ca": 15, "s_r": 15, "sigma_": 15, "arithmet": 15, "u_": 15, "poor": 15, "robust": 15, "l_": 15, "l_c": 15, "r_c": 15, "l_cp": 15, "r_cu": 15, "estim": 15, "cdot1": 15, "heisenberg_xyz": 15, "infinitemp": [15, 16], "env": [15, 16], "39mvump": 15, "4719404564358398": 15, "09959695122131748": 15, "3040636633559757e": 15, "053156709": 15, "4506152025399737": 15, "5583932234087311": 15, "553135352688308e": 15, "010223283": 15, "3629368844908232": 15, "993574501246331": 15, "795711024065943e": 15, "024041981": 15, "13370307456046374": 15, "3549047523508608": 15, "284940422381764e": 15, "007571753": 15, "01582598186552914": 15, "4008384693488047": 15, "9982973682606948e": 15, "007492494": 15, "007459679693948124": 15, "4012988366021029": 15, "764860989061647e": 15, "008910909": 15, "00399154578462199": 15, "4013561841111188": 15, "1883569012788706e": 15, "008854833": 15, "0011455497777277282": 15, "4013783791455072": 15, "5190095310059743e": 15, "016109313": 15, "000401541135649868": 15, "4013803528079771": 15, "954377398999163e": 15, "006348695": 15, "00013514788004829803": 15, "4013806079316597": 15, "3677164203916684e": 15, "006413757": 15, "793582818793851e": 15, "4013806388259225": 15, "400567752639473e": 15, "006579898": 15, "6853849012249328e": 15, "4013806428928055": 15, "663267041884612e": 15, "006457859": 15, "14302972102875e": 15, "40138064343216": 15, "9411673633208964e": 15, "18im": 15, "011694586": 15, "2191341201556632e": 15, "401380643506309": 15, "71145561760739e": 15, "006486793": 15, "247539552814379e": 15, "4013806435165632": 15, "27746085727569e": 15, "006606467": 15, "0381270697001354e": 15, "4013806435180085": 15, "360988577709973e": 15, "006506651": 15, "1439909425967689e": 15, "4013806435182143": 15, "740638298943028e": 15, "006377809": 15, "274157397995229e": 15, "4013806435182454": 15, "230437511059935e": 15, "011077852": 15, "19": [15, 19], "6237952207617785e": 15, "4013806435182474": 15, "7286444964567578e": 15, "006469751": 15, "130775774164611e": 15, "401380643518249": 15, "388913559151589e": 15, "006485772": 15, "21": 15, "3439697211408005e": 15, "4013806435182496": 15, "076610585685075e": 15, "006400072": 15, "22": [15, 19], "921580512534823e": 15, "543113964500985e": 15, "007674595": 15, "23": 15, "427344780625515e": 15, "401380643518248": 15, "6912865276329293e": 15, "011840929": 15, "24": 15, "3129414037177357e": 15, "4013806435182494": 15, "264590234517779e": 15, "006903282": 15, "25": [15, 16, 19], "0630289785976875e": 15, "3308398136231881e": 15, "006563748": 15, "26": 15, "949807197019253e": 15, "248240045237138e": 15, "006484149": 15, "27": [15, 18], "542652840093537e": 15, "4013806435182508": 15, "973535265547894e": 15, "006532749": 15, "28": 15, "9171689579777305e": 15, "4013806435182499": 15, "080907190674386e": 15, "010962064": 15, "29": 15, "1310794158535638e": 15, "464103894193135e": 15, "005739366": 15, "3952525290723206e": 15, "8882969228324614e": 15, "005644267": 15, "166622834": 15, "periodicarrai": 15, "681340623886102e": 15, "quasi": 15, "401": 15, "484": 15, "038": 15, "971": 15, "haegeman": [15, 16, 19, 20], "2011": [15, 16, 19], "decim": 15, "delv": 16, "tebd": 16, "earlier": [16, 18], "schroding": 16, "t_0": 16, "modest": 16, "quench": 16, "1d": 16, "calabres": [16, 19], "cardi": [16, 19], "old": 16, "originali": 16, "frenkel": 16, "1930": 16, "a_n": 16, "geometr": 16, "favourit": 16, "instabl": 16, "2016": [16, 19], "eff": 16, "hamiltonia": 16, "thank": 16, "od": 16, "lubich": [16, 19], "2015": [16, 19], "seper": 16, "insid": 16, "idt": 16, "en": 16, "revers": 16, "criteria": 16, "costli": 16, "demand": 16, "thing": [16, 18], "newli": 16, "propto": 16, "dte": 16, "conserv": [16, 18], "perhap": 16, "trunctat": 16, "taylor": 16, "damm": [16, 19], "2023": [16, 19], "multiplc": 16, "\u03c4": [16, 18], "visualis": 16, "outlin": [16, 18], "groundstat": 16, "e_2": 16, "Then": [16, 18], "slowest": 16, "c_0": 16, "bigger": 16, "verstraet": [16, 19], "2004": [16, 19], "d_k": 16, "ancilla": 16, "a_k": 16, "thicker": 16, "mathbf": [16, 18], "2m": 16, "box": 16, "plot": 16, "h\u2080": 16, "gs": 16, "vump": 16, "verbos": 16, "sz_g": 16, "\u03c3\u1dbb": 16, "e_g": 16, "ht": 16, "ebefor": 16, "\u03c8t": 16, "szt_tdvp": 16, "et_tdvp": 16, "ht_mpo": 16, "taylorclust": 16, "szt_tmpo": 16, "et_tmpo": 16, "0289947257001728e": 16, "284094658693391e": 16, "21243089626455e": 16, "improv": 16, "35": 16, "\u03c8env": 16, "1im": [16, 18], "eafter": 16, "eventu": 16, "gone": 18, "aim": [18, 20], "adatpt": 18, "recip": 18, "narrat": 18, "walk": 18, "wignersymbol": 18, "sunrepresent": 18, "run": 18, "circl": 18, "warmup": 18, "aan": 18, "plain": 18, "wrapper": 18, "instanc": 18, "x_mat": 18, "z_mat": 18, "zz": 18, "mpoham": 18, "piec": 18, "produc": 18, "format": 18, "4142135623730945": 18, "414213562373095": 18, "identit": 18, "hadamard": 18, "member": 18, "charg": 18, "uncoupl": 18, "f_1": 18, "f_2": 18, "ntupl": 18, "isdual": 18, "bool": 18, "boolean": 18, "innerlin": 18, "grade": 18, "empti": 18, "previous": 18, "And": 18, "z2space": 18, "alia": 18, "vect": 18, "z2irrep": 18, "\u2124\u2082": 18, "command": 18, "eight": 18, "incom": 18, "outgo": 18, "flip_charg": 18, "els": 18, "mu": 18, "n_i": 18, "Their": 18, "a_j": 18, "u1spac": 18, "u1irrep": 18, "cutoff": 18, "u\u2081": 18, "access": 18, "4142135623730951": 18, "7320508075688772": 18, "449489742783178": 18, "23606797749979": 18, "8284271247461903": 18, "4641016151377544": 18, "1622776601683795": 18, "872983346207417": 18, "47213595499958": 18, "decreas": 18, "braid": 18, "style": 18, "essenc": 18, "someth": 18, "_bi": 18, "n_bi": 18, "ambigu": 18, "fulli": 18, "procuct": 18, "lot": 18, "toward": 18, "exchang": 18, "strang": 18, "side": 18, "spinless": 18, "hop": 18, "c_j": 18, "oppos": 18, "justifi": 18, "q_i": 18, "exhang": 18, "fermionpar": 18, "tricki": 18, "ideal": 18, "super": 18, "vacuuum": 18, "00": 18, "01": 18, "littl": 18, "unintuit": 18, "sight": 18, "did": 18, "impact": 18, "intern": 18, "ll": 18, "realiz": 18, "u_g": 18, "irreduc": 18, "bigoplus_l": 18, "multilinear": 18, "l_1": 18, "l_2": 18, "l_3": 18, "m_1": 18, "m_2": 18, "recoupl": 18, "m_3": 18, "l_4": 18, "m_4": 18, "red": 18, "su2spac": 18, "halfinteg": 18, "ta": 18, "707107": 18, "ascend": 18, "i1": 18, "i2": 18, "i3": 18, "m1": 18, "m2": 18, "m3": 18, "clebschgordan": 18, "sx": 18, "sy": 18, "sz": 18, "ss_arr": 18, "get_reduced_el": 18, "cg": 18, "reduced_matrix": 18, "proportian": 18, "isapprox": 18, "9999999999999993": 18, "renewcommand": 18, "thickspac": 18, "kern": 18, "01ex": 18, "smallmatrix": 18, "int": 18, "bypass": 18, "altogeth": 18, "physcial": 18, "casimir": 18, "l3": 18, "l4": 18, "immediatli": 18, "foreshadow": 18, "inequival": 18, "interfac": 18, "sunirrep": 18, "su3irrep": 18, "su\u2083": 18, "nsymbol": 18, "sum_k": 18, "gell": 18, "mann": 18, "dynkin": 18, "freudenth": 18, "3p": 18, "3q": 18, "pq": 18, "dynkin_label": 18, "tt": 18, "adoint": 18, "exclus": 18, "exot": 18, "fall": 18, "fibonacci": 18, "penalti": 18, "dedic": 18, "fibonaccianyon": 18, "favor": 18, "stress": 18, "meaning": 18, "boxtim": 18, "bc17": 19, "jacob": [19, 20], "christoph": 19, "danc": 19, "introductori": 19, "journal": 19, "50": 19, "223001": 19, "arxiv": 19, "1603": 19, "03039": 19, "doi": 19, "1088": 19, "1751": 19, "8121": 19, "aa6dc3": 19, "cc05": 19, "pasqual": 19, "experi": 19, "04": 19, "p04010": 19, "cond": 19, "mat": 19, "0503393": 19, "1742": 19, "5468": 19, "dhmv23": 19, "maarten": 19, "van": 19, "jutho": [19, 20], "ian": 19, "mcculloch": 19, "lauren": 19, "2302": 19, "14181": 19, "ey36": 19, "carl": 19, "gale": 19, "psychometrika": 19, "211": 19, "218": 19, "sep": 19, "1007": 19, "bf02288367": 19, "ftl": 19, "07": 19, "adrian": 19, "simon": 19, "trebst": 19, "andrea": 19, "ww": 19, "ludwig": 19, "matthia": 19, "troyer": 19, "alexei": 19, "kitaev": 19, "zhenghan": 19, "wang": 19, "michael": 19, "freedman": 19, "liquid": 19, "golden": 19, "98": 19, "160409": 19, "0612341": 19, "1103": 19, "physrevlett": 19, "hco": 19, "ignacio": 19, "cirac": 19, "tobia": 19, "osborn": 19, "iztok": 19, "\u017e": 19, "orn": 19, "henri": 19, "verscheld": 19, "frank": 19, "107": 19, "070601": 19, "0936": 19, "hlo": 19, "christian": 19, "ivan": 19, "oseledet": 19, "bart": 19, "vandereycken": 19, "unifi": 19, "94": 19, "165116": 19, "1408": 19, "5056": 19, "physrevb": 19, "hs05": 19, "naomichi": 19, "masuo": 19, "anneal": 19, "679": 19, "37": 19, "68": 19, "math": 19, "ph": 19, "0506007": 19, "11526216_2": 19, "hmschollwock17": 19, "schollw\u00f6ck": 19, "phy": 19, "rev": 19, "95": 19, "035129": 19, "jan": 19, "url": 19, "http": 19, "ap": 19, "jwx08": 19, "weng": 19, "xiang": 19, "101": 19, "090603": 19, "0806": 19, "3719": 19, "jorusv": 19, "08": 19, "Or": 19, "\u00fa": 19, "vidal": 19, "250602": 19, "0703788": 19, "lan37": 19, "experiment": 19, "32": 19, "1016": 19, "b978": 19, "010586": 19, "50034": 19, "lov15": 19, "train": 19, "siam": 19, "analysi": 19, "53": 19, "917": 19, "941": 19, "1407": 19, "2042": 19, "1137": 19, "140976546": 19, "ons44": 19, "lar": 19, "crystal": 19, "65": 19, "117": 19, "149": 19, "physrev": 19, "phv14": 19, "robert": 19, "faster": 19, "90": 19, "033315": 19, "1304": 19, "6112": 19, "rcc18": 19, "marek": 19, "piotr": 19, "czarnik": 19, "lukasz": 19, "cincio": 19, "hubbard": 19, "041033": 19, "1801": 19, "08554": 19, "physrevx": 19, "vhv19": 19, "scipost": 19, "007": 19, "1810": 19, "07006": 19, "21468": 19, "scipostphyslectnot": 19, "vgarciarc04": 19, "garc": 19, "\u0131": 19, "ripol": 19, "dissip": 19, "93": 19, "207204": 19, "0406426": 19, "zaunerstaubervf": 19, "fishman": 19, "97": 19, "045145": 19, "1701": 19, "07035": 19, "practis": 20, "softwar": 20, "lander": 20, "burgelman": 20, "luka": 20, "devo": 20, "daan": 20, "maerten": 20, "bram": 20, "vancraeynest": 20, "cuiper": 20, "kevin": 20, "vervoort": 20, "postul": 20, "deep": 20, "dive": 20}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"us": [0, 18], "resourc": 0, "get": 1, "start": 1, "numer": 1, "version": 1, "control": 1, "julia": [1, 20], "packag": 1, "noteworthi": 1, "tensor": [1, 3, 4, 7, 8, 9, 10, 11, 13, 18, 20], "network": [1, 9, 10, 11, 13, 20], "softwar": 1, "fock": 2, "space": [2, 3], "second": 2, "quantis": 2, "The": [3, 18], "hilbert": 3, "mani": [3, 4, 8, 20], "bodi": [3, 4, 8, 20], "physic": [3, 4, 8, 20], "distinguis": 3, "particl": 3, "product": [3, 4, 7, 8, 10, 12, 13, 14, 20], "ident": 3, "pauli": 3, "s": 3, "exclus": 3, "principl": 3, "interest": 4, "state": [4, 5, 9, 12, 13, 14, 20], "observ": [4, 5], "quantum": [4, 5, 6, 8, 9, 11, 13, 18, 20], "revisit": [4, 12, 18], "from": [4, 6], "mix": 4, "entangl": [4, 12, 14, 17], "finit": [4, 13, 16, 17], "temperatur": [4, 16], "zero": 4, "dynam": [4, 5], "quench": 4, "static": 4, "correl": [4, 12, 14], "function": [4, 12, 13, 14], "mechan": [5, 6, 13], "its": 5, "postul": 5, "1": [5, 13, 18], "2": [5, 18], "3": [5, 18], "measur": 5, "expect": [5, 12, 13, 14], "valu": [5, 10, 12, 13, 14], "collaps": 5, "4": [5, 18], "classic": 6, "map": [6, 7, 18], "suzuki": 6, "trotter": 6, "decomposit": [6, 10], "statist": [6, 13], "higher": 6, "dimension": [6, 11, 18], "generalis": 6, "multi": 7, "linear": 7, "algebra": 7, "content": [7, 10, 12, 16], "overview": [7, 10], "vector": 7, "matric": [7, 13], "conclus": [7, 10, 11, 13], "symmetri": [8, 18], "exampl": [8, 11, 12, 14, 15, 16], "applic": [8, 13], "break": 8, "order": [8, 10], "paramet": 8, "phase": 8, "noether": 8, "conserv": 8, "quantitit": 8, "group": [8, 10], "represent": [8, 12], "theori": [8, 10], "definit": 8, "complex": [8, 10], "conjug": 8, "direct": 8, "sum": 8, "irreduc": 8, "symmetr": [8, 18], "outlook": [8, 11], "gener": [8, 18], "area": 9, "law": 9, "histori": 10, "graphic": 10, "notat": 10, "oper": [10, 13, 18], "index": 10, "split": 10, "indic": 10, "outer": 10, "trace": 10, "contract": 10, "factor": 10, "eigenvalu": 10, "singular": 10, "polar": 10, "qr": 10, "nullspac": 10, "A": [11, 14, 18], "simpl": 11, "algorithm": [11, 15, 16, 20], "simul": 11, "system": [11, 13], "time": [11, 16], "evolv": 11, "block": [11, 13, 18], "decim": 11, "tebd": 11, "One": 11, "nearest": 11, "neighbor": 11, "hamiltonian": [11, 18], "groundstat": 11, "search": 11, "imaginari": [11, 16], "evolut": [11, 16], "infinit": 12, "matrix": [12, 13, 14, 20], "thermodynam": [12, 13], "limit": [12, 13], "normal": 12, "gaug": [12, 14], "entropi": 12, "truncat": 12, "code": [12, 14, 16], "mpskit": [12, 14, 16], "infinitemp": 12, "2d": 13, "partit": 13, "transfer": 13, "1d": 13, "jordan": 13, "mpo": [13, 16], "machin": 13, "quasi": 13, "mpskitmodel": 13, "mpoham": 13, "macro": 13, "mp": [14, 16], "freedom": 14, "finitemp": 14, "fix": 15, "point": 15, "dmrg": 15, "vump": 15, "tdvp": 16, "timestep": 16, "make_time_mpo": 16, "scale": 17, "deep": 18, "dive": 18, "construct": 18, "your": 18, "first": 18, "level": 18, "0": 18, "Ising": 18, "model": 18, "mathbb": 18, "z": 18, "_2": 18, "irrep": 18, "basi": 18, "sparsiti": 18, "fusion": 18, "tree": 18, "how": 18, "them": 18, "mathrm": 18, "u": 18, "bose": 18, "hubbard": 18, "directli": 18, "term": 18, "creation": 18, "annihil": 18, "fermion": 18, "kitaev": 18, "pariti": 18, "non": 18, "abelian": 18, "heisenberg": 18, "wigner": 18, "eckart": 18, "theorem": 18, "approach": 18, "spin": 18, "action": 18, "an": 18, "eleg": 18, "su": 18, "n": 18, "5": 18, "anyon": 18, "golden": 18, "chain": 18, "To": 18, "Be": 18, "ad": 18, "refer": 19, "method": 20, "preliminari": 20, "introduct": 20, "In": 20, "depth": 20, "tutori": 20, "other": 20}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinxcontrib.bibtex": 9, "sphinx": 56}}) \ No newline at end of file