Earlier quoted context omitted.
It does seem that 'modern' idioms tend to just be doing the same thing in a more obfuscated manner. Just a .c/.h pair would have been easier to add to your source.
This is a valid point. I was on the fence between doing .c/.h pair and a single .h. But finally took the inspiration from: https://github.com/nothings/stb .
Wave Function Collapse library in pure C
21–30 of 87 posts
Re: Wave Function Collapse library in pure C
#22Earlier quoted context omitted.
Very naive question but is it even possible to do quantum experiments with code on a regular computer? Anyone knows if it's been tried?
Yes. It's just an equation. The complexity of quantum system that can be simulate is limited. https://marl0ny.github.io/QM-Simulator-2D/index.html From the above link you can look single slit, double slit, triple slit, step, spike, or load an arbitrary image as a potential and do experiments in 2d box. >This WebGL program simulates the quantum mechanics of a single particle confined in a 2D box, where inside this box…
To be more precise, the Born rule non-linear adjustment of the wave function to a single real value after a measurement is strictly necessary for QM to match experiments. Whether this should be interpreted as a physical phenomenon of wave function collapse, or as entanglement with the environment (MWI), or as an update of probabilities for hidden variables (Pilot wave) or some other phenomenon is speculative, but the wave function must be "collapsed" to a single real value after a measurement to correctly predict experimental results.
Re: Wave Function Collapse library in pure C
#23Earlier quoted context omitted.
You don't need an elaborate build system to add a single .c file to your project
and now you need to add a .h to where ever you need to call those function. This .h will need to know if it got included multiple times, and so isn't just a trivial declaration. It's just easier to have a single .h you include.
No, it can be in a single place and you can just #include it.
>This .h will need to know if it got included multiple times, and so isn't just a trivial declaration.
This is the point of using header guards.
>It's just easier to have a single .h you include.
Depending on the build tool it's the same or only marginally easier (you save like 10 characters)
Re: Wave Function Collapse library in pure C
#24Earlier quoted context omitted.
Yes. It's just an equation. The complexity of quantum system that can be simulate is limited. https://marl0ny.github.io/QM-Simulator-2D/index.html From the above link you can look single slit, double slit, triple slit, step, spike, or load an arbitrary image as a potential and do experiments in 2d box. >This WebGL program simulates the quantum mechanics of a single particle confined in a 2D box, where inside this box…
> btw. Wave function collapse in quantum physics is completely speculative phenomenon. There is only apparent wave function collapse. To be more precise, the Born rule non-linear adjustment of the wave function to a single real value after a measurement is strictly necessary for QM to match experiments. Whether this should be interpreted as a physical phenomenon of wave function collapse, or as entanglement with the…
Wave-function collapse as a priori process is just speculation. Finding that it actually happens would be new physics.
Re: Wave Function Collapse library in pure C
#25Earlier quoted context omitted.
This is a typical idiom frequently seen in modern C and C++ codes. As https://github.com/krychu/wfc#how-to-use-the-library says, you need to define a macro in a C file in order to "expand" the actual code there. Having the code in the header gives a bit more flexibility considering the file layout. IMHO this is an awkward consequence of the missing de-facto-standard in C/C++ build systems.
This is a sad idom followed in C and C++ libraries that cannot be bothered to learn build tools, dealing with C and C++ as if they were scripting languages.
Re: Wave Function Collapse library in pure C
#26I wonder why the implementation is all in a header.
Re: Wave Function Collapse library in pure C
#27Earlier quoted context omitted.
> btw. Wave function collapse in quantum physics is completely speculative phenomenon. There is only apparent wave function collapse. To be more precise, the Born rule non-linear adjustment of the wave function to a single real value after a measurement is strictly necessary for QM to match experiments. Whether this should be interpreted as a physical phenomenon of wave function collapse, or as entanglement with the…
Adjustment is just cutting interference terms from equation. Mathematically apparent wave function collapse is caused by quantum decoherence. Wave-function collapse as a priori process is just speculation. Finding that it actually happens would be new physics.
Re: Wave Function Collapse library in pure C
#28I feel like the algorithm is maybe poorly named. At first I thought this was a tool to help with computational quantum physics.
Very naive question but is it even possible to do quantum experiments with code on a regular computer? Anyone knows if it's been tried?
Re: Wave Function Collapse library in pure C
#29Earlier quoted context omitted.
That would be easier if the most popular build systems weren’t terrible
Or I don't know, people actually bothered to learn them.
Re: Wave Function Collapse library in pure C
#30Earlier quoted context omitted.
It does seem that 'modern' idioms tend to just be doing the same thing in a more obfuscated manner. Just a .c/.h pair would have been easier to add to your source.
That would be easier if the most popular build systems weren’t terrible
If you embed the source in your project, the terribleness is about adding to your Makefile:
funkylib.o: funkylib.c
$(CC) $