7 ms·
All these years we had the buzzwords quantum and cloud separately. Today the buzzwords can finally merge to bring you quantum in the cloud. OMG, I predict the t
by ivan_ah 10y ago
All these years we had the buzzwords quantum and cloud separately. Today the buzzwords can finally merge to bring you quantum in the cloud. OMG, I predict the tech journalist will go crazy on this!!
A very similar quantum circuit simulator (in JS): http://www.davyw.com/quantum/?example=Grover%27s%20Algorithm http://www.davyw.com/quantum/?example=Grover%27s%20Algorithm
And now a shameless plug: If you want to learn quantum mechanics and quantum computing, you should check out my upcoming book on linear algebra: https://minireference.com/static/excerpts/noBSguide2LA_preview.pdf#page=115 https://minireference.com/static/excerpts/noBSguide2LA_previ... available via https://gum.co/noBSLA https://gum.co/noBSLA
- Strilanc 10y agoI 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 http://algorithmicassertions.com/quirk 1: https://t.co/qi12H3aVU1 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 https://github.com/Strilanc/Quirk
- wybiral 10y agoThat looks good. Yeah, mine wasn't really focused on performance so much as ease of use (being able to compile and reuse circuits). One thing I never got around to that IBM did was measurement operators. They break my simple compilation strategy but would definitely make it more useful.
- Strilanc 10y agoOh! Didn't realize you would see this. Gives me the opportunity to say thanks for the simulator. I found it really useful for learning. So useful for sanity checks. (Speaking of measurement. Quirk allows measurement... but it cheats. It refuses to let you hit measured qubits with operations that would superpose them again w.r.t. the computational basis. So the deferred measurement principle [1] applies, and there's no need to use density matrices and square the simulation cost.) 1: https://en.wikipedia.org/wiki/Deferred_Measurement_Principle https://en.wikipedia.org/wiki/Deferred_Measurement_Principle
- wybiral 10y agoHa! I feel obligated to click when I see "Try a Quantum Computer" in a title. That's an interesting strategy. I'm going to have to dig deeper when I get a chance. You said you're also using WebGL for a performance? PS: Those continuous gates are especially cool!
- Strilanc 10y agoYeah, 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; 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/GateShaders.js#L45 https://github.com/Strilanc/Quirk/blob/master/src/circuit/Ga... 2: http://bit.ly/1roNMCE http://bit.ly/1roNMCE
- ivan_ah 10y agoWow, this is awesome! The Block-sphere "spy probe" is an amazing way to show what's going on with each qubit[1]. I wish I had this when I was teaching the intro to QM course! Suggestion: add some sort of menu for import/export and links to examples. I thought there was a limit to how long a URL hash can be, but it seems even very long ones will work. [1] Of course, the local description doesn't really work for the Bell state (|00>+|11>): http://bit.ly/1rUFaos http://bit.ly/1rUFaos but still cool...
- Strilanc 10y agoThanks. The other issue with the links is that the braces keep getting cut off by sites (as happened for your link, need to include that last } for it to work). But having the URL be the save mechanism is just so darn appealing to me. I generally work around each qubit in an EPR pair appearing to be maximally mixed by conditioning the displays. Add a control to the other wire in the same column as the display, and you'll see the conditional state. Also there's the 2-qubit density matrix display.
- threatofrain 10y agoPerhaps I just had an odd copy, but I'd note that perhaps you might wish to have slightly darker ink for this book.
- ivan_ah 10y agoDid you get the print version from amazon? Or a bookstore? I've found the amazon print-on-demand quality to be stuck in "economode" sometimes. I personally recommend people to purchase from lulu because the print quality there is more consistent, though they too make mistakes sometimes. Send me an email if the greyness bothers you—I'll be happy to send you a replacement copy from lulu, say when v6 comes out (no major changes; just more exercises because some people complained the onboarding was too hard for beginners).
- tacone 10y ago> quantum in the cloud You probably mean Quantum DevOps.
- fudged71 10y agoI'm looking for a technical cofounder with at least 10 years experience in Quantum DevOps
- Bombthecat 10y agoThere is a 40% chance that you updated the code to the newest version. Quantum ops you are never sure.
- warmwaffles 10y agoOh interesting, I will take a look at the sample book for a bit and see if this is something that I will buy. Been needing to relearn linear algebra for some time now.
- ivan_ah 10y agoYes, LA is definitely worth relearning. I had a great time writing it since it was a chance for me to review a lot of material. Even more fun was writing about the numerous applications, in the end about 1/3 of the book is on applications[0]. Before you commit to reading 500 pages of intense math, you could probably get a lot of reviewing done with the short tutorial on LA[1]. [0] https://minireference.com/blog/linear-algebra-book-alpha-release/ https://minireference.com/blog/linear-algebra-book-alpha-rel... [1] http://minireference.com/static/tutorials/linear_algebra_in_4_pages.pdf http://minireference.com/static/tutorials/linear_algebra_in_...
- warmwaffles 10y agoWill definitely check those out. Already bought the book. I like the writing style. Definitely easier to read than my college text books.
- gorkemyurt 10y agoI learned almost everything from chapter 1-9 including Fourier analysis at school. don't really know anything about chapter 10 (quantum mechanics). I work for amazon now so that the other buzzword cloud is taken care of.. Damn I was I chapter away from becoming a quantum cloud engineer.