-
Notifications
You must be signed in to change notification settings - Fork 218
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
New tutorial: quantum edge detection #2711
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: marwafar <[email protected]>
Command Bot: Processing... |
Signed-off-by: marwafar <[email protected]>
Signed-off-by: marwafar <[email protected]>
Command Bot: Processing... |
Signed-off-by: Sachin Pisal <[email protected]>
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Command Bot: Processing... |
Signed-off-by: Sachin Pisal <[email protected]>
Command Bot: Processing... |
"\n", | ||
"Each pixel will have its own color intensity represented along with its position label as an 8-bit black and white color. To convert the pixel intensity to probability amplitudes of a quantum state\n", | ||
"\n", | ||
"$$ c_i = \\frac{I_{yx}}{\\sqrt(\\sum I^2_{yx})} $$\n", |
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.
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.
"\n", | ||
"$$ \\ket{img} = c_0 \\ket{00} + c_1 \\ket{01} + c_2 \\ket{10} + c_3 \\ket{11}$$\n", | ||
"\n", | ||
"Below, is how to encode an image using QPIE in cudaq.\n" |
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 would add a space line before this sentence, for viewability.
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 increase size of this sentence to highlight it.
"\n", | ||
"# Horizontal: Original image\n", | ||
"image_norm_h = amplitude_encode(image)\n", | ||
"print(image_norm_h.shape)\n", |
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.
Doesn't show in the output
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.
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 also see it locally
"\n", | ||
"# Vertical: Transpose of Original image\n", | ||
"image_norm_v = amplitude_encode(image.T)\n", | ||
"print(image_norm_v.shape)\n", |
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.
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 see (64,) which I think is the correct image_norm_v.shape?
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.
Yes. I also see result in my jupyter notebook
} | ||
], | ||
"source": [ | ||
"faltten_image=image.flatten()\n", |
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.
Should this code be in a function, similar to amplitude_encoding that gets the image data as a parameter?
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.
Done
Signed-off-by: Sachin Pisal <[email protected]>
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: marwafar <[email protected]>
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Command Bot: Processing... |
Command Bot: Processing... |
LGTM. @efratshabtai Should we check-in this PR? |
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
this is a new tutorial that explains how to implement QPIE, FRQI, QHED algorithm in cudaq