mercurial.branches.decoherence module
Branch decoherence: orthogonality and decoherence rate (Definition 5.1).
- class mercurial.branches.decoherence.BranchDecoherenceDynamics(decoherence_measure: DecoherenceMeasure)[source]
Bases:
objectSimulates the time evolution of branch state vectors under decoherence.
Methods
evolve_branch_state(state, dt[, ...])Simplified evolution: state loses coherence with environment. d|ψ>/dt = -γ_env |ψ> + noise.
evolve_pair(state_a, state_b, dt, entropy_a, ...)Evolve two branch states with mutual decoherence.
- evolve_branch_state(state: StateVector, dt: float, environment_noise: float = 0.01) StateVector[source]
Simplified evolution: state loses coherence with environment. d|ψ>/dt = -γ_env |ψ> + noise
- evolve_pair(state_a: StateVector, state_b: StateVector, dt: float, entropy_a: float, entropy_b: float) Tuple[StateVector, StateVector][source]
Evolve two branch states with mutual decoherence. The decoherence rate between them drives them apart.
- class mercurial.branches.decoherence.DecoherenceMeasure(base_rate: float = 0.1, environment_coupling: float = 0.01)[source]
Bases:
objectComputes decoherence between branches and the rate of decoherence.
Key concepts: - Orthogonality: |⟨x_a, x_b⟩| ≈ 0 - Decoherence rate: γ_dec = γ_0 * (1 - |⟨x_a, x_b⟩|²)
Methods
decoherence_rate(state_a, state_b, ...)γ_dec = γ_0 * (1 - |⟨x_a, x_b⟩|²) * f(S_a, S_b) where f(S) = exp(-(S_a + S_b)/S_crit) – higher entropy increases decoherence.
decoherence_time(state_a, state_b, ...)Characteristic time for decoherence: τ_dec = 1/γ_dec.
is_decohered(state_a, state_b[, threshold])Return True if branches are effectively decohered.
orthogonality(state_a, state_b)Orthogonality measure: 1 - |⟨x_a, x_b⟩|.
overlap(state_a, state_b)Compute |⟨x_a, x_b⟩|, the absolute value of the inner product.
- __init__(base_rate: float = 0.1, environment_coupling: float = 0.01)[source]
- Parameters:
- base_ratefloat
γ_0 – maximum decoherence rate (per second).
- environment_couplingfloat
Coupling to environmental degrees of freedom that drive decoherence.
- decoherence_rate(state_a: StateVector, state_b: StateVector, entropy_a: float, entropy_b: float) float[source]
γ_dec = γ_0 * (1 - |⟨x_a, x_b⟩|²) * f(S_a, S_b) where f(S) = exp(-(S_a + S_b)/S_crit) – higher entropy increases decoherence.
- decoherence_time(state_a: StateVector, state_b: StateVector, entropy_a: float, entropy_b: float) float[source]
Characteristic time for decoherence: τ_dec = 1/γ_dec.
- is_decohered(state_a: StateVector, state_b: StateVector, threshold: float = 0.99) bool[source]
Return True if branches are effectively decohered. threshold = 0.99 means 99% orthogonal.
- orthogonality(state_a: StateVector, state_b: StateVector) float[source]
Orthogonality measure: 1 - |⟨x_a, x_b⟩|. Fully orthogonal = 1, identical = 0.
- overlap(state_a: StateVector, state_b: StateVector) float[source]
Compute |⟨x_a, x_b⟩|, the absolute value of the inner product.