View source on GitHub |
Creates a Callable program validator with a set message size.
cirq_google.engine.engine_validator.create_program_validator(
max_size: int = MAX_MESSAGE_SIZE
) -> cirq_google.engine.engine_validator.PROGRAM_VALIDATOR_TYPE
This validator can be used for a validator in cg.ValidatingSampler
and can also be useful in generating 'engine emulators' by using
cg.SimulatedLocalProcessor
with this callable as a program_validator.
Args:
max_size: proto size limit to check against.
Returns: Callable to use in validation with the max_size already set.