Speed up circuit construction when contents are a list of moments (#5898)
Speed up circuit construction when contents are a list of moments (#5898)

* Speed up circuit construction when contents are a list of moments

* Add explicit cast to fix mypy errors
quantumlib/Cirq,quantumlib/Cirq,quantumlib/Cirq,quantumlib/Cirq,quantumlib/Cirq