Skip to content
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

More documentation on the various ways to construct Stab/Destab/MixedDestab objects #258

Open
Krastanov opened this issue Apr 10, 2024 · 12 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@Krastanov
Copy link
Member

Krastanov commented Apr 10, 2024

A friend asked me over email something that should probably be added to the documentation (after being polished)

A quick question, in quantumclifford.jl, how should I manually construct the (Mixed)Destabilizer tableau? Suppose I have a list of stabilizers and destabilizers as strings, for example s = ["XX","ZZ"] and d=["ZI","IX"].

My answer was

image
image

@Krastanov Krastanov added documentation Improvements or additions to documentation good first issue Good for newcomers labels Apr 10, 2024
@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 24, 2024

I will be delighted to work in this issue!

@Krastanov
Copy link
Member Author

That would be great! It is a pretty difficult balance to strike between too much information on a given page and too many separate pages -- this will need some pedagogical effort, maybe a separate page, maybe a lot of reference to that new page, maybe something else

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 24, 2024

Indeed, I understand your point. Striking balance is important so that the reader is not overwhelmed by too much information in one page. I will give proper attention to it.

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 25, 2024

On the page about choosing Data Structure, https://quantumsavory.github.io/QuantumClifford.jl/stable/datastructures/#Choosing-Appropriate-Data-Structure

Would you like to add a flowchart like this? I can modify it as per your requirements if needed.

FlowChart

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 25, 2024

Another Representation:

Screenshot from 2024-05-25 10-02-42

@Krastanov
Copy link
Member Author

These look promising! Are you using mermaid for them? I would prefer to keep the source for diagrams as part of the documentation, so that it is easy to modify. We already do something like that for QuantumSavory: https://quantumsavory.github.io/QuantumSavory.jl/stable/register_interface/

Using mermaid can also help with making the visualization a bit tighter -- there is a lot of empty space in this one.

I would suggest doing first the separation between (Mixed)Stabilizer and (Mixed)Destabilizer and only then dealing with the mixed-vs-nonmixed distinction.

MixedDestabilizer is probably the main and most useful datastructure, but it is not included here.

I think all of these datastructures support projective measurements, definitely including Stabilizer.

Some of the descriptions inside of the bottom rectangles does not make much sense to me right now -- "handles commuting operators" and "requires user to check for consistency" and "no canonicalization needed".

Explicit descriptions of what these datastructures are would be useful.

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 25, 2024

Yes, Mermaid!

Thanks for your comments! Please let me know your further comments.

Color Scheme 1:
Untitled diagram-2024-05-25-081607

Color Scheme 2:
Untitled diagram-2024-05-25-081858

Color Scheme 3:
Untitled diagram-2024-05-25-081131

Stabilizer: Requires user to check for consistency. This summarizes ""It does not enforce requirements for pure stabilizer state (the rows of the tableau do not necessarily commute, nor are they forced to be Hermitian; the tableau might be under determined, redundant, or contradictory). It is up to the user to ensure that the initial values in the tableau are meaningful and consistent.""

MixedDestabilizer: handles commuting operators -- this summarizes that " efficiently handling projections onto commuting operators that are not explicitly represented in the stabilizer".
--Improved this as Project! on non-Stabilizer commuting operators

Destabilizer: no canonicalization needed -- This summarizes ""project! called on it never requires a stabilizer canonicalization"".
-- Improved it as no stabilizer canonicalization needed

"If you will never need projective measurements you probably would want to use Stabilizer. Also, canonicalize!, project!, and generate! can accept an under determined (mixed state) Stabilizer instance and operate correctly. canonicalize! can also accept a redundant Stabilizer (i.e. not all rows are independent), leaving as many identity rows at the bottom of the canonicalized tableau as the number of redundant stabilizers in the initial tableau.""

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 25, 2024

Smaller size of decision boxes:

Untitled diagram-2024-05-25-102816

Solarized Dark Scheme:
Untitled diagram-2024-05-25-103913

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 25, 2024

Minor Cleanup since all data structures support projective measurements:

1:
Untitled diagram-2024-05-25-135906

2:
Untitled diagram-2024-05-25-153011

3:
Untitled diagram-2024-05-25-153515

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 25, 2024

From the Gottesman and Aaronson paper[2], we can add a flowchart of generalization of the stabilizer states as well. Please suggest improvement here as well. Thanks!

Untitled diagram-2024-05-25-200644

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 26, 2024

Another set of options:

1:
Untitled diagram-2024-05-26-072143

2:
Untitled diagram-2024-05-26-072614

@Fe-r-oz
Copy link
Contributor

Fe-r-oz commented May 27, 2024

To be consistent with other member packages, I think it's better to use the default scheme instead of the ones presented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants