No description
Find a file
Oliver Thomas 0b29ce9bd3
Merge branch '18-improve-documentation' into 'main'
Bulking out linalg docs and refactoring in general

See merge request OFThomas/noptics!22
2023-09-02 09:20:10 +00:00
docs Updating linalg docs 2023-09-01 18:13:07 +01:00
src fixed definition error causing test to fail in ~ 2023-09-02 10:18:08 +01:00
tests changed hafnian to hafnian squared in pnr 2023-06-12 14:55:39 +01:00
.gitignore removed lto from config.nims to speed up nimble test time from 40s to 30s 2023-03-29 23:25:32 +01:00
.gitlab-ci.yml there's an issue with nimble packages needed as dependencies 2023-01-18 22:48:41 +00:00
config.nims testing single mode squeezer first 2023-06-12 13:55:49 +01:00
LICENSE Add LICENSE 2023-03-10 14:52:14 +00:00
main.nim Added reference (slow) hafnian implementation 2023-01-19 21:51:04 +00:00
mkdocs.yml Ok we also don't need a separate page for plotting I got carried away 2023-09-01 14:43:07 +01:00
noptics.nimble v0.2.3 added broadcast ops cwiseDiff (-), cwiseDiv (/) 2023-03-20 14:17:40 +00:00
README.md added simpler nimble install instructions 2023-01-16 13:58:15 +00:00

See the docs

You can find the latest docs at https://ofthomas.gitlab.io/noptics.

To install Noptics

Clone the repo and run nimble install

git clone https://gitlab.com/OFThomas/noptics.git
cd noptics
nimble install 

That's it! You're ready to go, see some of the examples :).

Nim install (unix)

curl https://nim-lang.org/choosenim/init.sh -sSf | sh

Add to path add your ~/.bashrc

export PATH=~/.nimble/bin:$PATH

To use nim

To compile to c (using c compiler):

nim c -r test.nim

To compile to c++ (using c++ compiler):

nim cpp -r test.nim

Nim setup for vim

https://github.com/BitR/ycm-nimsuggest

Requires

nimble install timeit
nimble install weave
nimble install gnuplot

gnuplot i.e.

sudo apt-get install gnuplot-x11

build options

For Maximum Speed TM use

nim c -d:danger -d:lto quantum.nim

For debugging

nim c -d:danger --debugger:native --passC:-flto --passL:-flto --mm:orc quantum.nim

Profiling,

valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes ./quantum

Single thread 24clicks takes 60s with half_modes_gray_split_for

Multithreaded 24clicks takes 11s with double_prec_all_clicks_parallel(dim) Multithreaded 26clicks takes 60s with double_prec_all_clicks_parallel(dim)