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

Create a frontend UI for users to specify quantum compilation pipelines #1131

Merged
merged 45 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
69c7933
pulling ZNE mitigation (`-lower-mitigation`) into the transform_named…
paul0403 Sep 11, 2024
6974981
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 11, 2024
4761364
update passes.mitigate_with_zne test to include new `scale_factors`
paul0403 Sep 11, 2024
b5ec1b5
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 11, 2024
13899c1
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 12, 2024
2a38c02
init the local pipeline decorator
paul0403 Sep 12, 2024
986cc94
lit tests
paul0403 Sep 13, 2024
d7b98ae
add global peephole pipeline option in qjit
paul0403 Sep 13, 2024
00b28d7
format
paul0403 Sep 13, 2024
4efb372
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 16, 2024
300c61c
reverting zne changes; this PR will leave zne untouched
paul0403 Sep 16, 2024
30b9f41
create merge rotation pass boilerplate
paul0403 Sep 16, 2024
99a3f13
reverting zne to main
paul0403 Sep 16, 2024
c23f52b
rewriting tests to exclude zne
paul0403 Sep 16, 2024
6f5dd59
put back lower-mitigation in default pipeline
paul0403 Sep 16, 2024
7dc40cd
codefactor
paul0403 Sep 16, 2024
1be95b5
local pipelines override global pipelines
paul0403 Sep 16, 2024
50f2585
make sure cudajit (which will never have the pass_pipeline) does not …
paul0403 Sep 16, 2024
d0d29c2
format
paul0403 Sep 16, 2024
60769e3
codefactor
paul0403 Sep 17, 2024
7648f88
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 17, 2024
bc521c9
format
paul0403 Sep 17, 2024
8ed20c5
add support for pass options
paul0403 Sep 17, 2024
652d96a
format
paul0403 Sep 17, 2024
46f640f
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 17, 2024
8d24767
type hint pipeline
paul0403 Sep 17, 2024
d410afb
no documentation for helpers in passes.py
paul0403 Sep 17, 2024
db3bd48
format
paul0403 Sep 17, 2024
551545d
add pytest for pass option effect
paul0403 Sep 17, 2024
6b20fc5
documentation
paul0403 Sep 17, 2024
6618e97
changelog
paul0403 Sep 17, 2024
72e6fc0
codefactor line too long in documentation
paul0403 Sep 17, 2024
a3b5425
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 18, 2024
be02cad
typo
paul0403 Sep 18, 2024
9195851
add quantum scope TODO
paul0403 Sep 18, 2024
0850516
double ticks in documentation instead of single tick for code words
paul0403 Sep 18, 2024
2eb6f2f
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 18, 2024
d2e5abb
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 18, 2024
2ddf0af
rename variables in changelog
paul0403 Sep 18, 2024
8ae031f
change name uniquer to an import
paul0403 Sep 18, 2024
536d651
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 19, 2024
f0a5bb6
Merge remote-tracking branch 'origin/main' into pass_pipeline_UI
paul0403 Sep 19, 2024
1511e17
remove "merge_rotations" from public documentation
paul0403 Sep 19, 2024
7c2142e
typo
paul0403 Sep 19, 2024
81b5006
add web link to `catalyst.passes` in documentation
paul0403 Sep 19, 2024
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
codefactor
  • Loading branch information
paul0403 committed Sep 17, 2024
commit 60769e331ff7f4111146cca4d1095f33bb306acf
1 change: 0 additions & 1 deletion frontend/catalyst/jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from catalyst.jax_tracer import lower_jaxpr_to_mlir, trace_to_jaxpr
from catalyst.logging import debug_logger, debug_logger_init
from catalyst.passes import _inject_transform_named_sequence
from catalyst.passes import pipeline as circuit_transform_pass_pipeline
from catalyst.qfunc import QFunc
from catalyst.tracing.contexts import EvaluationContext
from catalyst.tracing.type_signatures import (
Expand Down
3 changes: 2 additions & 1 deletion frontend/catalyst/passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def wrapper(*args, **kwrags):
return wrapped_qnode_function(*args, **kwrags)

fn_clone.func = wrapper
fn_clone._peephole_transformed = True
fn_clone._peephole_transformed = True # pylint: disable=protected-access

return fn_clone

Expand Down Expand Up @@ -209,6 +209,7 @@ def wrapper(*args, **kwrags):


## IMPL and helpers ##
# pylint: disable=missing-function-docstring
class _PipelineNameUniquer:
def __init__(self, i):
self.i = i
Expand Down
3 changes: 2 additions & 1 deletion frontend/catalyst/qfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def extract_backend_info(
return extract_backend_info(device, capabilities)

# pylint: disable=no-member
# pylint: disable=self-cls-assignment
@debug_logger
def __call__(self, *args, **kwargs):
assert isinstance(self, qml.QNode)
Expand All @@ -119,7 +120,7 @@ def __call__(self, *args, **kwargs):
if not hasattr(self, "_peephole_transformed"):
self = pipeline(pass_pipeline=pass_pipeline)(
self
) # pylint: disable=self-cls-assignment
)
kwargs.pop("pass_pipeline")

# Mid-circuit measurement configuration/execution
Expand Down
2 changes: 1 addition & 1 deletion frontend/test/lit/test_peephole_optimizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def f(x):

@qjit(keep_intermediate=True)
def test_pipeline_lowering_keep_original_workflow(x):
return f(1.2), f_pipeline(1.2)
return f(x), f_pipeline(x)

# CHECK: transform_named_sequence
# CHECK: call_jaxpr=
Expand Down