quantumgameoflife.jl

A Classical Simulation of the Quantum Game of Life

https://github.com/benjamindecker/quantumgameoflife.jl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

cellular-automata many-body-physics quantum-computing quantum-information tensor tensor-networks
Last synced: 6 months ago · JSON representation ·

Repository

A Classical Simulation of the Quantum Game of Life

Basic Info
  • Host: GitHub
  • Owner: BenjaminDecker
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 3.64 MB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
cellular-automata many-body-physics quantum-computing quantum-information tensor tensor-networks
Created over 2 years ago · Last pushed 7 months ago
Metadata Files
Readme License Citation

README.md

QuantumGameOfLife.jl

A classical simulation of the Quantum Game of Life.

Simulate and create beautiful plots of quantum cellular automata, inspired by classical elementary cellular automata. Given some rule from the Wolfram Code, the translation into a quantum framework follows the method presented in [1].

Setup

Before running the code for the first time, install all dependencies by running the instantiation script from the project directory

bash $ cd QuantumGameOfLife.jl/ $ julia instantiate.jl

The instantiation script is also called from the cli script to make sure everything is set up correctly every time.

Usage

List all available parameters with bash $ julia cli.jl --help

Create and show a plot bash $ julia cli.jl --show

Use different initial state vectors bash $ julia cli.jl --show --initial-state blinker triple_blinker

Use a superposition of initial state vectors bash $ julia cli.jl --show --initial-state blinker triple_blinker --superposition

Plot additional measurement information bash $ julia cli.jl --show --plot expect sse rounded cbe autocorrelation

Write to different file formats bash $ julia cli.jl --show --file-formats svg png pdf

Try the TDVP algorithm (This command was used to create the plot at the top) bash $ julia cli.jl --show --initial-state single --algorithm tdvp1 --num-cells 33 --max-bond-dim 5 --num-steps 250 --sweeps-per-time-step 10 --plot classical expect sse rounded autocorrelation --step-size 0.4 --file-formats svg

Plots are saved in the plots directory by default, which can be changed with the --plotting-file-path argument. (Make sure to create the specified directory first if it does not already exist.) bash $ julia cli.jl --show --plotting-file-path plots2

Use different QCA rules

Provide a Wolfram code via the rule parameter to create quantum analogues to classical elementary cellular automata and compare the results to the classical case. Use a distance of 1 to get equivalents to elementary cellular automata where the rule labels the corresponding Wolfram code. bash $ julia cli.jl --show --plot classical expect --distance 1 --rule 108 $ julia cli.jl --show --plot classical expect --distance 1 --rule 30 $ julia cli.jl --show --plot classical expect --distance 1 --rule 150

Use higher distances and extend the Wolfram code to larger numbers bash $ julia cli.jl --show --plot classical expect --distance 2 --rule 2266898040

Use periodic boundary conditions bash $ julia cli.jl --show --periodic-boundaries

Work with the REPL

Julia uses a just-in-time compiler which takes extra time when code is executed the first time to compile functions before executing them. Subsequent executions will reuse the compiled functions and run a lot faster, even with different input parameters. However, when using the CLI script, the compiled functions are lost between executions and have to be recompiled every time.

To prevent that, you might want to work from inside the julia REPL, especially if you plan to run many quick simulations.

To do so, make sure that your working directory is the project root directory and open the julia REPL bash $ cd QuantumGameOfLife.jl/ $ julia then, include the instantiation file and use the project. julia julia> include("instantiate.jl") julia> using QuantumGameOfLife

Afterwards, you can use the same command line options as with the CLI by passing them to the start function. To see the effect, compare the runtimes of two consecutive executions of the same function. ```julia julia> @time QuantumGameOfLife.start()

julia> @time QuantumGameOfLife.start()

julia> @time QuantumGameOfLife.start("--show --plot classical expect --distance 1 --rule 150") ```


References

[1] Benjamin Decker. “Creating a Quantum Analogue to an Arbitrary Classical Elementary Cellular Automaton”. en. MA thesis. Technical University of Munich, 2024-10. URL: https://mediatum.ub.tum.de/1756463

Owner

  • Name: Benjamin Decker
  • Login: BenjaminDecker
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Decker"
  given-names: "Benjamin"
  orcid: "https://orcid.org/0000-0002-0921-0026"
title: "QuantumGameOfLife.jl"
version: 1.0.0
date-released: 2024-09-25
url: "https://github.com/BenjaminDecker/QuantumGameOfLife.jl"

GitHub Events

Total
  • Watch event: 4
  • Push event: 9
Last Year
  • Watch event: 4
  • Push event: 9