A new language for quantum computing | MIT News | Massachusetts Institute of Technology – MIT News
Time crystals. Microwaves. Diamonds. What do these three disparate things have in common?
Quantum computing. Unlike traditional computers that use bits, quantum computers use qubits to encode information as zeros or ones, or both at the same time. Coupled with a cocktail of forces from quantum physics, these refrigerator-sized machines can process a whole lot of information but theyre far from flawless. Just like our regular computers, we need to have the right programming languages to properly compute on quantum computers.
Programming quantum computers requires awareness of something called entanglement, a computational multiplier for qubits of sorts, which translates to a lot of power. When two qubits are entangled, actions on one qubit can change the value of the other, even when they are physically separated, giving rise to Einsteins characterization of spooky action at a distance. But that potency is equal parts a source of weakness. When programming, discarding one qubit without being mindful of its entanglement with another qubit can destroy the data stored in the other, jeopardizing the correctness of the program.
Scientists from MITs Computer Science and Artificial Intelligence (CSAIL) aimed to do some unraveling by creating their own programming language for quantum computing called Twist. Twist can describe and verify which pieces of data are entangled in a quantum program, through a language a classical programmer can understand. The language uses a concept called purity, which enforces the absence of entanglement and results in more intuitive programs, with ideally fewer bugs. For example, a programmer can use Twist to say that the temporary data generated as garbage by a program is not entangled with the programs answer, making it safe to throw away.
While the nascent field can feel a little flashy and futuristic, with images of mammoth wiry gold machines coming to mind, quantum computers have potential for computational breakthroughs in classically unsolvable tasks, like cryptographic and communication protocols, search, and computational physics and chemistry. One of the key challenges in computational sciences is dealing with the complexity of the problem and the amount of computation needed. Whereas a classical digital computer would need a very large exponential number of bits to be able to process such a simulation, a quantum computer could do it, potentially, using a very small number of qubits if the right programs are there.
Our language Twist allows a developer to write safer quantum programs by explicitly stating when a qubit must not be entangled with another, says Charles Yuan, an MIT PhD student in electrical engineering and computer science and the lead author on a new paper about Twist. Because understanding quantum programs requires understanding entanglement, we hope that Twist paves the way to languages that make the unique challenges of quantum computing more accessible to programmers.
Yuan wrote the paper alongside Chris McNally, a PhD student in electrical engineering and computer science who is affiliated with the MIT Research Laboratory of Electronics, as well as MIT Assistant Professor Michael Carbin. They presented the research at last week's 2022 Symposium on Principles of Programming conference in Philadelphia.
Untangling quantum entanglement
Imagine a wooden box that has a thousand cables protruding out from one side. You can pull any cable all the way out of the box, or push it all the way in.
After you do this for a while, the cables form a pattern of bits zeros and ones depending on whether theyre in or out. This box represents the memory of a classical computer. A program for this computer is a sequence of instructions for when and how to pull on the cables.
Now imagine a second, identical-looking box. This time, you tug on a cable, and see that as it emerges, a couple of other cables are pulled back inside. Clearly, inside the box, these cables are somehow entangled with each other.
The second box is an analogy for a quantum computer, and understanding the meaning of a quantum program requires understanding the entanglement present in its data. But detecting entanglement is not straightforward. You cant see into the wooden box, so the best you can do is try pulling on cables and carefully reason about which are entangled. In the same way, quantum programmers today have to reason about entanglement by hand. This is where the design of Twist helps massage some of those interlaced pieces.
The scientists designed Twist to be expressive enough to write out programs for well-known quantum algorithms and identify bugs in their implementations. To evaluate Twist's design, they modified the programs to introduce some kind of bug that would be relatively subtle for a human programmer to detect, and showed that Twist could automatically identify the bugs and reject the programs.
They also measured how well the programs performed in practice in terms of runtime, which had less than 4 percent overhead over existing quantum programming techniques.
For those wary of quantums seedy reputation in its potential to break encryption systems, Yuan says its still not very well known to what extent quantum computers will actually be able to reach their performance promises in practice. There's a lot of research that's going on in post-quantum cryptography, which exists because even quantum computing is not all-powerful. So far, there's a very specific set of applications in which people have developed algorithms and techniques where a quantum computer can outperform classical computers.
An important next step is using Twist to create higher-level quantum programming languages. Most quantum programming languages today still resemble assembly language, stringing together low-level operations, without mindfulness towards things like data types and functions, and whats typical in classical software engineering.
Quantum computers are error-prone and difficult to program. By introducing and reasoning about the purity of program code, Twist takes a big step towards making quantum programming easier by guaranteeing that the quantum bits in a pure piece of code cannot be altered by bits not in that code, says Fred Chong, the Seymour Goodman Professor of Computer Science at the University of Chicago and chief scientist at Super.tech.
The work was supported, in part, by the MIT-IBM Watson AI Lab, the National Science Foundation, and the Office of Naval Research.
Read this article:
A new language for quantum computing | MIT News | Massachusetts Institute of Technology - MIT News
- Quantum Leap or Speculative Bubble? Wall Street Bets Big on the Future of Computing - FinancialContent - October 7th, 2025 [October 7th, 2025]
- Analysts Think This Quantum Computing Stock Can Gain 80%. Should You Buy It Here? - Yahoo Finance - October 7th, 2025 [October 7th, 2025]
- IonQ and Rigetti stocks and the quantum computing bubble - Invezz - October 7th, 2025 [October 7th, 2025]
- These Quantum Computing Stocks Could Be the Secret Winners of the AI Boom - The Motley Fool - October 7th, 2025 [October 7th, 2025]
- Quantum Computing (QUBT) Shares Are Sliding Today: Here's Why - Benzinga - October 7th, 2025 [October 7th, 2025]
- This Little-Known Company Is Betting Big on Quantum Computing. Should You Buy Its Stock Here? - MSN - October 7th, 2025 [October 7th, 2025]
- Analysts Think This Quantum Computing Stock Can Gain 80%. Should You Buy It Here? - MSN - October 7th, 2025 [October 7th, 2025]
- This Little-Known Company Is Betting Big on Quantum Computing. Should You Buy Its Stock Here? - Barchart.com - October 7th, 2025 [October 7th, 2025]
- Where Will Quantum Computing Inc. Be in 1 Year? - Yahoo Finance - October 7th, 2025 [October 7th, 2025]
- Quobly reinforces its leadership with a holistic governance model for silicon quantum computing - Quantum Zeitgeist - October 7th, 2025 [October 7th, 2025]
- Quantum Computing Stock Could Rise 67%, Says Analyst. Heres Why. - Barron's - October 4th, 2025 [October 4th, 2025]
- Where Will Quantum Computing Inc. Be in 1 Year? - The Motley Fool - October 4th, 2025 [October 4th, 2025]
- Analyzing the Sharp Rise of Quantum Computing Inc. - StocksToTrade - October 4th, 2025 [October 4th, 2025]
- QUDORA closes a Strategic Partnership with Kensho to Accelerate Quantum Computing Commercialization in Taiwan - Quantum Zeitgeist - October 4th, 2025 [October 4th, 2025]
- Quantum Computing Inc. Stock (QUBT) Opinions on Recent Stock Offering and Analyst Upgrade - Quiver Quantitative - October 4th, 2025 [October 4th, 2025]
- How Quantum Computings Biggest Challenges Are Being Solved With Accelerated Computing - NVIDIA Blog - October 2nd, 2025 [October 2nd, 2025]
- Here's the Quantum Computing Stock Wall Street Loves the Most (Hint: It's Not IonQ or Rigetti) - Yahoo Finance - October 2nd, 2025 [October 2nd, 2025]
- D-Wave to Participate in Quantum Beach Conference, Highlighting Companys Leadership in the Commercialization of Quantum Computing - Yahoo Finance - October 2nd, 2025 [October 2nd, 2025]
- Quantum computing could have a major impact on investing - Business Insider - October 2nd, 2025 [October 2nd, 2025]
- Here's the Quantum Computing Stock Wall Street Loves the Most (Hint: It's Not IonQ or Rigetti) - The Motley Fool - October 2nd, 2025 [October 2nd, 2025]
- IBM and Vanguard Team Up to Build Investment Portfolios with Quantum Computing - TipRanks - October 2nd, 2025 [October 2nd, 2025]
- Connecticut to Invest $10 Million in QuantumCT for Quantum Infrastructure and Testbed Deployment - Quantum Computing Report - October 2nd, 2025 [October 2nd, 2025]
- Odra Quantum Computing School Debuts in Poland with Intensive Training and Hackathon - HPCwire - October 2nd, 2025 [October 2nd, 2025]
- Billionaires Are Piling Into a Quantum Computing Stock That Gained Over 3,700% in the Past Year - The Motley Fool - October 2nd, 2025 [October 2nd, 2025]
- Introducing CHPX: The Case For AI Semiconductors And Quantum Computing - Seeking Alpha - October 2nd, 2025 [October 2nd, 2025]
- Quantum Computing Meets Aerospace: D-Wave CEO to Reveal Real-World Optimization Solutions at Quantum Beach - Stock Titan - October 2nd, 2025 [October 2nd, 2025]
- Combination of quantum and classical computing supports early diagnosis of breast cancer - Phys.org - October 2nd, 2025 [October 2nd, 2025]
- Quantum computing to unlock over $50 billion in value across key industries, says BCG - Economy Middle East - October 2nd, 2025 [October 2nd, 2025]
- Billionaires Are Piling Into a Quantum Computing Stock That Gained Over 3,700% in the Past Year - The Globe and Mail - October 2nd, 2025 [October 2nd, 2025]
- How Quantum Computing Is Positioned to Drive Long-Term Growth - Yahoo Finance - October 2nd, 2025 [October 2nd, 2025]
- QUDORA And Norma Inc. Partner to Advance Quantum Computing Adoption in South Korea - The Quantum Insider - October 2nd, 2025 [October 2nd, 2025]
- Construction kicks off at old steel mill in South Chicago, making way for massive quantum computing campus - Chicago Sun-Times - October 2nd, 2025 [October 2nd, 2025]
- PsiQuantum breaks ground on quantum computing project in Chicago - Evertiq - October 2nd, 2025 [October 2nd, 2025]
- Harnessing the complementary power of AI and Quantum Computing - The Business Journals - October 2nd, 2025 [October 2nd, 2025]
- Quantum computing breakthrough has more red flags than a Peoples Liberation Army parade - fi-desk.com - October 2nd, 2025 [October 2nd, 2025]
- PsiQuantum breaks ground on quantum computing park at former U.S. Steel South Works mill - nwitimes.com - October 2nd, 2025 [October 2nd, 2025]
- This Quantum Computing Stock Could Be the Next Nvidia 1,000% Returns Ahead - 24/7 Wall St. - October 2nd, 2025 [October 2nd, 2025]
- Quantum computing in 2025: From sci-fi to real-world solutions - Computerworld - October 2nd, 2025 [October 2nd, 2025]
- Hanbat National University Study Finds Quantum Computing Can Make Homes Smarter And Greener - Mirage News - October 2nd, 2025 [October 2nd, 2025]
- Officials Break Ground on Quantum Computing Campus, Promise Economic Boom for South Chicago. Neighbors Want That in Writing - WTTW News - October 2nd, 2025 [October 2nd, 2025]
- Quantum Computing (QUBT) to Offer Over 26 Million Shares - GuruFocus - October 2nd, 2025 [October 2nd, 2025]
- GPT-5 Serves as Research Assistant in Proving One of Quantum Computing Theory's Trickiest Theorems - The Quantum Insider - September 30th, 2025 [September 30th, 2025]
- Meet the Monster Quantum Computing Stock That Continues to Crush Nvidia, Oracle, and Palantir - The Motley Fool - September 30th, 2025 [September 30th, 2025]
- Quantum computing: unravelling the myths - cio.com - September 30th, 2025 [September 30th, 2025]
- This Quantum Computing Stock Just Set Another Scientific Record. Should You Buy It Here? - Barchart.com - September 30th, 2025 [September 30th, 2025]
- Quantum Computing: The Quantum Play With Decades Ahead (NASDAQ:QUBT) - Seeking Alpha - September 30th, 2025 [September 30th, 2025]
- 3 Incredible Quantum Computing Stocks to Buy Amid Falling Interest Rates - Yahoo Finance - September 30th, 2025 [September 30th, 2025]
- Hebrew University Researchers Achieve Record Room-Temperature Photon Collection from Diamond Defects - Quantum Computing Report - September 30th, 2025 [September 30th, 2025]
- Quantum Computing Accurately Models Atomic Nuclei with 0.1% Error on Trapped-Ion Machine - Quantum Zeitgeist - September 30th, 2025 [September 30th, 2025]
- Solana Co-Founder Says '50/50' Chance Quantum Computing Breaks Bitcoin By 2030, Calls For Quick Action - Yahoo Finance - September 30th, 2025 [September 30th, 2025]
- Comcast Partners with Classiq and D-Wave to Test Quantum-Powered Network Traffic Management - Quantum Computing Report - September 30th, 2025 [September 30th, 2025]
- If quantum computing is answering unknowable questions, how do we know theyre right? - Technology Org - September 30th, 2025 [September 30th, 2025]
- This Unexpected Company Just Achieved a Quantum Computing Milestone. Should You Buy Its Shares Here? - Barchart.com - September 30th, 2025 [September 30th, 2025]
- IonQ Just Achieved a New Quantum Computing Milestone. Should You Buy IONQ Stock Here? - Barchart.com - September 30th, 2025 [September 30th, 2025]
- 3 Incredible Quantum Computing Stocks to Buy Amid Falling Interest Rates - Nasdaq - September 30th, 2025 [September 30th, 2025]
- WiMi's Lays out for the Research on Distributed Quantum Computing Based on Cross-Optical Network Links - Stock Titan - September 30th, 2025 [September 30th, 2025]
- Quantum computing labs: the next phase of science and tech space - Green Street News - September 30th, 2025 [September 30th, 2025]
- HSBC demonstrates worlds first-known quantum-enabled algorithmic trading with IBM - HSBC - September 28th, 2025 [September 28th, 2025]
- There's a new potential quantum computing king. How to invest in it with less risk using options - CNBC - September 28th, 2025 [September 28th, 2025]
- HSBC's quantum computing breakthrough could be the future of Wall Street - Axios - September 28th, 2025 [September 28th, 2025]
- QUDORA Closes a Strategic Partnership with Kensho to Accelerate Quantum Computing Commercialization in Taiwan - The Quantum Insider - September 28th, 2025 [September 28th, 2025]
- Why Quantum Computing Stock Stumbled This Week - The Motley Fool - September 28th, 2025 [September 28th, 2025]
- Booz Allen Hamilton (BAH): Valuation Insights After New Quantum Computing Partnership With SEEQC - simplywall.st - September 28th, 2025 [September 28th, 2025]
- QUDORA and Kensho Partner to Accelerate Quantum Computing Commercialization in Taiwan - Quantum Computing Report - September 28th, 2025 [September 28th, 2025]
- Rigetti Computing Just Got a New Street-High Price Target. Should You Buy This Winning Quantum Computer Stock Here? - Yahoo Finance - September 28th, 2025 [September 28th, 2025]
- StanChart Venture Arm Teams Up With Fujitsu on Quantum Computing - Bloomberg.com - September 25th, 2025 [September 25th, 2025]
- HSBC says quantum computing trial helps bond trading - Reuters - September 25th, 2025 [September 25th, 2025]
- HSBC Claims Quantum Computing First in Algo Bond Trading - The Full FX - September 25th, 2025 [September 25th, 2025]
- HSBC and IBM Demonstrate Quantum-Enabled Algorithmic Trading with up to 34% Improvement - Quantum Computing Report - September 25th, 2025 [September 25th, 2025]
- Quantum Computing Takes Its First Steps Into Wall Street - Quantum Zeitgeist - September 25th, 2025 [September 25th, 2025]
- IBM stock rises over 5% after quantum computing trading trials with HSBC - what's the experiment all about - The Economic Times - September 25th, 2025 [September 25th, 2025]
- Why the U.S.-U.K. Quantum Computing Pact Is Vital for the Nascent Technology - Barron's - September 23rd, 2025 [September 23rd, 2025]
- Miniaturized ion traps show promise of 3D printing for quantum-computing hardware - Tech Xplore - September 23rd, 2025 [September 23rd, 2025]
- Quantum Computing Moves from Theoretical to Inevitable - Bain & Company - September 23rd, 2025 [September 23rd, 2025]
- Who Are the Top 9 Quantum Computing Technologies Companies in 2025? - Global Growth Insights - September 23rd, 2025 [September 23rd, 2025]
- Why Is Quantum Computing Stock (QUBT) Falling Today? - TipRanks - September 23rd, 2025 [September 23rd, 2025]
- HANetf adds defence and quantum computing to tech ETF - ETF Stream - September 23rd, 2025 [September 23rd, 2025]
- BTQ Technologies Receives Approval to List on Nasdaq - Quantum Computing Report - September 23rd, 2025 [September 23rd, 2025]
- Why D-Wave Quantum Computing Stock Dropped Today - The Motley Fool - September 23rd, 2025 [September 23rd, 2025]
- Why D-Wave Quantum Computing Stock Dropped Today - Nasdaq - September 23rd, 2025 [September 23rd, 2025]