-
Notifications
You must be signed in to change notification settings - Fork 18
created solovay kitaev algorithm #133
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
base: main
Are you sure you want to change the base?
Conversation
created SV algorith implementation with temporary testing scaffolding at the bottom, doesn't work right now -> approx matrix is considerably off from target
created SV algorithm implementation with temporary testing scaffolding at the bottom, doesn't work right now -> approx matrix is considerably off from target
using updated code with proper testing scaffolding (prints out approx and target array)
best_dist = dist | ||
best_gate = gate | ||
|
||
return best_gate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approximating sequence length should not be 1 and is set by us. The user might have a requirement for more depth, but we will set this initially as <= 16. Ref - https://arxiv.org/pdf/quant-ph/0505030
...
I also believe @PranavTupe2000's code could be beneficial here, as discussed in our weekly meeting
for gate in w_sequence[1:]: | ||
w_approx = w_approx * gate | ||
|
||
result_sequence.extend([best_v, best_w, v_approx.dagger(), w_approx.dagger()]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the result_sequence
variable should also contain the
|
||
return result_sequence, final_error | ||
|
||
def solovay_kitaev(target: np.ndarray, basic_gates: List[np.ndarray], depth: int = 3) -> List[np.ndarray]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a smoother interface, I believe basis_gates
parameter should accept the BasisSet
enum as a param and internally derive the basis gates from the BASIS_GATE_MAP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AshwinKaliyaperumal , thanks for working on this!
Fixes #126
Summary of changes