mirror of
https://github.com/qwjyh/QuantumLegos.jl.git
synced 2024-11-21 22:50:12 +09:00
No description
.github | ||
docs | ||
examples | ||
src | ||
test | ||
.gitignore | ||
LICENSE | ||
Project.toml | ||
README.md |
QuantumLegos
How-Tos for Julia beginners
How to get Julia
Download binary from https://julialang.org/downloads/. Or use juliaup(recommended).
How to run (for dev.)(init)
- clone this repo
- cd to here
julia --project
- type
]
to enter Pkg mode in REPL. instantiate
to download all dependencies- press backspace to exit Pkg mode
using Legos
to use (normally starts from here)
Recommended tools for REPL:
- OhMyREPL: for syntax highlight and interactive history search in REPL
- Revise: for auto-loading changes to the package
How to build and browse docs locally(init)
- cd to
docs/
julia --project
]
to enter Pkg modePkg> dev ..
to addLegos
to available packagePkg> instantiate
- Exit Pkg mode(backspace) and
include("make.jl")
to build. Now you can exit julia REPL byexit()
orCtrl-D
. - Alternatively, run
julia --project make.jl
from any shell. - To browse file on browser, I recommend either to use LiveServer.jl (from Pkg mode REPL,
add LiveServer
) andjulia -e 'using LiveServer; serve(dir="docs/build")'
or cd todocs/build
andpython -m http.server --bind localhost
. Details on Note on Documenter.jl docs
- You can stop the local server by just stopping LiveServer or python http.server (just
Ctrl-C
) - You can update the docs by
julia --project make.jl
ondocs/
and reload on your browser.
TODO
- write test for CheckMatrix constructor
- add
Base.==
method for CheckMatrix
- add
- implement checkmatrix constructor from stabilizer generator
- implement constructor for State
- implement initial constructor for State with only 1 lego and 0 edge
- implement action function on State
- implement tracing function for CheckMatrix
- test for self-tracing
- implement map function from LegoLeg to checkmatrix index
- implement tracing function for CheckMatrix
- implement functions to glean stabilizer generator from CheckMatrix
- test functions with examples on the paper
- improve perf of ref!
- implement function to calculate enumerator polynomial
ref! optimization
before
(so many allocs, take profile)
after