def __init__(self, ignore_failures=False) -> None: """Inits ConvertToNeutralAtomGates. Args: ignore_failures: If set, gates that fail to convert are forwarded unchanged. If not set, conversion failures raise a TypeError. """ super().__init__() self.ignore_failures = ignore_failures self.gateset = neutral_atom_devices.neutral_atom_gateset()
def is_native_neutral_atom_op(operation: ops.Operation) -> bool: """Returns true if the operation is in the default neutral atom gateset.""" return operation in neutral_atom_devices.neutral_atom_gateset()
def is_native_neutral_atom_gate(gate: ops.Gate) -> bool: return gate in neutral_atom_devices.neutral_atom_gateset()
def is_native_neutral_atom_gate(gate: ops.Gate) -> bool: """Returns true if the gate is in the default neutral atom gateset.""" return gate in neutral_atom_devices.neutral_atom_gateset()
def is_native_neutral_atom_op(operation: ops.Operation) -> bool: return operation in neutral_atom_devices.neutral_atom_gateset()