Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor builder #364

Merged
merged 95 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
238ff5b
refactor builder
Roger-luo Aug 2, 2023
13f6722
keep refactoring
Roger-luo Aug 4, 2023
1e6d54d
flatten works
Roger-luo Aug 4, 2023
3f9de26
cleanup
Roger-luo Aug 4, 2023
59cccc4
add a sketch of compile pipeline
Roger-luo Aug 4, 2023
752ef83
support device fn
Roger-luo Aug 5, 2023
f71fe0f
setup a basic lexer like codegen for builder
Roger-luo Aug 5, 2023
6f0bae1
Merge branch 'main' into roger/refactor-builder
weinbe58 Aug 6, 2023
102d00a
waveform and address is working
Roger-luo Aug 7, 2023
fd8a2bc
reexporting objects to `bloqade.ir` and `bloqade`
weinbe58 Aug 7, 2023
5dd92ee
adding `BoundedBravais` and `ParallelRegister` to imports.
weinbe58 Aug 7, 2023
24081bc
adding `create`/`copy` interface to `BuilderStream`
weinbe58 Aug 7, 2023
5dd4bc1
wrap up whatever I have
Roger-luo Aug 7, 2023
cbfbe77
docstring.
weinbe58 Aug 8, 2023
2a10ff8
Merge branch 'roger/refactor-builder' of https://github.com/Happy-Dio…
weinbe58 Aug 8, 2023
72fa7bf
renambing fields of pulse and sequence
weinbe58 Aug 9, 2023
7ffac9e
implmenting compiler for pulse sequence.
weinbe58 Aug 9, 2023
bdc5e51
fix routing.
weinbe58 Aug 9, 2023
967e0db
adding better error messages for not implemented backends.
weinbe58 Aug 9, 2023
c558a48
stashing changes.
weinbe58 Aug 9, 2023
0acd268
adding `static_assign` functionality to scalars
weinbe58 Aug 9, 2023
9034624
moving from just kargs to storing parameters as Scalar variables.
weinbe58 Aug 9, 2023
fae4ec0
stash
weinbe58 Aug 9, 2023
2f4cfb0
Merge branch 'main' into roger/refactor-builder
weinbe58 Aug 9, 2023
e438102
rename
weinbe58 Aug 9, 2023
1b3f618
fixing typo
weinbe58 Aug 9, 2023
4dfb09c
adding unit tests for
weinbe58 Aug 9, 2023
8a2cd50
rename class.
weinbe58 Aug 9, 2023
efbc7d1
moving visitor methods for primatives.
weinbe58 Aug 9, 2023
776c2ac
update dev
weinbe58 Aug 9, 2023
0fec268
Merge branch 'main' into roger/refactor-builder
weinbe58 Aug 9, 2023
b803134
Merge branch 'main' into roger/refactor-builder
weinbe58 Aug 10, 2023
021d1f6
new compiler for sequence.
weinbe58 Aug 10, 2023
0a5e86a
Merge branch 'roger/refactor-builder' of https://github.com/Happy-Dio…
weinbe58 Aug 10, 2023
93ee5c1
removing main2.py
weinbe58 Aug 10, 2023
1e0ab61
rename modules.
weinbe58 Aug 10, 2023
c3fd6c4
creating visitor for scalar AST, removing `static_assign` implement a…
weinbe58 Aug 10, 2023
2343d48
adding canonicalization
weinbe58 Aug 10, 2023
a925392
reorder imports.
weinbe58 Aug 10, 2023
3b7b556
adding match arguments and serializers
weinbe58 Aug 11, 2023
137a838
adding JSON serialization for Scalar IR.
weinbe58 Aug 11, 2023
14a652e
moving ir compiler into compiler subpackage
weinbe58 Aug 11, 2023
88e1786
creating stream submodule and json submodule.
weinbe58 Aug 11, 2023
8d76448
adding Sample node for builder.
weinbe58 Aug 11, 2023
625f18f
rename `checkpoint` to `coeff`
weinbe58 Aug 11, 2023
5322915
adding json compiler for waveforms.
weinbe58 Aug 11, 2023
38a8990
adding json encoder for builder.
weinbe58 Aug 11, 2023
674a149
task sketch.
weinbe58 Aug 11, 2023
09485f3
adding `apply` builder method for sequence objects.
weinbe58 Aug 14, 2023
bc152c5
adding explicit check for `Waveform` type.
weinbe58 Aug 14, 2023
2495852
adding serialization for builder + BloqadeIR
weinbe58 Aug 14, 2023
7338e18
fixing parallelize option for submit/flatten routes.
weinbe58 Aug 14, 2023
d8ff7bd
commenting out old compiler. Adding register compiler
weinbe58 Aug 14, 2023
c72d431
setting up compiler trait.
weinbe58 Aug 14, 2023
512d3ac
fixing compiler after refactoring circular imports
weinbe58 Aug 14, 2023
5381c92
fixing imports
weinbe58 Aug 15, 2023
b9a6da5
adding JSON compiler to builder.
weinbe58 Aug 15, 2023
6d8b88a
adding compiler traits.
weinbe58 Aug 15, 2023
ed33618
compiler pipeline
weinbe58 Aug 15, 2023
12d2eb3
adding ir caching option.
weinbe58 Aug 15, 2023
d720348
updating caching to happen at all levels of bloqade-IR
weinbe58 Aug 15, 2023
3af6c87
adding deserialization for bloqade-IR
weinbe58 Aug 16, 2023
c6a7ec9
refactor base backend.
weinbe58 Aug 16, 2023
0560d6a
finished draft implementation of serializer/deserializer
weinbe58 Aug 17, 2023
488e857
Khwu/refactor task (#391)
kaihsin Aug 17, 2023
9b84a0a
Merge branch 'main' into roger/refactor-builder
weinbe58 Aug 17, 2023
c631174
removing shots from options for backends.
weinbe58 Aug 17, 2023
294ad09
keyword arg for `parent`
weinbe58 Aug 17, 2023
72a6f7d
missing impl for static assignment on register IR objects.
weinbe58 Aug 17, 2023
ec07fb3
sketching bug fix.
weinbe58 Aug 17, 2023
618a3c8
fix static assign, and visit_register issue
Aug 17, 2023
9fe128f
fixing builder compiler to blqoade IR
weinbe58 Aug 17, 2023
930967c
tm
Aug 17, 2023
1bef659
merge
Aug 17, 2023
db113b5
fixing another bug in builder compiler.
weinbe58 Aug 17, 2023
e2602e6
Merge branch 'roger/refactor-builder' of https://github.com/QuEraComp…
Aug 17, 2023
5ec1ca1
remove redundant print
Aug 17, 2023
109a119
fix bugs for batches
Aug 17, 2023
86954dc
update, fix bugs for report()
Aug 17, 2023
1084fb9
fix bugs in waveform builder
Aug 17, 2023
76dcee4
fix bugs with PythonFn waveform default kwargs. fix most of the testing
Aug 17, 2023
73f382c
Khwu/rename (#399)
weinbe58 Aug 21, 2023
aff408b
adding serialization for batch. (#400)
weinbe58 Aug 21, 2023
6ba5f45
update, fix bugs in naming _compile_taskdata, recover more tests
Aug 22, 2023
bc7dfeb
add load_batch + doc for tree_depth()
Aug 22, 2023
eb2428c
fix bugs in DefaultVariable should be Scalar not real, and member sho…
Aug 22, 2023
9f473a3
fix backend api_config need to pass in with dereferences
Aug 22, 2023
6467274
Phil/save load batch (#404)
weinbe58 Aug 22, 2023
22addb4
fix bug in static_assign visit Negative waveform feed in wrong ast
Aug 22, 2023
759ea62
Merge branch 'roger/refactor-builder' into khwu/testing_v3
Aug 22, 2023
a7d690f
fixing tests
Aug 22, 2023
1ca24dc
fixing issue with pattern matching with `Poly`
weinbe58 Aug 22, 2023
50fe7ab
Khwu/testing v3 (#408)
weinbe58 Aug 22, 2023
d35c8b0
Merge branch 'main' into roger/refactor-builder
weinbe58 Aug 22, 2023
d80b934
Khwu/testing v4 (#409)
kaihsin Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
keyword arg for parent
  • Loading branch information
weinbe58 committed Aug 17, 2023
commit 294ad09cf7e7667e10d1350348e22dc3caa303ab
4 changes: 2 additions & 2 deletions src/bloqade/builder2/backend/bloqade.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def bloqade(self):

class BloqadeDeviceRoute(Builder):
def python(self, solver: str):
return BloqadePython(solver, self)
return BloqadePython(solver, parent=self)

def julia(self, solver: str, nthreads: int = 1):
return BloqadeJulia(solver, nthreads, self)
return BloqadeJulia(solver, nthreads, parent=self)


class SubmitBloqadeBackend(LocalBackend):
Expand Down
4 changes: 2 additions & 2 deletions src/bloqade/builder2/backend/braket.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def braket(self):

class BraketDeviceRoute(Builder):
def aquila(self) -> "Aquila":
return Aquila(self)
return Aquila(parent=self)

def local_emulator(self) -> "BraketEmulator":
return BraketEmulator(self)
return BraketEmulator(parent=self)


class Aquila(RemoteBackend):
Expand Down
6 changes: 3 additions & 3 deletions src/bloqade/builder2/backend/quera.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ def quera(self):

class QuEraDeviceRoute(Builder):
def aquila(self, config_file: Optional[str] = None, **api_configs) -> "Aquila":
return Aquila(config_file, self, **api_configs)
return Aquila(config_file, parent=self, **api_configs)

def gemini(self, config_file: Optional[str] = None, **api_configs) -> "Gemini":
return Gemini(config_file, self, **api_configs)
return Gemini(config_file, parent=self, **api_configs)

def mock(
self,
state_file: str = ".mock_state.txt",
) -> "Mock":
return Mock(state_file, self)
return Mock(state_file, parent=self)


class QuEraBackend(RemoteBackend):
Expand Down