Git Product home page Git Product logo

sqqw's Introduction

SQQW - Second Quantization Quantum Walk

Update

  • Parallel and CUDA
  • Minor bugs fixed
  • New UI

Development environment

Windows 10 Home

Wolfram Mathematica 10.2

Functionality

  • Wick expand of operators
    • Symetric expand
    • Antisymetric expand
    • User-defined (Not implemented)
  • Vacuum average of creation and annihilation operators
  • Simulate arbitrary Hamiltonian and initial state
    • Hamiltonian
      • Single term
      • Basic arithmetics
      • Infinite sum
      • Periodic boundary condition (Not implemented)
    • Initial state
      • Single term
      • Basic arithmetics
      • Infinite sum (Not implemented)
    • Partical type
      • Boson
      • Fermion
      • Hard-core Boson (Not implemented)

Example - Nearest interaction

Initialization

Assume the package file (SQQW.wl) is in the same category of your notebook.

Clear["Global`*"];
Get[NotebookDirectory[] <> "SQQW.wl"]
SQQWInitialize[];

Define Quantum Walk

Hamiltonian

H1 = SQHamiltonian[
  -HInfiniteSum[Subscript[SuperDagger[a], l + 1] ** Subscript[a, l] + Subscript[SuperDagger[a], l] ** Subscript[a, l + 1], {l}]
  +5 HInfiniteSum[Subscript[n, l + 1] ** Subscript[n, l], {l}]
   ];

This may seems odd here but in Mathematica it is displayed in the way of writing phyiscs equations.

Note that the double stars mean non-commutable multiplication.

Initial state

Initial = SQInitial[0.5 InitialTerm[{0, 1}] + 0.5 InitialTerm[{2, 3}]];

This means the initial state is a superposition.

Partical type

particalType = "Boson";

Currently, Boson and Fermion are supported.

Matrix base

base = Subscript[SuperDagger[a], l1] ** Subscript[SuperDagger[a], l2];

Simulation

{{fe, fd}, H1Base, H1WaveFunction} = 
  SQHamiltonialEvolve[
    H1, 
    particalType, 
    Initial, 
    base, 
    {l1, l2}, {{l1, -10, 10}, {l2, l1, 10}}
  ];

A progress bar will show when constructing Hamiltonian matrix.

After calculation, fe and fd will be assigned to a encoding and decoding function which can be ignored. H1Base is assigned to a vector of bases. H1WaveFunction is assigned to the coresponding wave function under that base. Note that H1WaveFunction is a function of time.

Visualization

Correlation

H1CorrelationHalf[t_] := 
  Abs[Normal[
    SparseArray[
      Thread[Rule[
        Map[# + {10 + 1, 10 + 1} &, H1Base], 
        H1WaveFunction[t]
        ]],
    {2 10 + 1, 2 10 + 1}
  ]]]^2;
H1Correlation[t_] := (# + Transpose[#]) &[H1CorrelationHalf[t]];

Plot Correlation

Manipulate[
 MatrixPlot[
  Chop@H1Corelation[t],
  DataReversed -> {True, False},
  ColorFunction -> (Hue[(1 - #)^0.23*0.83] &),
  FrameTicks -> {Table[{i + 10 + 1, i}, {i, -10, 10, 5}], Table[{i + 10 + 1, i}, {i, -10, 10, 5}]}
  ],
{t, 0, 4}]

sqqw's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.