Cirq | |
Programming Language: | Python |
Developers: | quantumlib |
License: | Apache license |
Website: | GitHub |
Cirq is an open-source framework for noisy intermediate scale quantum (NISQ) computers.[1]
Cirq was developed by the Google AI Quantum Team, and the public alpha was announced at the International Workshop on Quantum Software and Quantum Machine Learning on July 18, 2018. A demo by QC Ware showed an implementation of QAOA solving an example of the maximum cut problem being solved on a Cirq simulator.[2]
Quantum programs in Cirq are represented by "Circuit" which is made up of a series of "Moments" representing slices of quantum gates that should be applied at the same time.[3] The programs can be executed on local simulators[4] or against hardware supplied by IonQ, Pasqal,[5] Rigetti, and Alpine Quantum Technologies[6]
The following example shows how to create and measure a Bell state in Cirq.
qubit0 = cirq.GridQubit(0, 0)qubit1 = cirq.GridQubit(0, 1)
circuit = cirq.Circuit.from_ops(cirq.H(qubit0), cirq.CNOT(qubit0, qubit1), cirq.measure(qubit0, key="m0"), cirq.measure(qubit1, key="m1"))
Printing the circuit displays its diagram
Simulating the circuit repeatedly shows that the measurements of the qubits are correlated.
OpenFermion is a library that compiles quantum simulation algorithms to Cirq.[7]
TensorFlow Quantum is an extension of TensorFlow that allows TensorFlow to be used to explore hybrid classical-quantum machine learning algorithms.[8]
ReCirq is a repository of research projects done using Cirq.[9]
Qsim is a high performance wave function simulator that leverages gate fusing, AVS/FMA instructions, and OpenMP to achieve fast simulation rates. Qsimcirq allows one to use qsim from within Cirq.[10]