def check_all_resolved(circuit):
    """Raises if the circuit contains unresolved symbols."""
    if protocols.is_parameterized(circuit):
        unresolved = [op for moment in circuit for op in moment if protocols.is_parameterized(op)]
        raise ValueError(
            'Circuit contains ops whose symbols were not specified in '
            f'parameter sweep. Ops: {unresolved}'
        )
Raises if the circuit contains unresolved symbols.
cirq-core/cirq/sim/simulator.py