tlquantum.density_tensor.DensityTensor

class tlquantum.density_tensor.DensityTensor(tensor, subsystems)[source]

A quantum state container for state and density matrix operations, including partial traces and quantum information metric calculations.

Parameters:
tensortt-tensor, state or density matrix
subsystemslist of ints, system sizes in correspondence of the size of tensor
Returns:
DensityTensor

Methods

mutual_information(kept_indices1, kept_indices2)

Mutual Information for the partial traces of the specified kept indices.

partial_trace_dm(kept_indices)

Partial trace for density matrix.

partial_trace_state(kept_indices)

Partial trace for state vector.

vonneumann_entropy(kept_indices)

Von Neumann entropy for the partial trace of the density tensor.

partial_trace_dm(kept_indices)[source]

Partial trace for density matrix.

Parameters:
kept_indiceslist of int, indices to not trace over and keep for ptrace
Returns:
DensityTensor, result of partial trace
partial_trace_state(kept_indices)[source]

Partial trace for state vector.

Parameters:
kept_indiceslist of int, indices to not trace over and keep for partial trace
Returns:
DensityTensor, result of partial trace
vonneumann_entropy(kept_indices)[source]

Von Neumann entropy for the partial trace of the density tensor.

Parameters:
kept_indiceslist of int, indices to not trace over and keep for partial trace
Returns:
float, Von Neumann entropy of specified partial trace
mutual_information(kept_indices1, kept_indices2)[source]

Mutual Information for the partial traces of the specified kept indices.

Parameters:
kept_indices1list of int, indices to not trace over and keep for partial trace
kept_indices2list of int, indices to not trace over and keep for partial trace
Returns:
float, Mutual Information of specified partial traces