Live data from Hacker News

Show HN: Quantum JavaScript

quantumjavascript.app

21–29 of 29 posts

Re: Show HN: Quantum JavaScript

#21

I can't help but chuckle when I think about what the js haters would say about this.. You can't even escape js on the quantum level

The actual quantum level physics itself is probably running in some nodejs process started by forgotten continuous integration server at someone’s home lab.

It is all javascript all the way down.

Re: Show HN: Quantum JavaScript

#23
post #20

Thanks for sharing! If you need some visualization going beyond ASCII characters, I co-developed bra-ket-vue, a quantum state & matrix visualizer in Vue.js. A working demo here: https://codesandbox.io/s/bra-ket-vue-cydtt?file=/src/compone... It uses a different engine https://github.com/Quantum-Game/quantum-tensors , supporting arbitrary quantum states, not only qubits.

Woa—this is really beautiful! I need to give this some serious thought since I’ve gone heavy on the idea of not having dependencies, not using modules, not requiring Node, etc. You’ve definitely given me something to mull over here. Well done :)

For reference, here’s some of my original reasoning: https://quantumjavascript.app/contributing.html#JavaScript_s...

Re: Show HN: Quantum JavaScript

#24

This site has such a pleasant UI, and the text output formatting is so beautiful and meticulous. It seems like a lot of small details at work here too, like the micro-UX with hover effects on a lot of these elements. Quantum anything is over my head, so I have no idea what I'm looking at, but it's really pretty at least. --- Looking through the source, a few things pop out: - Wow, this thing was made entirely in Vani…

Link to the github js for the lazy: https://github.com/stewdio/q.js/tree/master/Q

Re: Show HN: Quantum JavaScript

#25
I just want to echo what everyone has already said that this is indeed very cool in many aspects.

The API documentation is what really jumps out to me: it's an absolute joy to read, and makes me feel that the developer actually respects me as a potential user. Thank you!

Re: Show HN: Quantum JavaScript

#27
post #12

This site has such a pleasant UI, and the text output formatting is so beautiful and meticulous. It seems like a lot of small details at work here too, like the micro-UX with hover effects on a lot of these elements. Quantum anything is over my head, so I have no idea what I'm looking at, but it's really pretty at least. --- Looking through the source, a few things pop out: - Wow, this thing was made entirely in Vani…

Yeah; A real "Hello world" quantum program is randomly printing 0 or 1 without any pseudo-random generator. At the most fundamental level, the quantum-bit can be in many states, but when measured will "jump" to either 0 or 1. In that website's playground ( https://quantumjavascript.app/playground.html ), just write: H And you'll get 50% 0 and 50% 1. Now, /why/ does it jump when measured? We don't know, but physicists…

This comment is being taken way too seriously.

Re: Show HN: Quantum JavaScript

#28
post #23
post #20

Thanks for sharing! If you need some visualization going beyond ASCII characters, I co-developed bra-ket-vue, a quantum state & matrix visualizer in Vue.js. A working demo here: https://codesandbox.io/s/bra-ket-vue-cydtt?file=/src/compone... It uses a different engine https://github.com/Quantum-Game/quantum-tensors , supporting arbitrary quantum states, not only qubits.

Woa—this is really beautiful! I need to give this some serious thought since I’ve gone heavy on the idea of not having dependencies, not using modules, not requiring Node, etc. You’ve definitely given me something to mull over here. Well done :) For reference, here’s some of my original reasoning: https://quantumjavascript.app/contributing.html#JavaScript_s...

Not requiring external libraries is by large a good thing. I am not sure if I agree with other parts, though. Personally, I consider ES6 a huge improvement when it comes to code clarity and readability. It makes it easier to write, and less error-prone. Right now it is supported by major browsers, desktop and mobile: https://kangax.github.io/compat-table/es6/. I like TypeScript and stuff (https://p.migdal.pl/2020/03/02/types-tests-typescript.html), but I appreciate the no-Node philosophy (especially in the case of no dependencies).

If you want to continue developing it, I can connect you with Unitary Fund and Quantum Open Software Foundation.

...

Side note: I really appreciate the music notes analogy.

Re: Show HN: Quantum JavaScript

#29
post #25

I just want to echo what everyone has already said that this is indeed very cool in many aspects. The API documentation is what really jumps out to me: it's an absolute joy to read, and makes me feel that the developer actually respects me as a potential user. Thank you!

Thank you for the kind words. As I’m writing it I just keep thinking “How would I want to be taught this?” As another parallel rule of thumb I pretend that I’m writing to someone who is smarter than I’ll ever be but,

1. Doesn’t know anything about this particular subject yet.

2. Is probably very tired from whatever it is they’ve been doing. (Day job, raising kids, just general anxiety keeping them awake all night, etc.)

3. Might be drunk.

So I try to be plain in my language choices, calming when facing something with an aura of complexity (eg. “this thing that you heard is complex is really just a fancy name for these two simple elements combined”), consistent, and to present actual examples instead of everything just being an impenetrable brick of text.

(And then occasionally I break all my rules by throwing in hyperlinks to random tangents / hiding Missy Elliott lyrics in the code / whatevs.)

Post reply on HN