Skip to content

Comments

Clarify Qubit state descriptions and aliases#174

Open
sotashimozono wants to merge 8 commits intoITensor:mainfrom
sotashimozono:patch-1
Open

Clarify Qubit state descriptions and aliases#174
sotashimozono wants to merge 8 commits intoITensor:mainfrom
sotashimozono:patch-1

Conversation

@sotashimozono
Copy link
Contributor

@sotashimozono sotashimozono commented Feb 14, 2026

Key changes:

  • Fixed incorrect eigenvalues for $\sigma_x$ and $\sigma_y$ eigenvectors.
  • Added a code example for state to match the format of the "Operator" section.
  • Clarified that "0" and "1" states are eigenvectors of $\sigma_z$ for consistency.

Description

While reviewing the documentation, I noticed that some eigenvalues for the "Qubit" states were inverted, so I have corrected them.
To improve consistency with the "Operator" section and make the guide more practical, I have added a brief code example showing how to prepare states using the state function. Additionally, I explicitly mentioned that the "0" and "1" states are eigenvectors of $\sigma_z$ to align with the descriptions of the other bases.Please feel free to adjust or remove any parts you find redundant.

How Has This Been Tested?

I checked each alias itself works consistently, and documents had mistakes.
So, I only fixed markdown file.

Checklist:

  • My code follows the style guidelines of this project. Please run using JuliaFormatter; format(".") in the base directory of the repository (~/.julia/dev/ITensorMPS) to format your code according to our style guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that verify the behavior of the changes I made.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.

Key changes:
Fixed incorrect eigenvalues for $\sigma_x$ and $\sigma_y$ eigenvectors.
Added a code example for state to match the format of the "Operator" section.
Clarified that "0" and "1" states are eigenvectors of $\sigma_z$ for consistency.
@sotashimozono
Copy link
Contributor Author

Just a trivial Documentation Issue.

@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.31%. Comparing base (4b29909) to head (cc51cee).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #174   +/-   ##
=======================================
  Coverage   90.31%   90.31%           
=======================================
  Files          54       54           
  Lines        3605     3605           
=======================================
  Hits         3256     3256           
  Misses        349      349           
Flag Coverage Δ
docs 18.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@emstoudenmire
Copy link
Contributor

Thanks for catching the issue and for the suggested changes. I think the changes mostly look good, except for one which I commented on above.

@sotashimozono
Copy link
Contributor Author

thanks, let me think about the changes.

Added general usage examples for site types and clarified the creation of site indices, states, and operators. Removed redundant examples for Qubit states.
@sotashimozono
Copy link
Contributor Author

Thanks for the feedback! I've added the general examples for siteind, state, and op at the beginning of the file so we don't have to repeat them everywhere.

For the individual sections, what do you think about the existing code snippets? I'm happy to delete them to avoid duplication, though I'd prefer to keep the scope of this PR manageable unless you feel strongly about a full cleanup. Let me know your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants