-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
CDR Tutorial with Qrack #2451
CDR Tutorial with Qrack #2451
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2451 +/- ##
=======================================
Coverage 98.70% 98.70%
=======================================
Files 88 88
Lines 4083 4083
=======================================
Hits 4030 4030
Misses 53 53 ☔ View full report in Codecov by Sentry. |
@WrathfulSpatula and @natestemen I would appreciate if you could check this PR. Dan, does everything look good from the Qrack side? For the doc build in the PR, pyqrack is not included in the environment. I'm not sure how to do the install (since it requires a python kernel reboot.) |
@bdg221 I haven't dug into what the error message says exactly. I looked through the diff and I think you should add |
@purva-thakre exactly. The error is coming from the I don't think it makes sense to include pyqrack as a dependency, but is there a way to include it for building the docs? |
@bdg221 Yes, I get what you are saying but there's an easy way to install it. List your dependency below:
You can see certain dependencies are only for some docs examples. |
@WrathfulSpatula when the docs are getting built and pyqrack is imported, the following error is seeing https://mitiq--2451.org.readthedocs.build/en/2451/examples/cdr_qrack.html:
You can see info about the environment (linux, python 3.12, pyqrack 1.30.0) here: https://github.com/unitaryfund/mitiq/actions/runs/10116764224/job/27980295325?pr=2451 |
The docs-building runner is probably Linux, if it's looking for
libqrack_pinvoke.so. This shouldn't happen so long as you install PyQrack
either with `pip3 install pyqrack` or
```
sudo add-apt-repository ppa:wrathfulspatula/vm6502q
sudo apt install pyqrack
```
Are you installing PyQrack from source, from the repository? That might
explain the issue, since you're not building and installing the Qrack
shared library, and it's not packaged on the main branch, which will resort
to looking for the system-wide installation in `/usr` or `/usr/local`.
…On Fri, Jul 26, 2024 at 4:43 PM Brian G ***@***.***> wrote:
@WrathfulSpatula <https://github.com/WrathfulSpatula> when the docs are
getting built and pyqrack is imported, the following error is seeing
https://mitiq--2451.org.readthedocs.build/en/2451/examples/cdr_qrack.html:
/usr/lib/qrack/libqrack_pinvoke.so: cannot open shared object file: No such file or directory
You can see info about the environment (linux, python 3.12, pyqrack
1.30.0) here:
https://github.com/unitaryfund/mitiq/actions/runs/10116764224/job/27980295325?pr=2451
—
Reply to this email directly, view it on GitHub
<#2451 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUNABKCXRDLXKQNYK2YYTDZOKYGZAVCNFSM6AAAAABLPLKUP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJTGQ3TSOBYGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Come to think of it, that explanation might have been close but not quite
on-the-money: if there's not a specific PyQrack wheel for the platform on
which you install, you get the source build, which is effectively the same
as head of main branch on the PyQrack repository. If you install Qrack
system-wide on the runner, it should fix it.
Alternatively, if you know a valid wheel platform label I can build that
PyQrack doesn't already provide, I can probably package it for you
immediately and add it as a new wheel to 1.30.0.
…On Mon, Jul 29, 2024 at 2:12 PM Dan Strano ***@***.***> wrote:
The docs-building runner is probably Linux, if it's looking for
libqrack_pinvoke.so. This shouldn't happen so long as you install PyQrack
either with `pip3 install pyqrack` or
```
sudo add-apt-repository ppa:wrathfulspatula/vm6502q
sudo apt install pyqrack
```
Are you installing PyQrack from source, from the repository? That might
explain the issue, since you're not building and installing the Qrack
shared library, and it's not packaged on the main branch, which will resort
to looking for the system-wide installation in `/usr` or `/usr/local`.
On Fri, Jul 26, 2024 at 4:43 PM Brian G ***@***.***> wrote:
> @WrathfulSpatula <https://github.com/WrathfulSpatula> when the docs are
> getting built and pyqrack is imported, the following error is seeing
> https://mitiq--2451.org.readthedocs.build/en/2451/examples/cdr_qrack.html
> :
>
> /usr/lib/qrack/libqrack_pinvoke.so: cannot open shared object file: No such file or directory
>
> You can see info about the environment (linux, python 3.12, pyqrack
> 1.30.0) here:
> https://github.com/unitaryfund/mitiq/actions/runs/10116764224/job/27980295325?pr=2451
>
> —
> Reply to this email directly, view it on GitHub
> <#2451 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAUNABKCXRDLXKQNYK2YYTDZOKYGZAVCNFSM6AAAAABLPLKUP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJTGQ3TSOBYGM>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
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.
Great start Brian!
Biggest thing is a little more explanation is needed before the definition of the three executors as to what they're needed for. I would generally expect a reader to have a basic idea of the CDR workflow, but always good to quickly remind people.
Co-authored-by: nate stemen <[email protected]>
Co-authored-by: nate stemen <[email protected]>
Co-authored-by: nate stemen <[email protected]>
Co-authored-by: nate stemen <[email protected]>
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.
Nice updates Brian! Just two smaller requests and then should be good to go.
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.
Great work @bdg221!!!
* New example md file from ipynb * New thumbnail for tutorial * Add CDR with Qrack to Examples TOC * Match thumbnail to tutorial * Update md file to install Qrack * Restart kernel if qrack needs to be install * Add pyqrack to for building docs * Removed pip install but added information in markdown * Set the latest pyqrack * Update with PYQRACK_SHARED_LIB_PATH * Build Qrack for docs build remove PYQRACK_SHARED_LIB_PATH * Installing openCL per suggestion * Adding sudo to apt calls * Move apt call out of requirements * Update apt format * Put apt info back into docs build * Cleaned up links to be relative and removed unnecessary line * Remove unnecessary sentence about density matrices Co-authored-by: nate stemen <[email protected]> * Update execute_with_cdr to full function call Co-authored-by: nate stemen <[email protected]> * Remove unnecessary code explanation Co-authored-by: nate stemen <[email protected]> * Remove observable=None from execute_with_cdr Co-authored-by: nate stemen <[email protected]> * Update random_state and conclusion * Add section explaining executors * Added final sentences with other references and contact info --------- Co-authored-by: nate stemen <[email protected]>
Description
Fixes #2368
This PR is to add a tutorial to the documentation using CDR with Qrack as the Near-Clifford simulator.
I started with the CDR section of the User Guide and replaced
compute_density_matrix
with Qrack for the Near-Clifford simulation and a Qiskit Fake Backend that uses a snapshot of the configurations and noise of the Yorktown device.License