How CQC’s Tket compiler advances Quantum Computing

John M Potter
The Journal of Quantum Resistance
4 min readApr 3, 2022

As a quantum computer compiler, tket helps to improve quantum computing capabilities by optimizing quantum circuit operations. Its capacity to facilitate qubit entanglements has the added benefit of making it architecture-sensitive/hardware-agnostic. Given its versatility, tket will prove to be an indispensable tool for advancing quantum computer development.

Unlike classical computers, quantum computers encode data as quantum bits (qubits) rather than classical (binary) bits. Since qubits encode data as one, zero, or some intermediate state, each new qubit exponentially increases a quantum computer’s computational power.

However, performing quantum calculations requires controlling these intermediate states. Doing so begins with drawing abstract circuit diagrams to represent qubits and the operations that will be performed on them.

Unfortunately, circuit diagrams are somewhat limited in their capacity to represent quantum behavior. So quantum scientists are using quantum compilers like tket (pronounced ‘ticket’, written as t|ket>) to render their conceptualized circuit operations into a highly optimized reality.

In quantum computing, the notion of a compiler differs only slightly from those associated with classical computing. Whereas conventional compilers convert programming into processor operations, quantum compilers optimize the input (instructions received for a quantum device.

Created by Cambridge Quantum Computing (CQC), a tket compiler allows developers to write quantum programs in a variety of input formats and languages. It then automatically translates these programs to whatever format/language is supported by the quantum device.

According to Dr. Mark Jackson, Scientific Lead at Cambridge Quantum Computing, tket can be indispensable for creating a quantum computer program.

Right now we have sort of this hodgepodge of all these different approaches being used by different hardware vendors. So it’s actually kind of a hassle because they all speak different languages. You can write a language which will work on one but if you wanted to port it to another platform you would have to completely rewrite it. Tketworks with all the standard programming languages already. So you write your program and then it compiles it… and then it will implement it on the platform of your choice. So there’s simply one line in your program explaining which platform that you want to run it on. Now if you change your mind and you want to move from, say, Google to IBM, you simply change that one line and you don’t need to worry about all of the details, all of the architecture, and the number of qubits, and the coherence time in. All of these details of the different platforms are taken care of for you.

Given that tket is hardware-agnostic, it’s primed to help developers more easily experiment with different back ends. And as a consequence, they will readily adapt to advances in quantum hardware along the way (as they invariably future-proof their development process).

As noted above, a tket compiler can rewrite human-conceptualized circuit operations to make them more compact and efficient. In brief, the software finds ways to mathematically shorten the structure of quantum circuits.

Since optimized circuits operate at a faster rate, this capability eliminates the noise and errors that accumulate during compiling. This in turn helps to improve a quantum computer’s calculation results.

As an added bonus, tket also optimizes quantum circuit operations by facilitating qubit communication (i.e. qubit entanglement). At present, quantum computing devices only allow qubits to speak to their nearest neighbor. Hence, these devices must enable swap operations to occur between qubits to achieve qubit entanglement.

Given that tket is exceptionally efficient at conducting swap operations, its routing library can automatically add swaps to a quantum circuit as needed (and without excessive error corrections). It’s this capability that enables tket to claim that it’s hardware agnostic ‘ (or “architecture-sensitive”).

Finally, tket’s capacity to minimize qubit swap operations reduces quantum circuit depth and gate counts. To showcase how this added efficiency might impact a real-world application, CQC points to the radical reductions in quantum resource requirements achieved for certain quantum chemistry calculations.

Implementing tket is fairly standard, as users can employ pip install and python for installation purposes. Pyt|ket is the python module for interfacing with CQC’s tket. It provides users with several libraries and a variety of qubit commands. These commands can integrate with standard front ends like Google’s Cirq and IBM’s Qiskit.

Cambridge Quantum Computing ( CQC) released its latest version of tket last fall. According to the company’s press release, the latest version…

  • enhances circuit optimization and noise mitigation techniques.
  • supports additional devices, simulators, and frameworks.
  • extends operating systems support (Microsoft Windows, Linux, macOS).
  • provides greater support for Qiskit, IBM’s open-source framework for quantum computing.

Quantum computing fans can learn more about the tket compiler on the CQC website.

--

--

John M Potter
The Journal of Quantum Resistance

Content Writer on Blockchain Technology and Quantum Computing. Open to freelance, reach me at johnpotterGR @gmail.com. Check out my crypto magazines