semvec/pypi-packages huggingface dataset:
tensor-disentangler 0.0.1
Numerical optimization of tensor network disentanglers
Requires Python: >=3.9

# Tensor Disentangler

tensor-disentangler is a Python package that optimizes 'disentangling' unitary matrices to reduce bond-dimension in a given tensor. It is built on Pymanopt and designed to be used in tensor network algorithms for quantum many-body calculations and beyond. For example, disentangling is important for tensor network renormalization, isometric tensor network states, MERA, purified mixed-state MPS, and unitary tensor networks. 

The user provides the tensor, dimensions of the tensor on which the unitary matrix is applied, and dimensions across which entanglement is minimized. 

## Installation 

We should make this available via pip

## Usage

### `disentangle(X, dis_legs, svd_legs, **kwargs)`

- `X`: The input tensor (NumPy array) to be disentangled.
- `dis_legs`: A list of legs of `X` on which the unitary disentangling matrix acts.
- `svd_legs`: A list of legs of `X` across which the entanglement is minimized.

For example, if `X` is a 4D NumPy array then

```python
Q, U, S, V = disentangle(X, dis_legs=[0, 1], svd_legs=[0, 2], **kwargs)
```
optimizes a unitary matrix `Q` to minimize the error when truncating the SVD in the following tensor network diagram

<img src="images/dis_4ten.svg" alt="Disentangling Diagram" width="400"/>

## Features
tensor-disentangler has support for various optimizers and objective functions for disentangling. 
The optimizer, objective function, and other options can be specified with keyword arguments. For a comprehensive list we should write some documentation. 

- Optimization algorithm: Alternating, Riemannian Conjugate Gradient, Riemannian Steepest Descent, and more
- Optimization objective function: Renyi entropy, Von-Neumann entropy, or truncation error
- Initial disentangler: identity, random, or user-supplied
- Maximum wall time and other optimizer specific stopping criteria
- Other advanced options
sh3d.py 0.2.2
Sweet home 3D file format implementation in python
Requires Python: >=3.11

# sh3d.py

Python library for reading Sweet Home 3D file format (*.sh3d). Internally sh3d is just another zip archive with JavaObject dump (as Home) and XML dump (as Home.xml) and attached files, this library supports reading them all and provides corresponding python objects representing sh3d data.

## Install

```bash
pip install sh3d.py
```

## Usage

### Loading full data from Home JavaObject dump

```python
from sh3d.FileLoader import FileLoader, HomeSource


# Default is parsion of JavaObject Home
with FileLoader('myHome.sh3d') as file_loader:
    
    # Dump home, ~all models are dataclasses so you will actually see full readable dump
    print(file_loader.home)

# Load home from Home.xml instead
with FileLoader('myHome.sh3d', home_source=HomeSource.XML) as file_loader:
    
    # Dump home, ~all models are dataclasses so you will actually see full readable dump
    print(file_loader.home)  # Home object
```

## Home object structure

```python
class Home:
    name: str 
    version: int
    wall_height: float
    levels: List[Level]  # Implemented, represents list of Home plan levels
    furniture: List[HomePieceOfFurniture]  # Implemented, represents list of furniture including doors and windows as HomeDoorOrWindow object that is child of HomePieceOfFurniture
    rooms: List[Room]  # Implemented, represents list of rooms
    walls: List[Wall]  # Implemented, represents list of walls
    dimension_lines: List[DimensionLine]  # Implemented, represents list of dimension lines (measurements)
    labels: List[Label] # Implemented, represents list of labels (texts)
    polylines: List[Polyline]  # Implemented, represents list of polylines 
    background_image: BackgroundImage # Implemented, represents background image
    environment: HomeEnvironment  # Implemented, represents home environment / config
    compass: Compass  # Implemented
    
```