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

Rustify QED #416

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1762846
start implementation of aem1
tgiani Oct 16, 2024
61220f8
complete aem1.py
tgiani Oct 21, 2024
a40908b
unit tests
tgiani Oct 21, 2024
f0edfae
add struct for charge combinations
tgiani Oct 21, 2024
a8d72c0
some work on gamma_ns_qed
tgiani Oct 23, 2024
e8a3a8b
start as1aem1.rs
tgiani Oct 23, 2024
136dbe8
gamma_qph as1aem1
tgiani Oct 23, 2024
ce11227
some work on as1aem1
tgiani Oct 25, 2024
659fe31
addingv recursive harmonics to cache
tgiani Oct 25, 2024
4007f0d
S1p2 and G3p2. Check that this is correct
tgiani Oct 25, 2024
7c160f1
gamma_nsp
tgiani Oct 25, 2024
37a65e8
rewrite ChargeCombination struct
tgiani Nov 11, 2024
fc5de81
missing entries in as1aem1
tgiani Nov 11, 2024
2a911b1
adding tests
tgiani Nov 11, 2024
bad124a
some work on spacelike.rs and recasting from list to vec
tgiani Nov 20, 2024
d50e9c7
valence qed
tgiani Nov 20, 2024
b0f6722
some unit tests
tgiani Nov 20, 2024
e4c621b
use Vec<> only when dimension is not known, else use normal list
tgiani Nov 20, 2024
81ece22
fix notation row/columns
tgiani Nov 20, 2024
0def938
add unravel functions for qed case. To be checked
tgiani Nov 20, 2024
9b58455
modifying rust_quad_ker_qcd, PyQuadKerQCDT and QuadQCDargs to include…
tgiani Nov 21, 2024
588496a
add qed valence option in rust_quad_ker_qcd
tgiani Nov 21, 2024
3452243
remove useless flag is_qed
tgiani Nov 21, 2024
9335b97
extend QuadQCDargs to include arguments for c_quad_ker_qed
tgiani Nov 21, 2024
3390aca
setting up input vectors for cb_quad_ker_qed
tgiani Nov 28, 2024
6a3af19
cb_quad_ker_qed
tgiani Dec 3, 2024
f0a727d
fix modes for singlet QED and use == in if statements
tgiani Dec 9, 2024
398c89a
small fix
tgiani Dec 9, 2024
ea44cee
cargo fmt
tgiani Dec 9, 2024
5721326
forgot pre-commit
tgiani Dec 9, 2024
83af836
updating patch file
tgiani Dec 11, 2024
1af5cbf
Update crates/ekore/src/constants.rs
tgiani Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions crates/ekore/src/anomalous_dimensions/unpolarized/spacelike/aem1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ pub fn gamma_ns(c: &mut Cache, nf: u8) -> Complex<f64> {
/// Implements Eq. (2.5) of
pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
let cc = charge_combinations(nf);
let e2avg = cc[0];
let vue2m = cc[1];
let vde2m = cc[2];
let e2delta = cc[3];

let gamma_ph_q = gamma_phq(c, nf);
let gamma_q_ph = gamma_qph(c, nf);
Expand All @@ -61,20 +57,20 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
[
Complex::<f64>::zero(),
gamma_phph(c, nf),
e2avg * gamma_ph_q,
vue2m * gamma_ph_q,
cc.e2avg * gamma_ph_q,
cc.vue2m * gamma_ph_q,
],
[
Complex::<f64>::zero(),
e2avg * gamma_q_ph,
e2avg * gamma_nonsinglet,
vue2m * gamma_nonsinglet,
cc.e2avg * gamma_q_ph,
cc.e2avg * gamma_nonsinglet,
cc.vue2m * gamma_nonsinglet,
],
[
Complex::<f64>::zero(),
vde2m * gamma_q_ph,
vde2m * gamma_nonsinglet,
e2delta * gamma_nonsinglet,
cc.vde2m * gamma_q_ph,
cc.vde2m * gamma_nonsinglet,
cc.e2delta * gamma_nonsinglet,
],
]
}
Expand All @@ -84,14 +80,10 @@ pub fn gamma_singlet(c: &mut Cache, nf: u8) -> [[Complex<f64>; 4]; 4] {
/// Implements Eq. (2.5) of
pub fn gamma_valence(c: &mut Cache, nf: u8) -> [[Complex<f64>; 2]; 2] {
let cc = charge_combinations(nf);
let e2avg = cc[0];
let vue2m = cc[1];
let vde2m = cc[2];
let e2delta = cc[3];

[
[e2avg * gamma_ns(c, nf), vue2m * gamma_ns(c, nf)],
[vde2m * gamma_ns(c, nf), e2delta * gamma_ns(c, nf)],
[cc.e2avg * gamma_ns(c, nf), cc.vue2m * gamma_ns(c, nf)],
[cc.vde2m * gamma_ns(c, nf), cc.e2delta * gamma_ns(c, nf)],
]
}

Expand Down
17 changes: 15 additions & 2 deletions crates/ekore/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,25 @@ pub fn uplike_flavors(nf: u8) -> u8 {
nf / 2
}

pub fn charge_combinations(nf: u8) -> Vec<f64> {
pub struct ChargeCombinations {
felixhekhorn marked this conversation as resolved.
Show resolved Hide resolved
pub e2avg: f64,
pub vue2m: f64,
pub vde2m: f64,
pub e2delta: f64,
}

pub fn charge_combinations(nf: u8) -> ChargeCombinations {
let nu = uplike_flavors(nf) as f64;
let nd = (nf as f64) - nu;
let e2avg = (nu * eu2 + nd * ed2) / (nf as f64);
let vue2m = nu / (nf as f64) * (eu2 - ed2);
let vde2m = nd / (nf as f64) * (eu2 - ed2);
let e2delta = vde2m - vue2m + e2avg;
vec![e2avg, vue2m, vde2m, e2delta]

ChargeCombinations {
e2avg,
vue2m,
vde2m,
e2delta,
}
}
Loading