Scientists at MIT’s Computer Science and Artificial Intelligence (CSAIL) have developed a new programming language for quantum computing – Twist, specifically designed to solve the data entanglement problem, which could help developers reduce errors and improve data quality.
Unlike traditional computers that use bits, quantum computers use quantum bits to encode information as 0 or 1, or both. traditional programming languages are not applicable to quantum computers, which require an appropriate programming language for developers to take advantage of their capabilities. Programming a quantum computer requires an understanding of something called “entanglement,” which is a computational multiplier for various quantum bits, which can be converted into powerful energy.
Twist is able to describe and verify which data are entangled in a quantum program, in a language that programmers can understand. This language uses a concept called “purity”, which forces the absence of entanglement and produces a more intuitive program, ideally with fewer errors. For example, a programmer can use Twist to indicate that the temporary data generated by the program as garbage is not entangled with the program’s answer and can thus be safely discarded.
Charles Yuan, a Ph.D. student in electrical engineering and computer science at MIT and the lead author of a Twist-related paper, Charles Yuan says, “Our language Twist allows developers to write safer quantum programs by specifying when one quantum bit must not be entangled with another quantum bit. Because understanding quantum programs requires understanding entanglement, we hope Twist paves the way for a language that makes it easier for programmers to tackle the unique challenges from quantum computing.”
According to the presentation, Twist is expressive enough to write programs for well-known quantum algorithms and identify errors in their implementation. To evaluate Twist’s design, MIT scientists modified the program to introduce errors that would be relatively subtle to human programmers and showed that Twist could automatically recognize these errors and reject the programs. by merging Twist, the MIT researchers say, the running time of programs running on quantum computers increased by only 4 percent.
For its part, MIT notes that the next important thing is to use Twist to create a higher-level quantum programming language. “Most quantum programming languages today still resemble assembly languages, stringing together low-level operations and not paying attention to things like data types and functions, as well as what is typical in classical software engineering.”
Quantum computers are error-prone and difficult to program, according to Seymour Goodman Professor of Computer Science at the University of Chicago and Fred Chong, chief scientist at Super.tech. By introducing and reasoning about the purity of program code, Twist takes a big step toward simplifying quantum programming by ensuring that quantum bits in pure code are not altered by bits that are not in that code.