-
Notifications
You must be signed in to change notification settings - Fork 18
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
Examples PR 2: Deutch example #42
base: master
Are you sure you want to change the base?
Conversation
Quick question: What can I use to substitute |
apply_function is basically like a single line of program! So that would be the most likely substitute. |
Ill have some time to look over the PRs tomorrow - Thanks again! |
use qip::builder_traits::UnitaryBuilder; | ||
#[cfg(feature = "macros")] | ||
use qip::prelude::*; | ||
#[cfg(feature = "macros")] |
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.
This was a mistake in the macro_example
but is correct in inverse_example
-- you only need the #[cfg(...)]
above the use qip_macros::program;
since the others all exist even if the macros
feature isn't being used.
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.
Got it. Thank you for the feedback!
|
||
#[cfg(feature = "macros")] | ||
fn apply_oracle<F>( | ||
b: &mut dyn UnitaryBuilder, |
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.
UnitaryBuilder doesn't exist anymore - please replace with LocalBuilder or a generic trait.
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.
Sorry, it does exist but isn't meant to be used with dyn
- rather just as a generic trait. So switch to either generics or the LocalBuilder
struct.
Just to keep stuff clean, Ive made a new PR with the next batch of examples. Old example is here