Crate deep_causality_physics

Crate deep_causality_physics 

Source

Modules§

beam
diffraction
grmhd
ideal
moire
phase
physics_error
plasma
polarization
qgt
ray
resistive

Structs§

AbcdMatrix
ABCD Matrix. $2 \times 2$ Ray Transfer Matrix.
Acceleration
Linear acceleration (m/s^2). Can be negative to indicate direction in 1D context.
Activity
Radioactivity (Becquerels).
AlfvenSpeed
Alfven Speed ($v_A$). Characteristic speed of magnetic waves in plasma. Unit: m/s. Constraint: >= 0.
AmountOfSubstance
Amount of Substance (Moles).
Area
Area (m^2).
BandDrudeWeight
Band Drude Weight ($D$).
BeamWaist
Beam Waist ($w_0$). Minimum radius of Gaussian beam. Unit: Meters. Constraint: > 0.
BerryCurvature
Berry Curvature component ($Ω_{ij}$).
ChemicalPotentialGradient
Chemical Potential Gradient $\nabla μ$.
ComplexBeamParameter
Complex Beam Parameter ($q(z) = z + i z_R$). Constraint: $\text{Im}(q) > 0$.
Concentration
Concentration field $c(\mathbf{r})$.
Conductance
Electrical Conductance ($G$).
Conductivity
Electrical Conductivity ($\sigma$). Unit: Siemens/m (S/m). Constraint: > 0.
DebyeLength
Debye Length ($\lambda_D$). Screening length in plasma. Unit: Meters (m). Constraint: > 0.
Density
Density (kg/m^3).
Diffusivity
Magnetic Diffusivity ($\eta$). Unit: $m^2/s$. Constraint: >= 0.
Displacement
Displacement field $\mathbf{u}(\mathbf{r})$.
Efficiency
Thermodynamic efficiency (0.0 to 1.0).
ElectricPotential
Electric Potential (Volts or J/C).
Energy
Energy (Joules or eV).
EnergyDensity
Energy Density (Joules per cubic meter).
Entropy
Entropy (J/K).
FocalLength
Focal Length ($f$). Unit: Meters. Constraint: None (can be negative for diverging lens).
Force
Force (N). Can be negative to indicate direction in 1D context.
Frequency
Frequency (Hz).
HalfLife
Half-Life (Seconds).
IndexOfRefraction
Index of refraction for a medium (ratio of c to phase velocity).
JonesVector
Jones Vector. Polarized Electric Field. Rank 1, Dim 2 Complex Tensor.
LarmorRadius
Larmor Radius ($r_L$). Gyroradius of a charged particle. Unit: Meters (m). Constraint: > 0.
Length
Length (m).
MagneticFlux
Magnetic Flux (Webers).
MagneticPressure
Magnetic Pressure ($P_B$). Energy density of the magnetic field. Unit: Pascals (Pa). Constraint: >= 0.
Mass
Mass quantity (kg).
MaxwellSolver
A standard solver for Maxwell’s Equations in Geometric Algebra.
Mobility
Charge Carrier Mobility ($μ$).
MomentOfInertia
Moment of Inertia (kg·m^2).
Momentum
Momentum vector $\mathbf{k}$.
NumericalAperture
Numerical Aperture ($NA = n \sin \theta$). Unit: Dimensionless. Constraint: > 0.
OpticalPower
Optical Power ($D = 1/f$). Unit: Diopters ($m^{-1}$). Constraint: None.
OrbitalAngularMomentum
Orbital Angular Momentum ($L$).
OrderParameter
Superconducting Order Parameter ($ψ$).
PhaseAngle
Phase Angle (Radians).
PhysicalField
Wrapper for CausalMultiVector representing a physical field (E, B, etc.). Implements Default to return a zero vector.
PhysicalVector
PhysicsError
PlasmaBeta
Plasma Beta ($\beta$). Ratio of thermal to magnetic pressure. Unit: Dimensionless. Constraint: >= 0.
PlasmaFrequency
Plasma Frequency ($\omega_{pe}$). Natural oscillation frequency. Unit: Rad/s. Constraint: > 0.
Pressure
Pressure (Pascals).
Probability
Probability value [0, 1].
QuantumEigenvector
Quantum Eigenvector $|u_n➢$.
QuantumMetric
Quantum Metric component ($g_{ij}$).
QuantumVelocity
Quantum Velocity vector $\partial_i H |u_n➢$.
Ratio
A generic dimensionless ratio.
RayAngle
Ray Angle ($\theta$). Angle relative to optical axis. Unit: Radians.
RayHeight
Ray Height ($y$). Distance from optical axis. Unit: Meters.
SpacetimeInterval
Spacetime Interval ($s^2$).
SpacetimeVector
Wrapper for CausalMultiVector representing a vector in Spacetime.
Speed
Speed quantity (scalar magnitude of velocity) (m/s).
Stiffness
Scalar stiffness (Young’s Modulus, etc.) (Pascals).
StokesVector
Stokes Vector. Intensity vector $(S_0, S_1, S_2, S_3)$. Rank 1, Dim 4 Tensor. Constraint: $S_0^2 \ge S_1^2 + S_2^2 + S_3^2$.
Stress
Scalar stress (Pascals), used for simple 1D cases or invariants (Von Mises).
Temperature
Absolute Temperature (Kelvin).
Time
Time (Seconds).
Torque
Torque (N·m). Can be negative to indicate direction (e.g. clockwise vs counter-clockwise).
TwistAngle
Moiré Twist Angle ($θ$).
VectorPotential
Electromagnetic Vector Potential $\mathbf{A}$.
Viscosity
Dynamic Viscosity (Pa·s).
Volume
Volume (m^3).
Wavelength
Wavelength ($\lambda$). Unit: Meters. Constraint: > 0.

Enums§

PhysicsErrorEnum
Detailed classification of physics-related errors.

Constants§

ATOMIC_MASS_CONSTANT
AVOGADRO_CONSTANT
BOLTZMANN_CONSTANT
ELECTRON_MASS
ELEMENTARY_CHARGE
FINE_STRUCTURE_CONSTANT
G
GRAPHENE_LATTICE_CONST
NEWTONIAN_CONSTANT_OF_GRAVITATION
PLANCK_CONSTANT
PROTON_MASS
REDUCED_PLANCK_CONSTANT
SPEED_OF_LIGHT
STEFAN_BOLTZMANN_CONSTANT
VACUUM_ELECTRIC_PERMITTIVITY
VACUUM_MAGNETIC_PERMEABILITY

Traits§

QuantumGates
Standard Quantum Gates interface.
QuantumOps
Core Quantum State Operations (Dirac Notation).

Functions§

alfven_speed
alfven_speed_kernel
Calculates the characteristic speed of Alfven waves. $$ v_A = \frac{B}{\sqrt{\mu_0 \rho}} $$
angular_momentum
Causal wrapper for kinematics::angular_momentum_kernel.
angular_momentum_kernel
Calculates angular momentum as the outer product of radius and linear momentum: $L = r \wedge p$.
apply_gate
Causal wrapper for mechanics::apply_gate_kernel.
apply_gate_kernel
Applies a quantum gate to a state: $|\psi’\rangle = U |\psi\rangle$.
beam_spot_size
beam_spot_size_kernel
Extracts the beam spot size $w(z)$ from the complex beam parameter $q$.
bernoulli_pressure
Causal wrapper for mechanics::bernoulli_pressure_kernel.
bernoulli_pressure_kernel
Calculates pressure $P_2$ using Bernoulli’s principle.
binding_energy
Causal wrapper for physics::binding_energy_kernel.
binding_energy_kernel
Calculates nuclear binding energy (mass defect): $E = \Delta m c^2$.
bistritzer_macdonald
Wrapper for moire::bistritzer_macdonald_kernel.
bistritzer_macdonald_kernel
Constructs the Bistritzer-MacDonald Continuum Hamiltonian for Twisted Bilayer Graphene (TBG).
boltzmann_factor
Causal wrapper for stats::boltzmann_factor_kernel.
boltzmann_factor_kernel
Calculates the unnormalized Boltzmann factor: $e^{-E/k_BT}$.
born_probability
Causal wrapper for mechanics::born_probability_kernel.
born_probability_kernel
Calculates the Born probability: $P = |\langle \text{basis} | \text{state} \rangle|^2$.
cahn_hilliard_flux
Wrapper for phase::cahn_hilliard_flux_kernel.
cahn_hilliard_flux_kernel
Calculates the Cahn-Hilliard Flux with degenerate mobility (Type B).
carnot_efficiency
Causal wrapper for stats::carnot_efficiency_kernel.
carnot_efficiency_kernel
Calculates Carnot Efficiency: $\eta = 1 - \frac{T_C}{T_H}$.
chronometric_volume
Causal wrapper for spacetime::chronometric_volume_kernel.
chronometric_volume_kernel
Calculates Chronometric Volume (4-Volume) from 3 vectors?
commutator
Causal wrapper for mechanics::commutator_kernel.
commutator_kernel
Calculates commutator $[A, B] = AB - BA$.
debye_length
debye_length_kernel
Calculates the Debye Length $\lambda_D$. $$ \lambda_D = \sqrt{\frac{\epsilon_0 k_B T_e}{n_e e^2}} $$
degree_of_polarization
degree_of_polarization_kernel
Calculates the Degree of Polarization (DOP) from a Stokes vector.
doppler_effect_approaching
Monadic wrapper for general::doppler_effect_kernel (Approaching case).
doppler_effect_kernel
Calculates the observed frequency due to the Doppler effect for longitudinal motion.
effective_band_drude_weight
Wrapper for qgt::effective_band_drude_weight_kernel.
effective_band_drude_weight_kernel
Approximates the Effective Band Drude Weight ($D$) using band curvature and quantum geometry.
einstein_tensor
Causal wrapper for gravity::einstein_tensor_kernel.
einstein_tensor_kernel
Calculates the Einstein Tensor: $G_{\mu\nu} = R_{\mu\nu} - \frac{1}{2} R g_{\mu\nu}$.
energy_momentum_tensor_em
energy_momentum_tensor_em_kernel
Calculates the electromagnetic stress-energy tensor $T^{\mu\nu}{EM}$. $$ T^{\mu\nu} = F^{\mu\alpha}F^\nu\alpha - \frac{1}{4} g^{\mu\nu} F_{\alpha\beta}F^{\alpha\beta} $$
escape_velocity
Causal wrapper for mechanics::escape_velocity_kernel.
escape_velocity_kernel
Calculates escape velocity: $v_e = \sqrt{\frac{2GM}{r}}$.
expectation_value
Causal wrapper for mechanics::expectation_value_kernel.
expectation_value_kernel
Calculates the expectation value: $\langle A \rangle = \langle \psi | A | \psi \rangle$.
fidelity
Causal wrapper for mechanics::fidelity_kernel.
fidelity_kernel
Calculates Quantum Fidelity: $F = |\langle \psi_{\text{ideal}} | \psi_{\text{actual}} \rangle|^2$.
foppl_von_karman_strain
Wrapper for moire::foppl_von_karman_strain_kernel.
foppl_von_karman_strain_kernel
Calculates the Föppl-von Kármán stress tensor using the complete theory (Field-based).
foppl_von_karman_strain_simple
Wrapper for moire::foppl_von_karman_strain_simple_kernel.
foppl_von_karman_strain_simple_kernel
Calculates the Föppl-von Kármán stress tensor (Simplified / Local).
gaussian_q_propagation
gaussian_q_propagation_kernel
Propagates a Gaussian beam’s complex $q$-parameter through an ABCD optical system.
generalized_master_equation
Causal wrapper for estimation::generalized_master_equation_kernel.
generalized_master_equation_kernel
Generalized Master Equation Kernel.
generate_schwarzschild_metric
Generates a Schwarzschild-like 4D metric tensor.
geodesic_deviation
Causal wrapper for gravity::geodesic_deviation_kernel.
geodesic_deviation_kernel
Calculates Geodesic Deviation acceleration: $A^\mu = -R^\mu_{\nu\sigma\rho} V^\nu n^\sigma V^\rho$.
ginzburg_landau_free_energy
Wrapper for phase::ginzburg_landau_free_energy_kernel.
ginzburg_landau_free_energy_kernel
Calculates the Ginzburg-Landau Free Energy density.
grating_equation
grating_equation_kernel
Calculates the diffraction angle for a Grating using the Grating Equation.
hadronization
Causal wrapper for physics::hadronization_kernel.
hadronization_kernel
Simulates phenomenological hadronization: $E_{\text{density}} \rightarrow \vec{p}_{\text{jet}}$.
haruna_cz_gate
Causal wrapper for mechanics::haruna_cz_gate_kernel.
haruna_cz_gate_kernel
Implements Haruna’s Logical CZ Gate.
haruna_hadamard_gate
Causal wrapper for mechanics::haruna_hadamard_gate_kernel.
haruna_hadamard_gate_kernel
Implements Haruna’s Logical Hadamard Gate.
haruna_s_gate
Causal wrapper for mechanics::haruna_s_gate_kernel.
haruna_s_gate_kernel
Implements Haruna’s Logical S-Gate.
haruna_t_gate
Causal wrapper for mechanics::haruna_t_gate_kernel.
haruna_t_gate_kernel
Implements Haruna’s Logical T-Gate.
haruna_x_gate
Causal wrapper for mechanics::haruna_x_gate_kernel.
haruna_x_gate_kernel
Implements Haruna’s Logical X-Gate.
haruna_z_gate
Causal wrapper for mechanics::haruna_z_gate_kernel.
haruna_z_gate_kernel
Implements Haruna’s Logical Z-Gate.
heat_capacity
Causal wrapper for stats::heat_capacity_kernel.
heat_capacity_kernel
Calculates Heat Capacity: $C = \frac{dE}{dT}$.
heat_diffusion
Causal wrapper for stats::heat_diffusion_kernel.
heat_diffusion_kernel
Calculates the Heat Equation step: $\frac{\partial u}{\partial t} = \alpha \Delta u$.
hookes_law
Causal wrapper for mechanics::hookes_law_kernel.
hookes_law_kernel
Calculates generalized Hooke’s Law: $\sigma_{ij} = C_{ijkl} \epsilon_{kl}$.
hydrostatic_pressure
Causal wrapper for mechanics::hydrostatic_pressure_kernel.
hydrostatic_pressure_kernel
Calculates hydrostatic pressure: $P = P_0 + \rho g h$.
ideal_gas_law
Causal wrapper for stats::ideal_gas_law_kernel. Returns result as Ratio (or scalar).
ideal_gas_law_kernel
Calculates the Ideal Gas Constant $R$ from state variables: $R = \frac{PV}{nT}$.
ideal_induction
ideal_induction_kernel
Calculates the time evolution of the magnetic field (Frozen-in flux). $$ \frac{\partial \mathbf{B}}{\partial t} = \nabla \times (\mathbf{v} \times \mathbf{B}) $$
jones_rotation
jones_rotation_kernel
Rotates a Jones Matrix (operator) by an angle $\phi$.
kalman_filter_linear
Causal wrapper for estimation::kalman_filter_linear_kernel.
kalman_filter_linear_kernel
Standard Linear Kalman Filter Update Step.
kinetic_energy
Causal wrapper for kinematics::kinetic_energy_kernel.
kinetic_energy_kernel
Calculates translational kinetic energy: $K = \frac{1}{2} m v^2$.
klein_gordon
Causal wrapper for mechanics::klein_gordon_kernel.
klein_gordon_kernel
Calculates the Klein-Gordon operator action: $(\Delta + m^2)\psi$.
larmor_radius
larmor_radius_kernel
Calculates the Larmor Radius (Gyroradius). $$ r_L = \frac{m v_\perp}{|q| B} $$
lens_maker
lens_maker_kernel
Calculates optical power and focal length using the Lens Maker’s Equation.
logical_cz
Calculates the Logical CZ gate: $CZ(\gamma_1, \gamma_2) = \exp(i \pi a(\gamma_1) a(\gamma_2))$.
logical_hadamard
Calculates the Logical Hadamard gate.
logical_s
Calculates the Logical S gate: $S(\gamma) = \exp(i \frac{\pi}{2} a(\gamma)^2)$.
logical_t
Calculates the Logical T gate.
logical_x
Calculates the Logical X gate: $X(\tilde{\gamma}) = \exp(i \pi b(\tilde{\gamma}))$.
logical_z
Calculates the Logical Z gate: $Z(\gamma) = \exp(i \pi a(\gamma))$.
lorentz_force
Causal wrapper for forces::lorentz_force_kernel.
lorentz_force_kernel
Calculates the magnetic force component of the Lorentz Force: $F = J \times B$.
lorenz_gauge
Causal wrapper for fields::lorenz_gauge_kernel.
lorenz_gauge_kernel
Calculates the Lorenz gauge condition: $\nabla \cdot A = 0$.
magnetic_helicity_density
Causal wrapper for fields::magnetic_helicity_density_kernel.
magnetic_helicity_density_kernel
Calculates Magnetic Helicity Density: $h = A \cdot B$.
magnetic_pressure
magnetic_pressure_kernel
Calculates magnetic pressure. $$ P_B = \frac{B^2}{2\mu_0} $$
magnetic_reconnection_rate
magnetic_reconnection_rate_kernel
Estimates reconnection rate (Sweet-Parker model simplified). $$ v_{in} = \frac{v_A}{\sqrt{S}} $$ where $S$ is the Lundquist number.
maxwell_gradient
Causal wrapper for fields::maxwell_gradient_kernel.
maxwell_gradient_kernel
Calculates the Maxwell gradient (Electromagnetic Field Tensor).
orbital_velocity
Causal wrapper for mechanics::orbital_velocity_kernel.
orbital_velocity_kernel
Calculates orbital velocity: $v = \sqrt{\frac{GM}{r}}$.
partition_function
Causal wrapper for stats::partition_function_kernel.
partition_function_kernel
Calculates Partition Function: $Z = \sum e^{-E_i / k_B T}$.
poynting_vector
Causal wrapper for fields::poynting_vector_kernel.
poynting_vector_kernel
Calculates the Poynting Vector (Energy Flux): $S = E \times B$.
proca_equation
Causal wrapper for fields::proca_equation_kernel.
proca_equation_kernel
Calculates the Proca Equation (Massive Electromagnetism): $\delta F + m^2 A = J$.
quantum_geometric_tensor
Wrapper for qgt::quantum_geometric_tensor_kernel.
quantum_geometric_tensor_kernel
Calculates the Quantum Geometric Tensor (QGT) component $Q_{ij}^n(\mathbf{k})$ for band $n$.
quasi_qgt
Wrapper for qgt::quasi_qgt_kernel.
quasi_qgt_kernel
Calculates the Quasi-QGT $q_{ij}^n(\mathbf{k})$.
radioactive_decay
Causal wrapper for physics::radioactive_decay_kernel.
radioactive_decay_kernel
Calculates the remaining amount of a radioactive substance: $N(t) = N_0 \cdot 2^{-t / t_{1/2}}$.
ray_transfer
ray_transfer_kernel
Applies an ABCD matrix to a ray vector.
relativistic_current
relativistic_current_kernel
Calculates current density $J^\mu$ compatible with curved spacetime. $$ J^\mu = \nabla_\nu F^{\mu\nu} $$ (Divergence of Electromagnetic Tensor).
resistive_diffusion
resistive_diffusion_kernel
Calculates the diffusion term of the induction equation. $$ \frac{\partial \mathbf{B}}{\partial t}_{diff} = \eta \nabla^2 \mathbf{B} $$ On a manifold, this is $-\eta \Delta B$ where $\Delta = d\delta + \delta d$ is the Hodge Laplacian. Note that $\nabla^2$ in vector calc usually corresponds to $-\Delta$ (negative Laplacian). The standard diffusion eq is $\partial_t u = + D \nabla^2 u$. The Hodge Laplacian $\Delta$ is positive definite. So $\nabla^2 \approx -\Delta$. Thus $\partial_t B = - \eta \Delta B$.
rotational_kinetic_energy
Causal wrapper for kinematics::rotational_kinetic_energy_kernel.
rotational_kinetic_energy_kernel
Calculates rotational kinetic energy: $K_{rot} = \frac{1}{2} I \omega^2$.
schwarzschild_radius
Causal wrapper for mechanics::schwarzschild_radius_kernel.
schwarzschild_radius_kernel
Calculates Schwarzschild radius: $r_s = \frac{2GM}{c^2}$.
shannon_entropy
Causal wrapper for stats::shannon_entropy_kernel.
shannon_entropy_kernel
Calculates Shannon Entropy: $H = -\sum p_i \ln(p_i)$.
single_slit_irradiance
single_slit_irradiance_kernel
Calculates the Single Slit Diffraction Irradiance.
snells_law
snells_law_kernel
Calculates refracted angle using Snell’s Law or returns a Critical Angle error.
spacetime_interval
Causal wrapper for spacetime::spacetime_interval_kernel.
spacetime_interval_kernel
Calculates the spacetime interval $s^2 = g_{\mu\nu} x^\mu x^\nu$ (squared magnitude in metric).
stokes_from_jones
stokes_from_jones_kernel
Converts a pure state Jones vector to a Stokes vector.
thermal_expansion
Causal wrapper for mechanics::thermal_expansion_kernel.
thermal_expansion_kernel
Calculates thermal expansion strain: $\epsilon = \alpha \Delta T$.
time_dilation_angle
Causal wrapper for spacetime::time_dilation_angle_kernel.
time_dilation_angle_kernel
Calculates Time Dilation Angle (Rapidity $\eta$).
torque
Causal wrapper for kinematics::torque_kernel.
torque_kernel
Calculates torque as the outer product of radius and force: $\tau = r \wedge F$.
von_mises_stress
Causal wrapper for mechanics::von_mises_stress_kernel.
von_mises_stress_kernel
Calculates Von Mises Stress from a 3x3 Stress Tensor.
wave_speed
Monadic wrapper for general::wave_speed_kernel.
wave_speed_kernel
Calculates the speed of a wave given its frequency and wavelength.

Type Aliases§

Gate
Operator