HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Strilanc
Quirk
JavaScript2016–2018
Strilanc / Quirk

Quirk

A drag-and-drop quantum circuit simulator that runs in your browser. A toy for exploring and understanding small quantum circuits.

4Distinct people
7Mentions
0Explicit recommenders
1.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A drag-and-drop quantum circuit simulator that runs in your browser. A toy for exploring and understanding small quantum circuits.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month7 dated mentions

Observed mentions: 2016-05-04 15:44:15 UTC to 2018-12-29 01:42:45 UTC.

01232016-05-01 00:00:00 UTC to 2016-06-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 commentsMay 20162016-06-01 00:00:00 UTC to 2016-07-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2016-07-01 00:00:00 UTC to 2016-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-08-01 00:00:00 UTC to 2016-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-09-01 00:00:00 UTC to 2016-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-10-01 00:00:00 UTC to 2016-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-11-01 00:00:00 UTC to 2016-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-12-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2017-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-02-01 00:00:00 UTC to 2017-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-03-01 00:00:00 UTC to 2017-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-01 00:00:00 UTC to 2017-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-01 00:00:00 UTC to 2017-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-01 00:00:00 UTC to 2017-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-07-01 00:00:00 UTC to 2017-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-08-01 00:00:00 UTC to 2017-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 20172017-09-01 00:00:00 UTC to 2017-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-10-01 00:00:00 UTC to 2017-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-11-01 00:00:00 UTC to 2017-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-12-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2018-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-02-01 00:00:00 UTC to 2018-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-03-01 00:00:00 UTC to 2018-04-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments2018-04-01 00:00:00 UTC to 2018-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-05-01 00:00:00 UTC to 2018-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-06-01 00:00:00 UTC to 2018-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-07-01 00:00:00 UTC to 2018-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-08-01 00:00:00 UTC to 2018-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-09-01 00:00:00 UTC to 2018-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-01 00:00:00 UTC to 2018-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-11-01 00:00:00 UTC to 2018-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-12-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 2018

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
May 20162016-05-01 00:00:00 UTC2016-06-01 00:00:00 UTC303
Jun 20162016-06-01 00:00:00 UTC2016-07-01 00:00:00 UTC101
Jul 20162016-07-01 00:00:00 UTC2016-08-01 00:00:00 UTC000
Aug 20162016-08-01 00:00:00 UTC2016-09-01 00:00:00 UTC000
Sep 20162016-09-01 00:00:00 UTC2016-10-01 00:00:00 UTC000
Oct 20162016-10-01 00:00:00 UTC2016-11-01 00:00:00 UTC000
Nov 20162016-11-01 00:00:00 UTC2016-12-01 00:00:00 UTC000
Dec 20162016-12-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
Jan 20172017-01-01 00:00:00 UTC2017-02-01 00:00:00 UTC000
Feb 20172017-02-01 00:00:00 UTC2017-03-01 00:00:00 UTC000
Mar 20172017-03-01 00:00:00 UTC2017-04-01 00:00:00 UTC000
Apr 20172017-04-01 00:00:00 UTC2017-05-01 00:00:00 UTC000
May 20172017-05-01 00:00:00 UTC2017-06-01 00:00:00 UTC000
Jun 20172017-06-01 00:00:00 UTC2017-07-01 00:00:00 UTC000
Jul 20172017-07-01 00:00:00 UTC2017-08-01 00:00:00 UTC000
Aug 20172017-08-01 00:00:00 UTC2017-09-01 00:00:00 UTC000
Sep 20172017-09-01 00:00:00 UTC2017-10-01 00:00:00 UTC000
Oct 20172017-10-01 00:00:00 UTC2017-11-01 00:00:00 UTC000
Nov 20172017-11-01 00:00:00 UTC2017-12-01 00:00:00 UTC000
Dec 20172017-12-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
Jan 20182018-01-01 00:00:00 UTC2018-02-01 00:00:00 UTC000
Feb 20182018-02-01 00:00:00 UTC2018-03-01 00:00:00 UTC000
Mar 20182018-03-01 00:00:00 UTC2018-04-01 00:00:00 UTC220
Apr 20182018-04-01 00:00:00 UTC2018-05-01 00:00:00 UTC000
May 20182018-05-01 00:00:00 UTC2018-06-01 00:00:00 UTC000
Jun 20182018-06-01 00:00:00 UTC2018-07-01 00:00:00 UTC000
Jul 20182018-07-01 00:00:00 UTC2018-08-01 00:00:00 UTC000
Aug 20182018-08-01 00:00:00 UTC2018-09-01 00:00:00 UTC000
Sep 20182018-09-01 00:00:00 UTC2018-10-01 00:00:00 UTC000
Oct 20182018-10-01 00:00:00 UTC2018-11-01 00:00:00 UTC000
Nov 20182018-11-01 00:00:00 UTC2018-12-01 00:00:00 UTC000
Dec 20182018-12-01 00:00:00 UTC2019-01-01 00:00:00 UTC101

What Hacker News says

7 sources
Cool they made a custom edition of a quantum circuit simulator that introduces concepts one by one. It's based on this general purpose QC simulator https://github.com/Strilanc/Quirk#examples (check the animated gif demo; very powerful stuff) Lol... with V8 and SpiderMonkey getting faster and faster, quantum computing simulations in js are probably as powerful as anything that can be done in a lab these days ;)
In The Quantum Quest
Yes, that's one of the things I plan to do [1]. (You can copy individual gate parts by holding shift as you grab them. I'm considering adding ctrl as a another modifier, meaning 'grab the whole column'. I understand that these modifiers are not discoverable.) (At the moment, when I want to make a really large repetitive circuit, I copy the URL into a text editor and do my copy pasting there. I understand that it would be totally ridiculous to expect users to do that.) 1: https://github.com/Strilanc/Quirk/issues/148
In My Quantum Circuit Simulator: Quirk
Yeah, using the GPU makes a huge difference. It's also incredibly finicky because the hardware and browser support varies so much. Basically I represent an n-qubit superposition as a 2^(n/2) x 2^(n/2) texture with each pixel being an amplitude (with red=real, blue=imaginary components). Then I use fragment shaders to operate on all the pixels in parallel when applying a gate. For example, here's the GLSL in the main method of the "UniversalNot" gate's shader [1]: vec2 xy = gl_FragCoord.xy - vec2(0.5, 0.5); float state = xy.y * outputWidth + xy.x; float hasBit = mod(floor(state / bit), 2.0); float partnerState = state + bit * (1.0 - 2.0 * hasBit); vec2 uv = uvFor(state); vec2 partnerUv = uvFor(partnerState); float control = texture2D(controlTexture, uv).x; vec2 val = vec4(texture2D(inputTexture, uv)).xy;
Read the rest
vec2 partnerVal = vec4(texture2D(inputTexture, partnerUv)).xy; vec2 outUncontrolled = vec2(partnerVal.x, -partnerVal.y) * (1.0 - 2.0*hasBit); vec2 outVal = (1.0 - control) * val + control * outUncontrolled; gl_FragColor = vec4(outVal.x, outVal.y, 0.0, 0.0); (The UniversalNot gate isn't possible in reality, but it's easy to implement in the simulator. So I have it implemented, but hidden away. You have to manually tweak the URL to contain a "__unstable__UniversalNot" gate to use it. But then you can use it for FTL communication shenanigans. [2]) 1: https://github.com/Strilanc/Quirk/blob/master/src/circuit/Ga... 2: http://bit.ly/1roNMCE
In IBM Wants Everyone to Try a Quantum Computer
I have my own shameless plug to add. Another drag-and-drop quantum circuit simulator that runs in your browser is "Quirk" [0]. Quirk is faster than Davy's simulator thanks to webgl. It calculates varying operations on up to 16 qubits in real time as you drag gates around. It also lets you drop inline state displays into the circuit. Plus you can link to circuits, though the links can be a bit long so you may want to do so indirectly [1]. That being said, Quirk lacks the ability to compile circuits into a gate. Also it doesn't have a QFT gate (yet). I'm working on it. [2]. 0: http://algorithmicassertions.com/quirk 1: https://t.co/qi12H3aVU1 (6-qubit grover circuit with displays, near the getting-laggy limit in terms of op-count) 2: https://github.com/Strilanc/Quirk
In IBM Wants Everyone to Try a Quantum Computer

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.