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

Follow conversation on m_spectrum_ph3.py #193

Open
kmilo9999 opened this issue Mar 12, 2024 · 0 comments
Open

Follow conversation on m_spectrum_ph3.py #193

kmilo9999 opened this issue Mar 12, 2024 · 0 comments

Comments

@kmilo9999
Copy link
Collaborator

          ```python
    def conj_prod(x, y, key):
        prod = x * y.conj() 
        return prod.real if key.startswith("P") else prod.imag

    keys = ["P11", "P22", "P33", "Q12", "Q13", "Q23", "P13", "P12", "P23"]
    index_pairs = [
        (0, 0),
        (1, 1),
        (2, 2),
        (0, 1),
        (0, 2),
        (1, 2),
        (0, 2),
        (0, 1),
        (1, 2),
    ]

    mom = {
        key: conj_prod(X[i, 1:], X[j, 1:], key)
        for key, (i, j) in zip(keys, index_pairs)
    }

Originally posted by @cpaniaguam in #131 (comment)

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

No branches or pull requests

1 participant