Hacker News new | past | comments | ask | show | jobs | submit login
Exploring Quantum Computing with JavaScript: A Beginner's Guide (medium.com/yourfuse)
53 points by ingen0s on Dec 8, 2023 | hide | past | favorite | 13 comments



This is not a very good explanation, nor is it useful for anything.

A single qubit is not useful for computation and the way it is written doesn't generalize to more than a single qubit. The code doesn't even really simulate a single qubit properly, since it doesn't use complex numbers.

What they call a "Rydberg gate" is not a gate at all.

Most of the text feels like it's written by an AI.


Yeah this is closer to simulating a classical coin (albeit one with three sides) than a qubit.


An alternative to this that also runs in the browser is the Azure Quantum katas at https://quantum.microsoft.com/en-us/experience/quantum-katas. It has an introduction to quantum computing concepts with exercises in Q# you can evaluate in the browser, as well as a quantum focused Copilot you can use with login.

(Full disclosure: I work on the team that builds the developer tools for Q#)


Hi Stefan. I use the Q# playground a lot, it's very convenient so thank you sir

https://microsoft.github.io/qsharp/


Hi Austin, nice to see you on here! Glad you find it useful. If you want to try out the VSCode.dev experience too, check out https://vscode.dev/quantum/playground/. Let us know what you think!


This tutorial [1] shows you how to simulate an arbitrary number of qubits and arbitrary quantum gates of arbitrary dimension in about 150 lines of code. The article uses Common Lisp but has ports to OCaml, Rust, and Python.

[1] https://www.stylewarning.com/posts/quantum-interpreter/


Excitement after Darpas Q circuit breakthrough, just added a Rydberg gate to this JavaScrip Qubit class simulator. Soo much fun! Try it out! More coming soon!


Thanks. This seems like the friendliest introduction to quantum computing I have seen.

Is it accurate? I though quantum mechanics needed complex numbers?


In general quantum mechanics requires complex numbers, in general quantum mechanics also requires more than a single qubit as well.

This is a very simplistic (maybe minimal) example.


Want to connect to p5.js for qreative computing


Doesn’t seem to compute anything useful though


At least that part is realistic.


There are very few useful quantum algorithms, especially ones that don't include significant classical computing




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: