-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* making all IR pydantic. dataclasses * removing some reprs * removing old repr for waveforms. * add drop-in node for complicated dict in IR. * fixing printers for field. * removing all __str__. * renaming field. * renaming field. * renaming field. * fixing pretty-printer for locations. * fixing issues with renaming field attr. * adding tests for lattice pprint. * adding equality for `KeyValuePair` for testing * fixing tests for fields printer * fixing more tests. * fixing tests * fixing printing for AnalogCircuit. * removing commented code. * removing commented code. * modify traits for builder. * removing `KeyValuePair` * fixing field test. * fixing tests for new printing * fixing emulator ir tests. * moving pprint to `Routine`. * cleaning up if statement * removing `repr=False` * adding dumb inline printing for scalars. * adding unit tests for printer.
- Loading branch information
Showing
31 changed files
with
590 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
from typing import Optional, Union, List | ||
from numbers import Real | ||
|
||
from bloqade.builder.parse.trait import CompileJSON, Parse | ||
from bloqade.builder.parse.trait import Parse, Show | ||
|
||
ParamType = Union[Real, List[Real]] | ||
|
||
|
||
class Builder(CompileJSON, Parse): | ||
class Builder(Parse, Show): | ||
__match_args__ = ("__parent__",) | ||
|
||
def __init__( | ||
self, | ||
parent: Optional["Builder"] = None, | ||
) -> None: | ||
self.__parent__ = parent | ||
|
||
def __str__(self): | ||
return str(self.parse()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.