Quantum Computing in JavaScript with Q.js

Rate this content
Bookmark
The video explores the intersection of quantum computing and JavaScript through Quantum JavaScript (QJS). It simplifies quantum programming by enabling users to write quantum programs on their laptops and run them remotely on real quantum hardware. The talk emphasizes that QJS is purely software, requiring no prior knowledge of quantum physics. Users can build and simulate quantum circuits using a drag-and-drop interface or JavaScript code, making quantum computing accessible to everyone. The video also introduces Open Quantum Club (OQC), a community project featuring profiles and interviews with quantum enthusiasts. Additionally, it highlights the use of Amazon Braket for running quantum circuits on simulators or actual quantum hardware. The speaker, known for his work in VR, created QJS to make quantum computing approachable for developers and tech enthusiasts.

From Author:

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.

This talk has been presented at JSNation 2022, check out the latest edition of this JavaScript Conference.

FAQ

Stuart Smith is a prominent figure in the virtual reality community, known for his contributions to web-based VR projects and libraries like the VR controller library for 3JS and HandyJS. He is also the head of consumer augmented reality at Unity and the creator of Quantum JavaScript (QGS).

The VR controller library for 3JS, created by Stuart Smith, provides an easy and generic way for web VR apps to support various hand controllers, including Vive controllers, Microsoft Mixed Reality controllers, Rift Touch, Daydream, and Gear VR.

HandyJS is a library created by Stuart Smith that allows for recording and recognizing hand poses on the fly in web-based VR applications. It supports the ASL finger spelling alphabet and does not require any machine learning.

Quantum JavaScript (QGS) is an open-source project created by Stuart Smith. It is a quantum circuit simulator with a drag-and-drop circuit composer interface, designed to run quantum circuit simulations on regular devices without the need for actual quantum hardware.

Open Quantum Club (OQC) is a community project initiated by Stuart Smith that features profiles and interviews with people in the quantum computing community, focusing on the human stories behind the mathematical and scientific aspects.

A quantum computer is a type of computing device that uses quantum bits (qubits) to perform computations. These computers often require extremely cold temperatures to function and are capable of solving complex problems faster than classical computers by leveraging quantum mechanics.

You can use Quantum JavaScript (QGS) through its interactive website, which includes tutorials, API documentation, and a playground for experimenting with quantum circuits. The library supports both drag-and-drop and code-based circuit creation.

QGS allows users to build quantum circuits using a drag-and-drop interface or through JavaScript code. These circuits can be simulated directly in the browser, and for more advanced use cases, QGS can interface with cloud-based quantum hardware through services like Amazon Braket.

Stuart Smith has worked on various projects outside of VR, including Space Rocks, a VR tribute to Atari's Asteroids, and has also engaged in graphic design, commissioned art, and music. He is currently focused on quantum computing and the development of Quantum JavaScript (QGS).

You can learn more about Quantum JavaScript (QGS) by visiting the official website at quantumjavascript.app, which includes detailed documentation, tutorials, and links to the GitHub repository for the project.

Stewart Smith
Stewart Smith
26 min
20 Jun, 2022

Comments

Sign in or register to post your comment.

Video Transcription

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
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Making JavaScript on WebAssembly Fast
JSNation Live 2021JSNation Live 2021
29 min
Making JavaScript on WebAssembly Fast
Top Content
WebAssembly enables optimizing JavaScript performance for different environments by deploying the JavaScript engine as a portable WebAssembly module. By making JavaScript on WebAssembly fast, instances can be created for each request, reducing latency and security risks. Initialization and runtime phases can be improved with tools like Wiser and snapshotting, resulting in faster startup times. Optimizing JavaScript performance in WebAssembly can be achieved through techniques like ahead-of-time compilation and inline caching. WebAssembly usage is growing outside the web, offering benefits like isolation and portability. Build sizes and snapshotting in WebAssembly depend on the application, and more information can be found on the Mozilla Hacks website and Bike Reliance site.
Building Brain-controlled Interfaces in JavaScript
JSNation Live 2021JSNation Live 2021
27 min
Building Brain-controlled Interfaces in JavaScript
Top Content
Learn how to build brain-controlled interfaces using JavaScript and brain sensors. Understand the functions of different parts of the brain and how they relate to sensor placement. Explore examples of calm and focus detection, as well as the Kinesis API for mental commands. Discover the applications of brain-controlled interfaces, such as scrolling web pages and password-less authentication. Understand the limits and opportunities of brain control and the potential for using brain sensors in medical applications.
Webpack in 5 Years?
JSNation 2022JSNation 2022
26 min
Webpack in 5 Years?
Top Content
In the last 10 years, Webpack has shaped the way we develop web applications by introducing code splitting, co-locating style sheets and assets with JavaScript modules, and enabling bundling for server-side processing. Webpack's flexibility and large plugin system have also contributed to innovation in the ecosystem. The initial configuration for Webpack can be overwhelming, but it is necessary due to the complexity of modern web applications. In larger scale applications, there are performance problems in Webpack due to issues with garbage collection, leveraging multiple CPUs, and architectural limitations. Fixing problems in Webpack has trade-offs, but a rewrite could optimize architecture and fix performance issues.

Workshops on related topic

Master JavaScript Patterns
JSNation 2024JSNation 2024
145 min
Master JavaScript Patterns
Featured Workshop
Adrian Hajdin
Adrian Hajdin
During this workshop, participants will review the essential JavaScript patterns that every developer should know. Through hands-on exercises, real-world examples, and interactive discussions, attendees will deepen their understanding of best practices for organizing code, solving common challenges, and designing scalable architectures. By the end of the workshop, participants will gain newfound confidence in their ability to write high-quality JavaScript code that stands the test of time.
Points Covered:
1. Introduction to JavaScript Patterns2. Foundational Patterns3. Object Creation Patterns4. Behavioral Patterns5. Architectural Patterns6. Hands-On Exercises and Case Studies
How It Will Help Developers:
- Gain a deep understanding of JavaScript patterns and their applications in real-world scenarios- Learn best practices for organizing code, solving common challenges, and designing scalable architectures- Enhance problem-solving skills and code readability- Improve collaboration and communication within development teams- Accelerate career growth and opportunities for advancement in the software industry
Integrating LangChain with JavaScript for Web Developers
React Summit 2024React Summit 2024
92 min
Integrating LangChain with JavaScript for Web Developers
Featured Workshop
Vivek Nayyar
Vivek Nayyar
Dive into the world of AI with our interactive workshop designed specifically for web developers. "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" offers a unique opportunity to bridge the gap between AI and web development. Despite the prominence of Python in AI development, the vast potential of JavaScript remains largely untapped. This workshop aims to change that.Throughout this hands-on session, participants will learn how to leverage LangChain—a tool designed to make large language models more accessible and useful—to build dynamic AI agents directly within JavaScript environments. This approach opens up new possibilities for enhancing web applications with intelligent features, from automated customer support to content generation and beyond.We'll start with the basics of LangChain and AI models, ensuring a solid foundation even for those new to AI. From there, we'll dive into practical exercises that demonstrate how to integrate these technologies into real-world JavaScript projects. Participants will work through examples, facing and overcoming the challenges of making AI work seamlessly on the web.This workshop is more than just a learning experience; it's a chance to be at the forefront of an emerging field. By the end, attendees will not only have gained valuable skills but also created AI-enhanced features they can take back to their projects or workplaces.Whether you're a seasoned web developer curious about AI or looking to expand your skillset into new and exciting areas, "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" is your gateway to the future of web development. Join us to unlock the potential of AI in your web projects, making them smarter, more interactive, and more engaging for users.
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.
React Server Components Unleashed: A Deep Dive into Next-Gen Web Development
React Day Berlin 2023React Day Berlin 2023
149 min
React Server Components Unleashed: A Deep Dive into Next-Gen Web Development
Workshop
Maurice de Beijer
Maurice de Beijer
Get ready to supercharge your web development skills with React Server Components! In this immersive, 3-hour workshop, we'll unlock the full potential of this revolutionary technology and explore how it's transforming the way developers build lightning-fast, efficient web applications.
Join us as we delve into the exciting world of React Server Components, which seamlessly blend server-side rendering with client-side interactivity for unparalleled performance and user experience. You'll gain hands-on experience through practical exercises, real-world examples, and expert guidance on how to harness the power of Server Components in your own projects.
Throughout the workshop, we'll cover essential topics, including:- Understanding the differences between Server and Client Components- Implementing Server Components to optimize data fetching and reduce JavaScript bundle size- Integrating Server and Client Components for a seamless user experience- Strategies for effectively passing data between components and managing state- Tips and best practices for maximizing the performance benefits of React Server Components
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