-
Notifications
You must be signed in to change notification settings - Fork 5
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
Compiler Top-Down Integration #49
Conversation
@@ -7,6 +7,9 @@ | |||
def __init__(self, backend, **kwargs) -> None: | |||
self.backend = backend | |||
|
|||
def transpile_gate(self, gate) -> None: |
Check notice
Code scanning / CodeQL
Mismatch between signature and use of an overridden method
( | ||
alpha1_real * l1_norm_real | ||
+ alpha2_real * l2_norm_real | ||
+ alpha1_imag * l1_norm_imag | ||
+ alpha2_imag * l2_norm_imag | ||
) + den |
Check notice
Code scanning / CodeQL
Statement has no effect
circuit = sparsify(u) | ||
op = mini_unitary_sim(self.circuit, circuit.instructions) | ||
sparsity_final = compute_F(op) | ||
op = op.round(3) |
Check notice
Code scanning / CodeQL
Unused local variable
|
||
class CompilerPass(ABC): | ||
def __init__(self, backend, **kwargs) -> None: | ||
self.backend = backend | ||
|
||
def transpile_gate(self, gate: Gate) -> list[Gate]: |
Check notice
Code scanning / CodeQL
Mismatch between signature and use of an overridden method Note
call
method PhyLocAdaPass.transpile_gate
|
||
import numpy as np | ||
from scipy.optimize import minimize | ||
from scipy.optimize import dual_annealing |
Check notice
Code scanning / CodeQL
Unused import
@burgholzer I think pre-commit still changes x = x@y into x@=y which is not supported in older versions and it messes up with the code :/ |
Yeah. Update the versions that do not support it to versions that support it 😉 Edit: or, in cases where it really does not seem valid, place a corresponding "# noqa: " directive on the respective lines. |
Description
This PR integrates the compiler in fully automated fashion from the circuit to the simulations results.
Checklist: