Cirq

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

Uses your system voice; voice and rate in settings.

Snapshot

≈ 1 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Cirq is an open-source framework for noisy intermediate scale quantum (NISQ) computers. import cirq Pick qubits qubit0 = cirq.GridQubit(0, 0) qubit1 = cirq.GridQubit(0, 1) Create a circuit circuit = cirq.Circuit( 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

Text derived from https://en.wikipedia.org/w/index.php?oldid=1315355281 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

9 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.