{ "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/plain": [ "['|1/2,1/2⟩|1/2,1/2⟩|1/2,1/2⟩',\n", " '|1/2,1/2⟩|1/2,1/2⟩|1/2,-1/2⟩',\n", " '|1/2,1/2⟩|1/2,-1/2⟩|1/2,1/2⟩',\n", " '|1/2,1/2⟩|1/2,-1/2⟩|1/2,-1/2⟩',\n", " '|1/2,-1/2⟩|1/2,1/2⟩|1/2,1/2⟩',\n", " '|1/2,-1/2⟩|1/2,1/2⟩|1/2,-1/2⟩',\n", " '|1/2,-1/2⟩|1/2,-1/2⟩|1/2,1/2⟩',\n", " '|1/2,-1/2⟩|1/2,-1/2⟩|1/2,-1/2⟩']" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "QS.ZeemanBasis_Ket()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['⟨1/2,1/2|⟨1/2,1/2|⟨1/2,1/2|',\n", " '⟨1/2,1/2|⟨1/2,1/2|⟨1/2,-1/2|',\n", " '⟨1/2,1/2|⟨1/2,-1/2|⟨1/2,1/2|',\n", " '⟨1/2,1/2|⟨1/2,-1/2|⟨1/2,-1/2|',\n", " '⟨1/2,-1/2|⟨1/2,1/2|⟨1/2,1/2|',\n", " '⟨1/2,-1/2|⟨1/2,1/2|⟨1/2,-1/2|',\n", " '⟨1/2,-1/2|⟨1/2,-1/2|⟨1/2,1/2|',\n", " '⟨1/2,-1/2|⟨1/2,-1/2|⟨1/2,-1/2|']" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "QS.ZeemanBasis_Bra()" ] } ], "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 }