-
Notifications
You must be signed in to change notification settings - Fork 42
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
Single- and two-qubit state and process tomography #246
Conversation
...ransmons/Use Case 4 - Single- and Two-Qubit State and Process Tomography/helper_functions.py
Outdated
Show resolved
Hide resolved
...Case 4 - Single- and Two-Qubit State and Process Tomography/single-qubit-state-tomography.py
Outdated
Show resolved
Hide resolved
It looks like the check-python-formatting check is failing because I used a match statement in some function definitions in the helper functions module. Match statements only became available in python version 3.10, whereas it looks like the checker is assuming version 3.8. The functions can be rewritten using lots of if ... elif statements, if that helps, but the resulting code would look more verbose. |
Hello,
Yes, you’re right. I just replied on the "use-case for github 🙂 " thread.
Best regards,
[Logo]<https://www.quantum-machines.co/>
[LinkedIn]<https://www.linkedin.com/company/quantumachines/> [Facebook] <https://www.facebook.com/quantummachines> [Github] <https://github.com/qua-platform/qua-libs> [Twitter] <https://twitter.com/QuantumQM> [YouTube] <https://www.youtube.com/c/QuantumMachines>
Michal Goldenshtein
CUSTOMER SUCCESS ENGINEER
E: ***@***.******@***.***>
W: quantum-machines.co<https://www.quantum-machines.co/>
…________________________________
From: Nicholas Bornman ***@***.***>
Sent: Wednesday, October 9, 2024 8:47 PM
To: qua-platform/qua-libs ***@***.***>
Cc: Michal Goldenshtein ***@***.***>; Review requested ***@***.***>
Subject: Re: [qua-platform/qua-libs] Single- and two-qubit state and process tomography (PR #246)
It looks like the check-python-formatting check is failing because I used a match statement in some function definitions in the helper functions module. Match statements only became available in python version 3.10, whereas it looks like the checker is assuming version 3.8.
The functions can be rewritten using lots of if ... elif statements, if that helps, but the resulting code would look more verbose.
—
Reply to this email directly, view it on GitHub<#246 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AYBOSF3HOIHKMZ2UE2VU2KLZ2XMC5AVCNFSM6AAAAABNY67TVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBTG4ZTENRYGE>.
You are receiving this because your review was requested.Message ID: ***@***.***>
|
Hi, |
…omography for both the single- and two-qubit cases
…omography for both the single- and two-qubit cases
Remove comment regarding adding a wait qua statement.
Done |
Okay, because we generally support Python 3.8, black automatically tries to adhere to that, and therefore, it fails. |
If the issue is emanating from the match case statements in the helper functions file, I'm happy to modify the functions. I'll probably get around to making the changes some time later today. |
Change match case statements to if elif else statements
Update helper_functions.py
Re-include helper_functions.py
Auto-format with black
Auto-format with black
Auto-format with black
Auto-format with black
Auto-format with black
Fix readme
...-Coupled-Transmons/Use Case 4 - Single- and Two-Qubit State and Process Tomography/README.md
Outdated
Show resolved
Hide resolved
...-Coupled-Transmons/Use Case 4 - Single- and Two-Qubit State and Process Tomography/README.md
Outdated
Show resolved
Hide resolved
...-Coupled-Transmons/Use Case 4 - Single- and Two-Qubit State and Process Tomography/README.md
Outdated
Show resolved
Hide resolved
Incorporate minor language changes
...se 4 - Single- and Two-Qubit State and Process Tomography/single-qubit-process-tomography.py
Show resolved
Hide resolved
...se Case 4 - Single- and Two-Qubit State and Process Tomography/two-qubit-state-tomography.py
Outdated
Show resolved
Hide resolved
...se Case 4 - Single- and Two-Qubit State and Process Tomography/two-qubit-state-tomography.py
Outdated
Show resolved
Hide resolved
Remove `reset_frame` and `reset_phase`
Add `wait(pi_len//4, f"q{qubit1}_xy", f"q{qubit2}_xy")` to cases 3, 12 and 15.
... Case 4 - Single- and Two-Qubit State and Process Tomography/two-qubit-process-tomography.py
Show resolved
Hide resolved
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.
Thank you @bornman-nick
Hey, I am sorry for the delay on my side. I just merged it and it is in the main branch :) Thank you for contributing to the GitHub repository!!! |
There are four experiment scripts in the Use Case 4 directory, carrying out single- and two-qubit quantum state tomography, as well as single- and two-qubit standard quantum process tomography. There is additionally a helper functions file (mainly constants and matplotlib functions useful for plotting), a license file (with a BSD-3 license, required by my employer), and a serialised pickle file, PMatrix2.pkl, which is needed to solve for the process matrix in the two-qubit process tomography case (since computing the contents of the file, which are constant, took an hour or two on my local machine).