Language page — context, influences, and learning notes on the 100hellos site.
Source on GitHub (100hellos/cirq)
docker run --rm --platform="linux/amd64" 100hellos/cirq:latest
Read the repo README, or fork the project and customize it.
For an interactive shell:
docker run --rm --platform="linux/amd64" --entrypoint="" -it 100hellos/cirq:latest zsh
Cirq is an open-source quantum computing framework developed by Google for creating, editing, and invoking quantum circuits. It provides a powerful Python library for working with quantum computers and quantum simulators.
Cirq is designed to be the primary tool for researchers working on Noisy Intermediate-Scale Quantum (NISQ) algorithms. It provides:
This implementation demonstrates authentic quantum computing concepts using Cirq's actual API:
# Create qubits
qubit1 = cirq.GridQubit(0, 0)
qubit2 = cirq.GridQubit(0, 1)
# Build quantum circuit
circuit = cirq.Circuit()
circuit.append(cirq.H(qubit1)) # Hadamard gate
circuit.append(cirq.CNOT(qubit1, qubit2)) # Entanglement
circuit.append(cirq.measure(qubit1, key='q1'))
circuit.append(cirq.measure(qubit2, key='q2'))
The implementation includes a quantum teleportation demonstration showing:
|0⟩ → (|0⟩ + |1⟩)/√2|0⟩ ↔ |1⟩Unlike classical bits that are either 0 or 1, qubits can exist in superposition - simultaneously 0 and 1 until measured. When qubits are entangled, measuring one instantly affects the other regardless of distance.
The Bell state (|00⟩ + |11⟩)/√2 demonstrates this: the qubits are perfectly correlated but individually random.
Cirq circuits display as intuitive diagrams:
(0, 0): ───H───@───M('q1')───
│
(0, 1): ───────X───M('q2')───
Cirq was released by Google in 2018 as part of their quantum computing efforts. It was designed specifically for the NISQ era - current quantum computers with 50-100 qubits that are powerful enough for certain algorithms but still limited by noise.
Cirq represents the cutting edge of practical quantum programming, bridging the gap between quantum theory and real quantum computing applications.
Content type
Image
Digest
sha256:05daba064…
Size
320.8 MB
Last updated
4 months ago
docker pull 100hellos/cirq