MMS • Sergio De Simone
After over four years in development, Google open source quantum programming framework Cirq has reached stability and established itself as the lingua franca that Google engineers use to write quantum programs for Google’s own quantum processors.
The significance of the 1.0 release is that Cirq has support for the vast majority of workflows for these systems and is considered to be a stable API that we will only update with breaking changes at major version numbers.
This means that future point releases, e.g., 1.1, will be compatible with its base major version, e.g, 1.0. New major releases, e.g., 2.0, is where breaking changes could occur.
Cirq is aimed at today’s noisy intermediate-scale quantum computers, sporting a few hundred qubits and few thousands of quantum gates at most. According to Google, current quantum computers require dealing with the details of their hardware configuration to achieve state-of-the-art results, which accounts for the kind of abstractions the framework provides.
This means, for example, that Cirq enables specifying the mapping between the algorithm and the hardware, providing fine-grained control down to the gate level, as well as dealing with specific processor constraints, which could result in faulty computations when not addressed correctly. A Cirq program, also known as a circuit, is a collection of moments. Each moment is a collection of simultaneous operations, where each operation is the result of applying a gate to a disjoint subset of the available qubits.
Since its introduction in 2018, Cirq has been extended through a number of libraries exploring quantum computing research areas, including TensorFlow Quantum, OpenFermion, Pytket, and others. In particular, TensorFlow Quantum has been used to train a machine learning model on 30 qubits at a rate of 1.1 petaflops per second. OpenFermion instead is a library for compiling and analyzing quantum algorithms to simulate fermionic systems, including quantum chemistry.
As a last remark, Cirq has gained support with several quantum computing cloud services, including AQT, IonQ, Pascal, Rigetti, and Azure Quantum, which enable running Cirq programs on their hardware, says Google.
If you do not have a quantum processor available, you could experiment with Cirq using Google Quantum Virtual Machine, a Colab notebook that emulates a Google quantum processor. Currently, the tool can emulate two of Google’s processors: Weber and Rainbow. The Google Quantum Virtual Machine can also be supercharged to run in Google Cloud in case additional emulation power is required.