pub struct EntangledSystem {
pub graph: FractalGraph<()>,
pub particles: Vec<ParticleResonance>,
pub grid_width: u64,
pub grid_height: u64,
pub adjacency_list: Vec<Vec<usize>>,
pub particle_states: Vec<f64>,
}Fields§
§graph: FractalGraph<()>§particles: Vec<ParticleResonance>§grid_width: u64§grid_height: u64§adjacency_list: Vec<Vec<usize>>§particle_states: Vec<f64>Implementations§
Source§impl EntangledSystem
impl EntangledSystem
Sourcepub fn new(width: u64, height: u64, adjacency_list: Vec<Vec<usize>>) -> Self
pub fn new(width: u64, height: u64, adjacency_list: Vec<Vec<usize>>) -> Self
Creates a new simulation environment with two entangled particles.
Sourcepub fn update_curvature(&mut self, threshold: f64, max_distance: u32)
pub fn update_curvature(&mut self, threshold: f64, max_distance: u32)
Modifies the graph’s topology based on the energy in particle_states. This simulates “curvature”. Modifies the graph’s topology based on the energy in particle_states.
Sourcepub fn apply_pulses(&mut self, sources: &[PulseSource])
pub fn apply_pulses(&mut self, sources: &[PulseSource])
Applies the combined interference pattern from multiple pulse sources.
Sourcepub fn bfs_distances(&self, start_node: usize) -> Vec<Option<u32>>
pub fn bfs_distances(&self, start_node: usize) -> Vec<Option<u32>>
Calculates the shortest path distances from a start node to all other nodes in a graph.
§Arguments
start_node- The index of the node to start the search from.adjacency_list- A reference to the graph’s structure.
§Returns
A vector where each index corresponds to a node and the value is the
distance from the start_node. None if the node is unreachable.
Calculates shortest path distances from a start node (BFS).
Calculates shortest path distances from a start node (BFS).
Sourcepub fn apply_pulse(&mut self, pulse: &EntropyPulse)
pub fn apply_pulse(&mut self, pulse: &EntropyPulse)
Applies a pulse to the entire system, causing decoherence. Applies a pulse to the entire system, causing decoherence.
Sourcepub fn measure_correlation(&mut self) -> FeedbackSignal
pub fn measure_correlation(&mut self) -> FeedbackSignal
Performs a simulated measurement and returns the correlation feedback.