NOptics
Nim Linear algebra, classical and quantum optics simulation package
Summary
| Latest Version | 0.2.3 |
|---|---|
| License | Apache-2.0 |
| CI Status | Failing |
| Stars | 1 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2023-09-02 |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Authors
- Oliver Thomas
Installation
nimble install NOptics
choosenim install NOptics
git clone https://gitlab.com/OFThomas/noptics
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| NOptics | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.6.10 | No |
| timeit | - | No |
| weave | - | No |
| gnuplot | - | No |
Source
| Repository | https://gitlab.com/OFThomas/noptics |
|---|---|
| Homepage | https://gitlab.com/OFThomas/noptics |
| Registry Source | gitlab |
README
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)