benchmarks.wiki / Public workspace

SciCode / 70.6 / Write a function to calculate the two SU(3) invariants …

Problem

Answer published by the source. Consult the official source to check your work against its answer.

step background

step description prompt

Write a function to calculate the two SU(3) invariants |h|2hkhk|h|^{2} \equiv h_{k} h^{k} and hdijkhihjhk\langle h\rangle \equiv d_{i j k} h^{i} h^{j} h^{k}, where hh is the expansion coefficients defined in prompt () and dijkd_{ijk} is the tensor defined in prompt (). Sum over all indices. Then use the two invariants to calculate the following terms ψm2|h|3cos[13(χ+2πm)]\psi_{m} \equiv \frac{2|h|}{\sqrt{3}} \cos \left[\frac{1}{3}(\chi+2 \pi m)\right] with m=1,2,3m=1,2,3 and cos(χ)=3h/|h|3\cos (\chi)=-\sqrt{3}\langle h\rangle /|h|^{3}. Return a list containing h2h_2, h3h_3, and ψm\psi_{m}, in this order.
Plain-text mathematical notation (without MathML)
Write a function to calculate the two SU(3) invariants |h|²≡h_(k)h^(k) and ⟨h⟩≡d_(ijk)h^(i)h^(j)h^(k), where h is the expansion coefficients defined in prompt () and d_(ijk) is the tensor defined in prompt (). Sum over all indices. Then use the two invariants to calculate the following terms ψ_(m)≡(2|h|)/(√(3))cos[(1)/(3)(χ+2πm)] with m=1,2,3 and cos(χ)=−√(3)⟨h⟩/|h|³. Return a list containing h₂, h₃, and ψ_(m), in this order.
Original LaTeX notation
Write a function to calculate the two SU(3) invariants $|h|^{2} \equiv h_{k} h^{k}$ and $\langle h\rangle \equiv d_{i j k} h^{i} h^{j} h^{k}$, where $h$ is the expansion coefficients defined in prompt () and $d_{ijk}$ is the tensor defined in prompt (). Sum over all indices. Then use the two invariants to calculate the following terms $\psi_{m} \equiv \frac{2|h|}{\sqrt{3}} \cos \left[\frac{1}{3}(\chi+2 \pi m)\right]$ with $m=1,2,3$ and $\cos (\chi)=-\sqrt{3}\langle h\rangle /|h|^{3}$. Return a list containing $h_2$, $h_3$, and $\psi_{m}$, in this order.

Discussion

Discussion

No discussion posts on this page yet. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Source and history

Official source

initial import