{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# PyOR Quantum\n", "## Author: Vineeth Thalakottoor\n", "## Introduction to Coupled States" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Define the source path\n", "SourcePath = '/media/HD2/Vineeth/PostDoc_Simulations/Github/PyOR_V1/PyOR_Combined/PyOR/Source_Doc'\n", "\n", "# Add source path\n", "import sys\n", "sys.path.append(SourcePath)\n", "\n", "# Import PyOR package\n", "from PyOR_QuantumSystem import QuantumSystem as QunS" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Define the spin system\n", "Spin_list = {\"A\" : \"H1\",\"B\" : \"H1\",\"C\" : \"H1\",\"D\" : \"H1\"}\n", "QS = QunS(Spin_list,PrintDefault=False)\n", "\n", "# initialize the system\n", "QS.Initialize()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}1.0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Four uncouple spins \n", "X1 = QS.States_Coupled([{\"A\": 1/2},{\"B\": 1/2},{\"C\": 1/2},{\"D\": 1/2}])\n", "X1.matrix" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\1.0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[1.0]])" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Four uncouple spins\n", "X2 = QS.States_Coupled([{\"A\": -1/2},{\"B\": -1/2},{\"C\": -1/2},{\"D\": -1/2}])\n", "X2.matrix" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}1.0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[1.0],\n", "[ 0]])" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# State of sub system A\n", "X3 = QS.States_Coupled([{\"A\": 1/2}])\n", "X3.matrix" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\1.0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[1.0]])" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# State of sub system A\n", "X4 = QS.States_Coupled([{\"A\": -1/2}])\n", "X4.matrix" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}1.0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# State of uncoupled sub system A and B\n", "X5 = QS.States_Coupled([{\"A\": 1/2},{\"B\": 1/2}])\n", "X5.matrix" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\-0.707106781186547\\\\0.707106781186548\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[-0.707106781186547],\n", "[ 0.707106781186548],\n", "[ 0]])" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# State of coupled sub system A and B\n", "X6 = QS.States_Coupled([{\"New\" : {\"l\" : 0, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2}}])\n", "X6.matrix" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}1.0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# State of coupled sub system A and B\n", "X7 = QS.States_Coupled([{\"New\" : {\"l\" : 1, \"m\" : 1, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2}}])\n", "X7.matrix" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0.707106781186548\\\\0.707106781186547\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[0.707106781186548],\n", "[0.707106781186547],\n", "[ 0]])" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# State of coupled sub system A and B\n", "X8 = QS.States_Coupled([{\"New\" : {\"l\" : 1, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2}}])\n", "X8.matrix" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\1.0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[1.0]])" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# State of coupled sub system A and B\n", "X9 = QS.States_Coupled([{\"New\" : {\"l\" : 1, \"m\" : -1, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2}}])\n", "X9.matrix" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}1.0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# One uncoupled (A) spin and Two coupled spins (B and C)\n", "# State of coupled sub system A and B\n", "X10 = QS.States_Coupled([{\"A\": 1/2},{\"New\" : {\"l\" : 1, \"m\" : 1, \"Select_l\" : 0},\"Old\" : {\"B\": 1/2,\"C\": 1/2}}])\n", "X10.matrix" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0.707106781186548\\\\0.707106781186547\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[0.707106781186548],\n", "[0.707106781186547],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# One uncoupled (A) spin and Two coupled spins (B and C)\n", "# State of coupled sub system A and B\n", "X11 = QS.States_Coupled([{\"A\": 1/2},{\"New\" : {\"l\" : 1, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"B\": 1/2,\"C\": 1/2}}])\n", "X11.matrix" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\1.0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# One uncoupled (A) spin and Two coupled spins (B and C)\n", "# State of coupled sub system A and B\n", "X12 = QS.States_Coupled([{\"A\": 1/2},{\"New\" : {\"l\" : 1, \"m\" : -1, \"Select_l\" : 0},\"Old\" : {\"B\": 1/2,\"C\": 1/2}}])\n", "X12.matrix" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\-0.707106781186547\\\\0.707106781186548\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[-0.707106781186547],\n", "[ 0.707106781186548],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# One uncoupled (A) spin and Two coupled spins (B and C)\n", "# State of coupled sub system A and B\n", "X13 = QS.States_Coupled([{\"A\": 1/2},{\"New\" : {\"l\" : 0, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"B\": 1/2,\"C\": 1/2}}])\n", "X13.matrix" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\0\\\\0\\\\0.5\\\\-0.5\\\\0\\\\0\\\\-0.5\\\\0.5\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0.5],\n", "[-0.5],\n", "[ 0],\n", "[ 0],\n", "[-0.5],\n", "[ 0.5],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Two pair of coupled system A and B coupled, and C and D coupled\n", "X14 = QS.States_Coupled([{\"New\" : {\"l\" : 0, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2}},{\"New\" : {\"l\" : 0, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"C\": 1/2,\"D\": 1/2}}])\n", "X14.matrix" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\0\\\\-0.707106781186547\\\\0\\\\0\\\\0\\\\0.707106781186548\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[-0.707106781186547],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0.707106781186548],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Two pair of coupled system A and B coupled, and C and D coupled\n", "X14 = QS.States_Coupled([{\"New\" : {\"l\" : 0, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2}},{\"New\" : {\"l\" : 1, \"m\" : 1, \"Select_l\" : 0},\"Old\" : {\"C\": 1/2,\"D\": 1/2}}])\n", "X14.matrix" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\0\\\\0\\\\-0.5\\\\0.5\\\\0\\\\0\\\\-0.5\\\\0.5\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[-0.5],\n", "[ 0.5],\n", "[ 0],\n", "[ 0],\n", "[-0.5],\n", "[ 0.5],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Two pair of coupled system A and B coupled, and C and D coupled\n", "X15 = QS.States_Coupled([{\"New\" : {\"l\" : 1, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2}},{\"New\" : {\"l\" : 0, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"C\": 1/2,\"D\": 1/2}}])\n", "X15.matrix" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}1.0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# All spins are coupled\n", "X16 = QS.States_Coupled([{\"New\" : {\"l\" : 2, \"m\" : 2, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2, \"C\": 1/2,\"D\": 1/2}}])\n", "X16.matrix" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0.5\\\\0.5\\\\3.23864880886297 \\cdot 10^{-16}\\\\0.5\\\\0\\\\0\\\\2.02888199778559 \\cdot 10^{-16}\\\\0.5\\\\0\\\\0\\\\2.02888199778559 \\cdot 10^{-16}\\\\0\\\\2.02888199778559 \\cdot 10^{-16}\\\\1.46071672408528 \\cdot 10^{-16}\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0.5],\n", "[ 0.5],\n", "[3.23864880886297e-16],\n", "[ 0.5],\n", "[ 0],\n", "[ 0],\n", "[2.02888199778559e-16],\n", "[ 0.5],\n", "[ 0],\n", "[ 0],\n", "[2.02888199778559e-16],\n", "[ 0],\n", "[2.02888199778559e-16],\n", "[1.46071672408528e-16],\n", "[ 0]])" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# All spins are coupled\n", "X17 = QS.States_Coupled([{\"New\" : {\"l\" : 2, \"m\" : 1, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2, \"C\": 1/2,\"D\": 1/2}}])\n", "X17.matrix" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\-4.44437010144091 \\cdot 10^{-16}\\\\-3.51129910970437 \\cdot 10^{-16}\\\\0.408248290463863\\\\-2.31737691712037 \\cdot 10^{-16}\\\\0.408248290463863\\\\0.408248290463863\\\\-4.86980591674165 \\cdot 10^{-17}\\\\-2.21369385562875 \\cdot 10^{-16}\\\\0.408248290463863\\\\0.408248290463863\\\\-5.11444620266011 \\cdot 10^{-18}\\\\0.408248290463863\\\\5.38125053700757 \\cdot 10^{-17}\\\\-2.65506637475496 \\cdot 10^{-31}\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[-4.44437010144091e-16],\n", "[-3.51129910970437e-16],\n", "[ 0.408248290463863],\n", "[-2.31737691712037e-16],\n", "[ 0.408248290463863],\n", "[ 0.408248290463863],\n", "[-4.86980591674165e-17],\n", "[-2.21369385562875e-16],\n", "[ 0.408248290463863],\n", "[ 0.408248290463863],\n", "[-5.11444620266011e-18],\n", "[ 0.408248290463863],\n", "[ 5.38125053700757e-17],\n", "[-2.65506637475496e-31],\n", "[ 0]])" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# All spins are coupled\n", "X18 = QS.States_Coupled([{\"New\" : {\"l\" : 2, \"m\" : 0, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2, \"C\": 1/2,\"D\": 1/2}}])\n", "X18.matrix" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0.866025403784439\\\\-0.288675134594813\\\\-1.8698347616077 \\cdot 10^{-16}\\\\-0.288675134594813\\\\0\\\\0\\\\-1.56855423838949 \\cdot 10^{-16}\\\\-0.288675134594813\\\\0\\\\0\\\\-1.56855423838949 \\cdot 10^{-16}\\\\0\\\\-1.56855423838949 \\cdot 10^{-16}\\\\-2.59786491544157 \\cdot 10^{-16}\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0.866025403784439],\n", "[ -0.288675134594813],\n", "[ -1.8698347616077e-16],\n", "[ -0.288675134594813],\n", "[ 0],\n", "[ 0],\n", "[-1.56855423838949e-16],\n", "[ -0.288675134594813],\n", "[ 0],\n", "[ 0],\n", "[-1.56855423838949e-16],\n", "[ 0],\n", "[-1.56855423838949e-16],\n", "[-2.59786491544157e-16],\n", "[ 0]])" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# All spins are coupled\n", "X19 = QS.States_Coupled([{\"New\" : {\"l\" : 1, \"m\" : 1, \"Select_l\" : 0},\"Old\" : {\"A\": 1/2,\"B\": 1/2, \"C\": 1/2,\"D\": 1/2}}])\n", "X19.matrix" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0.0351327291507096\\\\0.790017233330623\\\\-5.82022219644816 \\cdot 10^{-16}\\\\-0.543346216784993\\\\-3.0661718775136 \\cdot 10^{-16}\\\\2.08604874259664 \\cdot 10^{-16}\\\\-1.99881058322943 \\cdot 10^{-16}\\\\-0.281803745696339\\\\-2.19085773391869 \\cdot 10^{-16}\\\\1.43172975832302 \\cdot 10^{-16}\\\\1.37003078565815 \\cdot 10^{-18}\\\\6.95202190332097 \\cdot 10^{-16}\\\\1.79421197963676 \\cdot 10^{-16}\\\\-1.05389615645798 \\cdot 10^{-17}\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0.0351327291507096],\n", "[ 0.790017233330623],\n", "[-5.82022219644816e-16],\n", "[ -0.543346216784993],\n", "[ -3.0661718775136e-16],\n", "[ 2.08604874259664e-16],\n", "[-1.99881058322943e-16],\n", "[ -0.281803745696339],\n", "[-2.19085773391869e-16],\n", "[ 1.43172975832302e-16],\n", "[ 1.37003078565815e-18],\n", "[ 6.95202190332097e-16],\n", "[ 1.79421197963676e-16],\n", "[-1.05389615645798e-17],\n", "[ 0]])" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# All spins are coupled\n", "X20 = QS.States_Coupled([{\"New\" : {\"l\" : 1, \"m\" : 1, \"Select_l\" : 1},\"Old\" : {\"A\": 1/2,\"B\": 1/2, \"C\": 1/2,\"D\": 1/2}}])\n", "X20.matrix" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\-0.00564176435583433\\\\-0.168178055755344\\\\1.79018853220595 \\cdot 10^{-15}\\\\-0.604674375164066\\\\-1.35315959328948 \\cdot 10^{-16}\\\\1.38539816933986 \\cdot 10^{-16}\\\\6.22715665337022 \\cdot 10^{-16}\\\\0.778494195275245\\\\-2.32860407194975 \\cdot 10^{-16}\\\\8.98882211462371 \\cdot 10^{-17}\\\\-3.88900867887732 \\cdot 10^{-16}\\\\-1.70257142184444 \\cdot 10^{-15}\\\\-3.96593278267651 \\cdot 10^{-16}\\\\1.69239165700711 \\cdot 10^{-18}\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ -0.00564176435583433],\n", "[ -0.168178055755344],\n", "[ 1.79018853220595e-15],\n", "[ -0.604674375164066],\n", "[-1.35315959328948e-16],\n", "[ 1.38539816933986e-16],\n", "[ 6.22715665337022e-16],\n", "[ 0.778494195275245],\n", "[-2.32860407194975e-16],\n", "[ 8.98882211462371e-17],\n", "[-3.88900867887732e-16],\n", "[-1.70257142184444e-15],\n", "[-3.96593278267651e-16],\n", "[ 1.69239165700711e-18],\n", "[ 0]])" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# All spins are coupled\n", "X21 = QS.States_Coupled([{\"New\" : {\"l\" : 1, \"m\" : 1, \"Select_l\" : 2},\"Old\" : {\"A\": 1/2,\"B\": 1/2, \"C\": 1/2,\"D\": 1/2}}])\n", "X21.matrix" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.7" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }