{"library":"quimb","title":"quimb","description":"quimb is a versatile Python library for quantum information and many-body physics, offering tools for exact diagonalization, tensor networks (Matrix Product States, PEPS, etc.), quantum circuits, and general quantum mechanics simulations. It is currently at version 1.13.0 and maintains an active release cadence, with major and minor updates often arriving monthly or bi-monthly, frequently including breaking changes.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install quimb","pip install quimb[tensor,cut]"],"cli":null},"imports":["import quimb as qb","import quimb.tensor as qb.tn","from quimb.operator import OperatorBuilder","from quimb.tensor.belief_propagation import ..."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import quimb as qb\nimport quimb.tensor as qb.tn\n\n# Create a random state vector\npsi = qb.rand_ket(8)  # 8-dimensional random state\nprint(f\"State vector shape: {psi.shape}\")\n\n# Create a simple Matrix Product State (MPS)\nL = 10  # Number of sites\nD = 8   # Max bond dimension\nd = 2   # Local dimension\npsi_mps = qb.tn.rand_mps(L, D, d)\nprint(f\"MPS with {L} sites, max bond dim {psi_mps.max_bond_dim()}, local dim {d}\")\n\n# Calculate the MPS norm\nprint(f\"MPS norm: {psi_mps.norm()}\")\n\n# Contract the MPS to a single tensor (the full state vector)\n# Note: This can be memory intensive for large L and D\nfull_state_from_mps = psi_mps.contract()\nprint(f\"Full state from MPS shape: {full_state_from_mps.shape}\")","lang":"python","description":"This quickstart demonstrates creating a random state vector and a simple Matrix Product State (MPS) using quimb's core and tensor network modules, along with basic operations like calculating norm and contraction.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}