On July 19, Google announced the release of the first full version of the open-source quantum programming framework Cirq: Cirq 1.0.
Cirq is a Python framework for writing, manipulating, and optimizing quantum circuits. It's designed for recent quantum computers with hundreds of qubits and thousands of quantum gates, and cirq 1.0 supports the vast majority of workflows for these systems, and has a stable API that Google says will only update when the major version number changes.
Cirq uses semantic versioning, which means that future point versions of Cirq will be compatible with the full version. For example, Cirq version 1.1 does not make significant changes to the Cirq interface in version 1.0; Significant changes occur only if there is a major version change, such as from 1.x to 2.0.
Cirq code example:
import cirq qubit = cirq.GridQubit(0, 0) circuit = cirq.Circuit( cirq.X(qubit)**0.5, cirq.measure(qubit, key='m') ) print("Circuit:") print(circuit) simulator = cirq.Simulator() result = simulator.run(circuit, repetitions=20) print("Results:") print(result)
A healthy community has now been built based on Cirq to support different areas of quantum computing research. These libraries include:
- TensorFlow Quantum: A tool for exploring quantum machine learning. Using TensorFlow Quantum, the researchers trained a machine learning model on 30 qubits at a rate of 1.1 petaflops per second (1.1 x 1015 operations per second).
- OpenFermion: An open source tool for chemical simulations involving quantum computing.
- Pytket ( pytkey-cirq ): An open source Python tool for optimizing and manipulating quantum circuits.
- Mitiq: An open source library developed by the non-profit Unitary Fund for error mitigation techniques developed by the non-profit Unitary Fund.
- Qsim: High-performance state vector emulator written using AVX/FMA vectorization instructions with optional GPU acceleration.
For more information about Cirq 1.0, see the Google Blog and 1.0 Release Notes.