{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# A4 - Quantum ising models" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "view-in-github" }, "source": [ "[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/OpenJij/OpenJijTutorial/blob/master/source/en/A004-QuantumSystem.ipynb)" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "view-in-github" }, "source": [ "In this section, we introduce ising model with quantum effects (mainly transverse magnetic fields). \n", "First, let us define the Graph and determine $J_{ij}, h_i$." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import cxxjij.graph as G\n", "# set the size of problem 100\n", "N = 100\n", "\n", "graph = G.Dense(N)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "mu, sigma = 0, 1\n", "\n", "for i in range(N):\n", " for j in range(N):\n", " # normalize with 1/N to avoid large Jij\n", " graph[i,j] = 0 if i == j else np.random.normal()/N\n", "\n", "for i in range(N):\n", " graph[i] = np.random.normal()/N" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Transeverse field ising model\n", "\n", "In this case, transverse field ising model is used for the system.\n", "\n", "\\begin{align}\n", "H &= s \\left(\\sum_{i