Skip to content

Trait

Parse

Bases: ParseRegister, ParseSequence, ParseCircuit, ParseRoutine

n_atoms property

n_atoms

Return the number of atoms in the program.

ParseCircuit

parse_circuit

parse_circuit()

Parse the analog circuit from the program.

Source code in src/bloqade/builder/parse/trait.py
def parse_circuit(self: "Builder") -> "AnalogCircuit":
    """Parse the analog circuit from the program."""
    from bloqade.builder.parse.builder import Parser

    return Parser().parse_circuit(self)

ParseRegister

parse_register

parse_register()

Parse the arrangement of atoms of the program.

Source code in src/bloqade/builder/parse/trait.py
def parse_register(self: "Builder") -> Union["AtomArrangement", "ParallelRegister"]:
    """Parse the arrangement of atoms of the program."""
    from bloqade.builder.parse.builder import Parser

    return Parser().parse_register(self)

ParseRoutine

parse

parse()

Parse the program to return a Routine object.

Source code in src/bloqade/builder/parse/trait.py
def parse(self: "Builder") -> "Routine":
    """Parse the program to return a Routine object."""
    from bloqade.builder.parse.builder import Parser

    return Parser().parse(self)

ParseSequence

parse_sequence

parse_sequence()

Parse the pulse sequence part of the program.

Source code in src/bloqade/builder/parse/trait.py
def parse_sequence(self: "Builder") -> "Sequence":
    """Parse the pulse sequence part of the program."""
    from bloqade.builder.parse.builder import Parser

    return Parser().parse_sequence(self)