Rewrite patterns#
- braket-two-arg-auto-sized
\braket{#1}{#2}\left\langle #1 \middle\vert #2 \right\rangle - braket-two-arg-fixed-size
\braket*{#1}{#2}\langle #1 \vert #2 \rangle - braket-single-arg-auto-sized
\braket{#1}\left\langle #1 \middle\vert #1 \right\rangle - braket-single-arg-fixed-size
\braket*{#1}\langle #1 \vert #1 \rangle
Examples#
Each example shows this rule applied in isolation. A complete normalization profile may make additional changes.
braket orthonormality#
Rendering verified with the declared packages.
braket single argument self overlap#
Rendering verified with the declared packages.
braket star fixed size#
Rendering verified with the declared packages.
Related rules#
Same family#
physics/expectation-expandExpand expectation-value helpers to explicit angle brackets.physics/matrixel-expandExpand matrix elements to explicit angle-bracket and bar fences.physics/physics-bra-expandExpand bra to an explicit angle-bracket and bar fence form.physics/physics-ket-expandExpand ket to an explicit bar and angle-bracket fence form.physics/commutator-expandExpand commutators to explicit square-bracket fences.physics/poisson-bracket-expandExpand poisson brackets to explicit brace fences.
Notes#
Covers physics single-argument and two-argument forms. In physics, the single-argument form repeats the argument on both sides; the braket package single-argument bar parser is package-specific and should remain separate from the physics transform.
Disable this rule#
TransformEngine(profile="corpus", disable_rules=["physics/physics-braket-expand"])new TransformEngine({ profile: 'corpus', disableRules: ['physics/physics-braket-expand'] })