Cirq

Last updated
Cirq
Developers quantumlib
Implementation language Python
License Apache license
Website GitHub

Cirq is an open-source framework for noisy intermediate scale quantum (NISQ) computers. [1]

Contents

History

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. [2] A demo by QC Ware showed an implementation of QAOA solving an example of the maximum cut problem being solved on a Cirq simulator. [3]

Usage

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. [4] The programs can be executed on local simulators [5] or against hardware supplied by IonQ, Pasqal, [6] Rigetti, and Alpine Quantum Technologies [7]

The following example shows how to create and measure a Bell state in Cirq.

importcirq# Pick qubitsqubit0=cirq.GridQubit(0,0)qubit1=cirq.GridQubit(0,1)# Create a circuitcircuit=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

print(circuit)# prints# (0, 0): ───H───@───M('m0')───#                │# (0, 1): ───────X───M('m1')───

Simulating the circuit repeatedly shows that the measurements of the qubits are correlated.

simulator=cirq.Simulator()result=simulator.run(circuit,repetitions=5)print(result)# prints# m0=11010# m1=11010

Projects

OpenFermion

OpenFermion is a library that compiles quantum simulation algorithms to Cirq. [2]

TensorFlow Quantum

TensorFlow Quantum is an extension of TensorFlow that allows TensorFlow to be used to explore hybrid classical-quantum machine learning algorithms. [8]

ReCirq

ReCirq is a repository of research projects done using Cirq. [9]

Qsim Cirq

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]

Related Research Articles

<span class="mw-page-title-main">BQP</span> Computational complexity class of problems

In computational complexity theory, bounded-error quantum polynomial time (BQP) is the class of decision problems solvable by a quantum computer in polynomial time, with an error probability of at most 1/3 for all instances. It is the quantum analogue to the complexity class BPP.

<span class="mw-page-title-main">Quantum computing</span> Technology that uses quantum mechanics

A quantum computer is a computer that takes advantage of quantum mechanical phenomena.

Quantum programming is the process of designing or assembling sequences of instructions, called quantum circuits, using gates, switches, and operators to manipulate a quantum system for a desired outcome or results of a given experiment. Quantum circuit algorithms can be implemented on integrated circuits, conducted with instrumentation, or written in a programming language for use with a quantum computer or a quantum processor.

<span class="mw-page-title-main">Quantum simulator</span> Simulators of quantum mechanical systems

Quantum simulators permit the study of a quantum system in a programmable fashion. In this instance, simulators are special purpose devices designed to provide insight about specific physics problems. Quantum simulators may be contrasted with generally programmable "digital" quantum computers, which would be capable of solving a wider class of quantum problems.

<span class="mw-page-title-main">Quantum machine learning</span> Interdisciplinary research area at the intersection of quantum physics and machine learning

Quantum machine learning is the integration of quantum algorithms within machine learning programs.

IBM Quantum Platform is an online platform allowing public and premium access to cloud-based quantum computing services provided by IBM. This includes access to a set of IBM's prototype quantum processors, a set of tutorials on quantum computation, and access to an interactive textbook. As of February 2021, there are over 20 devices on the service, six of which are freely available for the public. This service can be used to run algorithms and experiments, and explore tutorials and simulations around what might be possible with quantum computing.

Cloud-based quantum computing is the invocation of quantum emulators, simulators or processors through the cloud. Increasingly, cloud services are being looked on as the method for providing access to quantum processing. Quantum computers achieve their massive computing power by initiating quantum physics into processing power and when users are allowed access to these quantum-powered computers through the internet it is known as quantum computing within the cloud.

In quantum computing, quantum supremacy or quantum advantage is the goal of demonstrating that a programmable quantum computer can solve a problem that no classical computer can solve in any feasible amount of time, irrespective of the usefulness of the problem. The term was coined by John Preskill in 2012, but the concept dates to Yuri Manin's 1980 and Richard Feynman's 1981 proposals of quantum computing.

<span class="mw-page-title-main">Rigetti Computing</span> American quantum computing company

Rigetti Computing, Inc. is a Berkeley, California-based developer of quantum integrated circuits used for quantum computers. The company also develops a cloud platform called Forest that enables programmers to write quantum algorithms.

Open Quantum Assembly Language is a programming language designed for describing quantum circuits and algorithms for execution on quantum computers. It is designed to be an intermediate representation that can be used by higher-level compilers to communicate with quantum hardware, and allows for the description of a wide range of quantum operations, as well as classical feed-forward flow control based on measurement outcomes.

Quil is a quantum instruction set architecture that first introduced a shared quantum/classical memory model. It was introduced by Robert Smith, Michael Curtis, and William Zeng in A Practical Quantum Instruction Set Architecture. Many quantum algorithms require a shared memory architecture. Quil is being developed for the superconducting quantum processors developed by Rigetti Computing through the Forest quantum programming API. A Python library called pyQuil was introduced to develop Quil programs with higher level constructs. A Quil backend is also supported by other quantum programming environments.

Quantum Computation Language (QCL) is one of the first implemented quantum programming languages. The most important feature of QCL is the support for user-defined operators and functions. Its syntax resembles the syntax of the C programming language and its classical data types are similar to primitive data types in C. One can combine classical code and quantum code in the same program.

Quantum volume is a metric that measures the capabilities and error rates of a quantum computer. It expresses the maximum size of square quantum circuits that can be implemented successfully by the computer. The form of the circuits is independent from the quantum computer architecture, but compiler can transform and optimize it to take advantage of the computer's features. Thus, quantum volumes for different architectures can be compared.

<span class="mw-page-title-main">Qiskit</span> Open-source software development kit

Qiskit is an open-source software development kit (SDK) for working with quantum computers at the level of circuits, pulses, and algorithms. It provides tools for creating and manipulating quantum programs and running them on prototype quantum devices on IBM Quantum Platform or on simulators on a local computer. It follows the circuit model for universal quantum computation, and can be used for any quantum hardware that follows this model.

Quantinuum is a quantum computing company formed by the merger of Cambridge Quantum and Honeywell Quantum Solutions. The company's H-Series trapped-ion quantum computers set the highest quantum volume to date of 524,288. This architecture supports all-to-all qubit connectivity, allowing entangled states to be created between all qubits, and enables a high fidelity of quantum states.

AirSim is an open-source, cross platform simulator for drones, ground vehicles such as cars and various other objects, built on Epic Games’ proprietary Unreal Engine 4 as a platform for AI research. It is developed by Microsoft and can be used to experiment with deep learning, computer vision and reinforcement learning algorithms for autonomous vehicles. This allows testing of autonomous solutions without worrying about real-world damage.

QC Ware is a quantum-computing-as-a-service company based in Palo Alto, California.

In quantum computing, the variational quantum eigensolver (VQE) is a quantum algorithm for quantum chemistry, quantum simulations and optimization problems. It is a hybrid algorithm that uses both classical computers and quantum computers to find the ground state of a given physical system. Given a guess or ansatz, the quantum processor calculates the expectation value of the system with respect to an observable, often the Hamiltonian, and a classical optimizer is used to improve the guess. The algorithm is based on the variational method of quantum mechanics.

This glossary of quantum computing is a list of definitions of terms and concepts used in quantum computing, its sub-disciplines, and related fields.

References

  1. Fingerhuth, Mark; Babej, Tomáš; Wittek, Peter (2018). "Open source software in quantum computing". PLOS ONE. 13 (12): e0208561. arXiv: 1812.09167 . Bibcode:2018PLoSO..1308561F. doi: 10.1371/journal.pone.0208561 . PMC   6301779 . PMID   30571700.
  2. 1 2 Ho, Alan; Bacon, Dave (2018-07-18). "Announcing Cirq: An Open Source Framework for NISQ Algorithms". Google AI Blog. Google AI Quantum Team. Retrieved 2019-03-06.
  3. "public_demos/max_cut_cirq.py at master · qcware/public_demos · GitHub". GitHub . 20 July 2018. Archived from the original on 20 July 2018. Retrieved 29 October 2019.
  4. "Cirq Circuits". Google Quantum AI website. Google AI Quantum Team. Retrieved 2022-07-06.
  5. "Cirq Simulation". Google Quantum AI website. Retrieved 2022-07-06.
  6. "Pasqal".
  7. "AQT".
  8. "TensorFlow Quantum". TensorFlow. Retrieved 2022-07-06.
  9. "ReCirq". Google Quantum Github. Retrieved 2022-07-06.
  10. "qsimcirq" . Retrieved 2022-07-06.