Skip to main content

qualia_core_db/specialized_libs/quantum_biology/
entities.rs

1//! Biological Entity Types
2//!
3//! This module defines the biological entity types and their quantum computation requirements.
4
5use super::quantum_state::QuantumState;
6use crate::NQuin;
7
8/// Biological Entity mapped to 48-byte Super-Quin
9#[repr(C)]
10#[derive(Clone, Copy)]
11pub struct BiologicalEntity {
12    /// 48-byte Super-Quin identifier
13    pub quin: NQuin,
14    /// Entity type (enzyme, protein, DNA, etc.)
15    pub entity_type: BiologicalEntityType,
16    /// Quantum computation type required
17    pub computation_type: QuantumComputationType,
18    /// Current quantum state approximation
19    pub quantum_state: QuantumState,
20}
21
22/// Biological Entity Types
23#[repr(u8)]
24#[derive(Clone, Copy, PartialEq, Default)]
25pub enum BiologicalEntityType {
26    #[default]
27    Protein = 1,
28    Enzyme = 0,
29    DNA = 2,
30    RNA = 3,
31    RadicalPair = 4,
32    ElectronTunnel = 5,
33    ProtonTunnel = 6,
34    Receptor = 7,
35    Ligand = 8,
36}
37
38/// Quantum Computation Types
39#[repr(u8)]
40#[derive(Clone, Copy, PartialEq, Default)]
41pub enum QuantumComputationType {
42    #[default]
43    HamiltonianMapping = 6,
44    ElectronTunneling = 0,
45    RadicalPairMechanism = 1,
46    ProtonTunneling = 2,
47    DrugReceptorBinding = 3,
48    EnzymeCatalysis = 4,
49    WaveFunctionCollapse = 5,
50}
51
52impl Default for BiologicalEntity {
53    fn default() -> Self {
54        Self {
55            quin: NQuin::default(),
56            entity_type: BiologicalEntityType::default(),
57            computation_type: QuantumComputationType::default(),
58            quantum_state: QuantumState::default(),
59        }
60    }
61}