Quantum Computing in JavaScript with Q.js

Rate this content
Bookmark

Anyone can learn quantum computing! Join Stewart Smith as he describes his open-source passion project, Q.js. What exactly is a quantum computer? What's it good for? And how does Quantum JavaScript fit in? While this talk is for anyone curious about quantum computing, it will resonate particularly with coders, high school algebra survivors, and music nerds.

Stewart Smith
Stewart Smith
26 min
20 Jun, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Stuart Smith discusses his journey in virtual reality and quantum computing, highlighting his work in web VR and the creation of Quantum JavaScript. He introduces QGS, a platform for quantum tutorials and experimentation, and explains the concept of qubits and superposition. Smith also mentions Amazon Bracket, a quantum service that allows the building and running of quantum circuits on simulators or actual quantum hardware.

1. Introduction to Stuart Smith's VR Journey

Short description:

Hi, I'm Stuart Smith. I've been part of the virtual reality community for quite some time now. I got involved in web VR back when building web-based virtual reality meant asking Brandon Jones over at Google for custom builds of Chromium. I released Space Rocks, a personal tribute to Atari's 1979 classic Asteroids, but in VR, of course. I also wrote HandyJS for both recording and recognizing hand poses on the fly. I've made a lot of work outside of VR, too. I'm educated as a graphic designer and artist. I've worked as a commissioned artist and had artwork exhibited in various galleries and museums. I'm also a lifelong mediocre-to-terrible musician.

Hi, I'm Stuart Smith. Some of you folks might already know me from my dayjob. I've been part of the virtual reality community for quite some time now. Particularly the web-based VR community.

I got involved in web VR back when building web-based virtual reality meant asking Brandon Jones over at Google for custom builds of Chromium. The medium felt really fresh and exciting. And around that time, I wrote the VR controller library for 3JS. It provided an easy, generic way for your web VR app to support a bunch of different hand controllers without having to write custom code for each one. So back then, that meant, you know, the first Vive controllers, Microsoft Mixed Reality controllers, Rift Touch, Daydream, and remember Gear VR? And all that stuff.

Over at the Google Data Arts team, we used the VR controller library to power this VR music video for the band LCD Sound System. You could dance along to the song in VR, and then a recording of your dance would become part of the video itself. So shout out to our collaborators and the real stars of that project, Studio Moniker and Studio Pucky. Look them both up.

I also released Space Rocks, a personal tribute to Atari's 1979 classic Asteroids, but in VR, of course. I took my VR controller library and I added something I called multi-channel haptic feedback. Which made it super easy to add complex haptic commands to your web VR app. Like, if you wanted kickback from firing your laser, but also needed to feel the hum of your plasma engines revving up and down, well, my haptic channels approach made that a breeze. Just a few years later, Oculus upped the game by adding a hand tracking API for web-based VR. I immediately wrote HandyJS. For both recording and recognizing hand poses on the fly. So instead of just pinch gestures to select things, with HandyJS you could easily recognize the whole ASL finger spelling alphabet and then some. Finger guns was most fun, obviously. This library does not require any machine learning whatsoever. Seriously, there's no network inside of Handy, it's some k-means clustering magic. And it is wicked fast.

I've made a lot of work outside of VR, too. I started coding when I was quite young, but I'm educated as a graphic designer and artist. I didn't study computer science. I've worked as a commissioned artist, and I've had artwork exhibited in various galleries and museums. I'm also a lifelong mediocre-to-terrible musician.

2. Stuart Smith's Quantum Computing Journey

Short description:

I'm the head of consumer augmented reality at Unity, but I'm here to talk about my passion interest, quantum computing. I'm the creator of Quantum JavaScript and the founder of Open Quantum Club. QGS is a website, source code repository, drag-and-drop circuit composer interface, quantum circuit simulator, code library, API, concept primers, and a growing community of enthusiasts. I'm starting OQC, a project featuring profiles and interviews with folks in the quantum community. Stay tuned for more about that. Quantum computing is a hanging cylindrical tank, with different architectures like polarized photons, trapped ions, and superconductors.

I even enjoy writing essays occasionally, despite having no license to do so. And right now, I'm the head of consumer augmented reality at Unity. Everyone knows Unity, right? Our game engine is all about providing real-time 3D rendering for the masses. 70% of the world's mobile games are made with Unity. And we're not just 70% of mobile, we're half of all games. So if you play games, you've played something made with Unity. But I'm not here to talk about any of that. I'm here to talk about my nights and weekends' passion interest, quantum computing. I'm the creator and maintainer of Quantum JavaScript, or QGS for short. And I'm the founder of Open Quantum Club.

What is this stuff exactly? Well, let's go deep on QGS for a second. It's actually a few things at once. It's this website and the corresponding source code repository. It's this drag-and-drop circuit composer interface in particular. It's a quantum circuit simulator. So all the inner workings that allow you to run quantum circuit simulations right on your phone or laptop without having actual quantum hardware in your hands. It's that entire code library and the corresponding API. It's the concept primers that are there to help you get up to speed on quantum stuff quickly. Especially if you're like me, no real physics background, no quantum background, just a casual coder with some high school math. It turns out that's all you need to get started messing around with this stuff. It's the documentation for the qJS API as well because what good is a library if you don't know how to use it? And when you put all this stuff together, there's the small but growing community of enthusiastic folks who've also fallen in love with this ridiculous idea of fusing quantum and web browsers, cause JavaScript wasn't chaotic enough on its own already. And so for this community, I'm starting something called OQC, Open Quantum Club. This is a project that I'm spinning up right now through a website that will feature profiles and interviews with folks in the quantum community. The special focus here will be on the humanity behind the math. Who are the personalities? What are our collective hopes and dreams? So stay tuned for more about that as we head towards 2023.

And okay, that's all great, right? But what exactly is quantum computing? What even is a quantum computer? This. This is a quantum computer right here. This hanging cylindrical tank that you see. There are different sorts of quantum computer architectures, polarized photons, trapped ions, superconductors. Right now, superconducting quantum computers, like you see here, are the most popular kind.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
Do you have a large product built by many teams? Are you struggling to release often? Did your frontend turn into a massive unmaintainable monolith? If, like me, you’ve answered yes to any of those questions, this talk is for you! I’ll show you exactly how you can build a micro frontend architecture with Remix to solve those challenges.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
Remix is a web framework that gives you the simple mental model of a Multi-Page App (MPA) but the power and capabilities of a Single-Page App (SPA). One of the big challenges of SPAs is network management resulting in a great deal of indirection and buggy code. This is especially noticeable in application state which Remix completely eliminates, but it's also an issue in individual components that communicate with a single-purpose backend endpoint (like a combobox search for example).
In this talk, Kent will demonstrate how Remix enables you to build complex UI components that are connected to a backend in the simplest and most powerful way you've ever seen. Leaving you time to chill with your family or whatever else you do for fun.
Making JavaScript on WebAssembly Fast
JSNation Live 2021JSNation Live 2021
29 min
Making JavaScript on WebAssembly Fast
Top Content
JavaScript in the browser runs many times faster than it did two decades ago. And that happened because the browser vendors spent that time working on intensive performance optimizations in their JavaScript engines.Because of this optimization work, JavaScript is now running in many places besides the browser. But there are still some environments where the JS engines can’t apply those optimizations in the right way to make things fast.We’re working to solve this, beginning a whole new wave of JavaScript optimization work. We’re improving JavaScript performance for entirely different environments, where different rules apply. And this is possible because of WebAssembly. In this talk, I'll explain how this all works and what's coming next.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
As developers, we spend much of our time debugging apps - often code we didn't even write. Sadly, few developers have ever been taught how to approach debugging - it's something most of us learn through painful experience.  The good news is you _can_ learn how to debug effectively, and there's several key techniques and tools you can use for debugging JS and React apps.
Building Brain-controlled Interfaces in JavaScript
JSNation Live 2021JSNation Live 2021
27 min
Building Brain-controlled Interfaces in JavaScript
Top Content
Neurotechnology is the use of technological tools to understand more about the brain and enable a direct connection with the nervous system. Research in this space is not new, however, its accessibility to JavaScript developers is.Over the past few years, brain sensors have become available to the public, with tooling that makes it possible for web developers to experiment building brain-controlled interfaces.As this technology is evolving and unlocking new opportunities, let's look into one of the latest devices available, how it works, the possibilities it opens up, and how to get started building your first mind-controlled app using JavaScript.
Webpack in 5 Years?
JSNation 2022JSNation 2022
26 min
Webpack in 5 Years?
Top Content
What can we learn from the last 10 years for the next 5 years? Is there a future for Webpack? What do we need to do now?

Workshops on related topic

Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
React Day Berlin 2022React Day Berlin 2022
86 min
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
Top Content
WorkshopFree
Hussien Khayoon
Kahvi Patel
2 authors
Using a library might seem easy at first glance, but how do you choose the right library? How do you upgrade an existing one? And how do you wade through the documentation to find what you want?
In this workshop, we’ll discuss all these finer points while going through a general example of building a code editor using CodeMirror in React. All while sharing some of the nuances our team learned about using this library and some problems we encountered.
Testing Web Applications Using Cypress
TestJS Summit - January, 2021TestJS Summit - January, 2021
173 min
Testing Web Applications Using Cypress
WorkshopFree
Gleb Bahmutov
Gleb Bahmutov
This workshop will teach you the basics of writing useful end-to-end tests using Cypress Test Runner.
We will cover writing tests, covering every application feature, structuring tests, intercepting network requests, and setting up the backend data.
Anyone who knows JavaScript programming language and has NPM installed would be able to follow along.
Build a powerful DataGrid in few hours with Ag Grid
React Summit US 2023React Summit US 2023
96 min
Build a powerful DataGrid in few hours with Ag Grid
WorkshopFree
Mike Ryan
Mike Ryan
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
We all know that rolling our own grid solution is not easy, and let's be honest, is not something that we should be working on. We are focused on building a product and driving forward innovation. In this workshop, you'll see just how easy it is to get started with AG Grid.
Prerequisites: Basic React and JavaScript
Workshop level: Beginner
0 to Auth in an Hour Using NodeJS SDK
Node Congress 2023Node Congress 2023
63 min
0 to Auth in an Hour Using NodeJS SDK
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.JS backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.
Table of contents- A quick intro to core authentication concepts- Coding- Why passwordless matters
Prerequisites- IDE for your choice- Node 18 or higher
Build a Powerful Datagrid With AG Grid
React Summit 2024React Summit 2024
168 min
Build a Powerful Datagrid With AG Grid
WorkshopFree
Brian Love
Brian Love
Does your React app need to efficiently display lots (and lots) of data in a grid? Do your users want to be able to search, sort, filter, and edit data? AG Grid is the best JavaScript grid in the world and is packed with features, highly performant, and extensible. In this workshop, you’ll learn how to get started with AG Grid, how we can enable sorting and filtering of data in the grid, cell rendering, and more. You will walk away from this free 3-hour workshop equipped with the knowledge for implementing AG Grid into your React application.
JavaScript-based full-text search with Orama everywhere
Node Congress 2023Node Congress 2023
49 min
JavaScript-based full-text search with Orama everywhere
Workshop
Michele Riva
Michele Riva
In this workshop, we will see how to adopt Orama, a powerful full-text search engine written entirely in JavaScript, to make search available wherever JavaScript runs. We will learn when, how, and why deploying it on a serverless function could be a great idea, and when it would be better to keep it directly on the browser. Forget APIs, complex configurations, etc: Orama will make it easy to integrate search on projects of any scale.