{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# PyOR Quantum\n", "## Author: Vineeth Thalakottoor\n", "## Introduction to Zeeman 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\"}\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\\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": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X1 = QS.State({\"A\": 1/2,\"B\": 1/2,\"C\": 1/2})\n", "X1.matrix" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\1.0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X2 = QS.State({\"A\": 1/2,\"B\": 1/2,\"C\": -1/2})\n", "X2.matrix" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\1.0\\\\0\\\\0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X3 = QS.State({\"A\": 1/2,\"B\": -1/2,\"C\": 1/2})\n", "X3.matrix" ] }, { "cell_type": "code", "execution_count": 6, "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": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X4 = QS.State({\"A\": 1/2,\"B\": -1/2,\"C\": -1/2})\n", "X4.matrix" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\0\\\\1.0\\\\0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[1.0],\n", "[ 0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X5 = QS.State({\"A\": -1/2,\"B\": 1/2,\"C\": 1/2})\n", "X5.matrix" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\0\\\\0\\\\1.0\\\\0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[1.0],\n", "[ 0],\n", "[ 0]])" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X6 = QS.State({\"A\": -1/2,\"B\": 1/2,\"C\": -1/2})\n", "X6.matrix" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\0\\\\0\\\\0\\\\0\\\\1.0\\\\0\\end{matrix}\\right]$" ], "text/plain": [ "Matrix([\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[ 0],\n", "[1.0],\n", "[ 0]])" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X7 = QS.State({\"A\": -1/2,\"B\": -1/2,\"C\": 1/2})\n", "X7.matrix" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\left[\\begin{matrix}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", "[1.0]])" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "X8 = QS.State({\"A\": -1/2,\"B\": -1/2,\"C\": -1/2})\n", "X8.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" } }, "nbformat": 4, "nbformat_minor": 4 }