Cirq

Cirq is an open-source framework for Noisy Intermediate Scale Quantum (NISQ) computers.[1]

Cirq
Developersquantumlib
Implementation languagePython
LicenseApache license
WebsiteGitHub

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" and "Schedule" where "Circuit" represents a Quantum circuit and "Schedule" represents a Quantum circuit with timing information. [4] The programs can be executed on local simulators. [5]

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

import cirq

# Pick qubits
qubit0 = cirq.GridQubit(0, 0)
qubit1 = cirq.GridQubit(0, 1)

# Create a circuit
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

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-Cirq

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

gollark: It would be really impressive if DC was broken enough that he could *accidentally* release a new dragon this way.
gollark: In fact, it's... entirely current ones in every biome?
gollark: Oh wow, TONS of "current" ones around now!
gollark: Oh hey, my regular xenowyrm hatched, I have a free slot now.
gollark: They do have nice colors, but in this state they look pretty much identical to existing xenowyrms. Hopefully they'll have interesting unique æsthetics when fully grown.

References

  1. Fingerhuth, Mark; Babej, Tomáš; Wittek, Peter (2018). "Open source software in quantum computing". arXiv:1812.09167.
  2. Ho, Alan; Bacon, Dave (2018-06-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". web.archive.org. 20 July 2018. Retrieved 29 October 2019.
  4. "Cirq Circuits". Cirq Github repository. Google AI Quantum Team. 2019-01-09. Retrieved 2019-03-06.
  5. Google AI Quantum Team (2019-01-09). "Cirq Simulation". Cirq Github repository. quantumlib. Retrieved 2019-03-06.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.