This post summarizes things I've learned over the 7th week of my Quantum Computing Ultralearning challenge, and should be considered as study notes instead of a fully-explained-and-very-detailed article on quantum gates, since other experts have done that work (see references).
Programming #
Code: https://colab.research.google.com/drive/1t_fjICucjdmBqfQIa4LQNiy8um7dyg6e?usp=sharing .
Most of the things I learned this week are about Cirq, which can be summarized in below points:
Moments #
A Cirq circuit (qubit grid) is a collection of moments.
Each moment is a "column" in the qubit grid, which contains operations that running at the same time.

Image source: [1].
Devices #
- Using real quantum devices? --> there are hardware
constraints on the circuit, such as only allowing operations on adjacent qubits. - How to capture these requirements / constraints? --> creating a circuit with a Device.
- What does a Device do? --> validating the operations you add to the circuit to make sure that no illegal operations are added.
Simulation #
Cirq supports two types of simulation: pure state and mixed state.
I don't have much experience with the mixed state simulation at this moment, but it seems that the mixed state can simulate a larger class of noisy circuits than the pure state.
There are also noticable features of the Cirq simulation:
- Stepping: allows viewing qubit states at each step (moment), without changing their actual states (by measurement).
- Parameterized values: gates can have
Symbol values, which can be resolved at run-time.
References #
1. https://quantumai.google/cirq/circuits
2. https://quantumai.google/cirq/tutorials/basics#circuits_and_moments
3. https://quantumai.google/cirq/simulation
4. https://quantumai.google/cirq/tutorials/basics#simulation
Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated!
For feedback, ping me on Twitter.
All the information on this blog are my own opinions and do NOT represent the views or opinions of any of my past or current employers.
Published