Skip to content

Education

Cirq and OpenFermion: two different parts of the job

Cirq describes circuits; OpenFermion helps work with fermionic models. Keeping those roles clear makes quantum chemistry examples easier to read.

Education2026-05-302 min readReviewed 2026-10-28

Five glass reference plates with distinct etched paths in a precision index rack.
A useful route into a new idea.
Quantum optics laboratory with optical table and experimental equipment
In contextAn optical table in a quantum laboratory. The apparatus around an experiment is part of its practical requirements. UCL Quantum Labs / Wikimedia Commons

A molecule, a Hamiltonian and a circuit are related objects, but they are not interchangeable files.

Key takeaways

  1. Preserve the scientific model.
  2. Keep mapping choices beside the circuit.
  3. A visual fragment does not reproduce the whole notebook.

Chapter 01

Start with the physical model

For a chemistry example, identify the system, basis and approximations before looking at gates. Those choices determine the problem being represented. Two circuits with the same qubit count can describe quite different models, so qubit count alone is a poor comparison.

Chapter 02

OpenFermion helps express the problem

OpenFermion provides tools for representing and analyzing fermionic systems and translating relevant structures toward quantum calculations. That work happens before or alongside circuit construction. Preserve the model and mapping choices; an exported gate sequence may not contain enough information to reconstruct them.

Chapter 03

Cirq makes the operations explicit

Cirq organizes operations into circuits and moments. This is useful when checking which qubits an operation touches and how instructions are arranged. Abstract circuit organization should not be confused with the final timing schedule of a physical device.

Chapter 04

Bring the inspectable part into QFlow

Use a supported circuit example to study gate order and measurements. Keep its scientific model and environment linked in the accompanying notes. If the full notebook cannot be faithfully converted, retain it as a reference rather than presenting a partial drawing as the complete calculation.

Sources

  1. Google Quantum AICirq circuits and momentsReference; checked 2026-10-28
  2. Google Quantum AIOpenFermion: fermionic models and quantum chemistryReference; checked 2026-10-28
  3. QFlow StudioQFlow user guide: the current workspaceReference; checked 2026-10-28

Next step

Try one small experiment.

Choose a supported example, make a prediction and see what changes when you edit the circuit.

Explore the Hub