-
Notifications
You must be signed in to change notification settings - Fork 0
71 allow for circuit to pauli exponential #86
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
Conversation
| (Angle::Arbitrary(rad1), Angle::Pi4Rotations(n2)) => { | ||
| *rad1 += n2 as f64 * PI / 4.0; | ||
| } | ||
| _ => panic!("Cannot add Arbitrary Angle to Pi4 rotation"), |
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 guess you cannot say
(Angle::Pi4Rotations(n), Angle::Arbitrary(rad)) => { *self = Angle::Pi4Rotations(rad + n as f64 * PI / 4.0);}
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.
same for subassign below
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.
Yup, I don't think you can do this.
|
|
||
| /// Composes a gadget onto a Clifford tableau if the angle is Clifford | ||
| /// Decomposes the Pauli gadget by performing naive decomposition into mapping to Z legs, CNOT walls and Z-rotations | ||
| pub fn compose_gadget(&mut self, rhs: (PauliString, Angle)) { |
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.
Instead of inline panicing. You should probably return a Result<(), str> so you can catch it
| ]); | ||
|
|
||
| assert!(!pp1.commutes_with(&pp2)); | ||
| } |
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.
Missing tests for pi4 type angles. if too much work, you can make it an issue
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.
Sprinkled pi4 angles into existing tests
synpy/src/wrapper/qiskit.rs
Outdated
| #[cfg(test)] | ||
| mod tests { | ||
| #[test] | ||
| fn test_clifford_s() {} |
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.
stub
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.
Stub removed in rebase
Only expose single function that actually merges to avoid exposing internal data stuctures.
Rename Angle::Angle to Angle::Arbitrary. Set to as it doesn't need a larger int.
e4288d7 to
ad35505
Compare
Aerylia
left a comment
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.
lgtm
Allow for loop of qiskit -> rust -> qiskit