Skip to main content

partial_trace_sector_state

Function partial_trace_sector_state 

Source
pub fn partial_trace_sector_state<State>(
    amplitudes: &[Complex64],
    basis_states: &[State],
    total_sites: usize,
    retained_sites: &[usize],
    noncommuting_groups: &[NoncommutingGroup],
) -> Result<Vec<Complex64>>
where State: BinaryState,
Expand description

Reduced density matrix of a pure state stored in an arbitrary binary sector basis.

The contraction groups amplitudes by the environment bit pattern. It never enumerates or allocates the unrestricted 2^total_sites parent space; memory is proportional to the supplied sector and the requested dense subsystem matrix.