Skip to content

default_instructions

is_anonymous_gate

is_anonymous_gate(name: str) -> bool

Checks whether the input name corresponds to a non-default gate.

Parameters:

Name Type Description Default
name str

Name of the gate.

required

Returns:

Type Description
bool

True if the name does not correspond to a default gate, otherwise False.

Source code in opensquirrel/default_instructions.py
def is_anonymous_gate(name: str) -> bool:
    """Checks whether the input name corresponds to a non-default gate.

    Args:
        name (str): Name of the gate.

    Returns:
        True if the name does not correspond to a default gate, otherwise False.

    """
    return name not in default_gate_set