Skip to main content

Quantum State Preparation

This repository provides an implementation of various methods for preparing tensor network states (specifically, 1D tensor network states) on a quantum computer.

To use the package, you first need to specify a list of NumPy arrays that represent the MPS. You can then call different routines in the package to prepare the state.

Installation

pip install qsp

One can also install the development version directly as

pip install git+https://github.com/mohsin-0/qsp.git@main

Tutorial

Usage tutorial and some benchmarks

Basic Example

from qsp.tsp import MPSPreparation
import numpy as np
bond_dim, phys_dim = 4, 2

L=10
tensor_array = [np.random.rand(bond_dim,bond_dim,phys_dim) for _ in range(L)]
tensor_array[ 0] = np.random.rand(bond_dim,phys_dim)  # end points of mps
tensor_array[-1] = np.random.rand(bond_dim,phys_dim)
prep = MPSPreparation(tensor_array, shape='lrp')

overlap, circ = prep.sequential_unitary_circuit(num_seq_layers=4)

References

  1. Encoding of matrix product states into quantum circuits of one-and two-qubit gates,
    Shi-Ju Ran, Phys. Rev. A 101, 032310 (2020)

  2. Variational power of quantum circuit tensor networks,
    Reza Haghshenas, Johnnie Gray, Andrew C Potter, and Garnet Kin-Lic Chan, Phys. Rev. X 12, 011047 (2022)

  3. Preentangling Quantum Algorithms--the Density Matrix Renormalization Group-assisted Quantum Canonical Transformation,
    Mohsin Iqbal, David Munoz Ramo and Henrik Dreyer, arXiv preprint arXiv:2209.07106 (2022)

  4. Efficient adiabatic preparation of tensor network states,
    Zhi-Yuan Wei, Daniel Malz and Ignacio J. Cirac, Phys. Rev. Research 5, L022037 (2023)

Metadata

Release files for qsp 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for qsp 0.0.5
File Interpreter ABI Platform Actions
qsp-0.0.5-py3-none-any.whl Python 3 none any Details for qsp-0.0.5-py3-none-any.whl

Release files / qsp-0.0.5-py3-none-any.whl

Download URL qsp-0.0.5-py3-none-any.whl
Size 37.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
029410bd528515ca0b72ce6afcbe7f7c1862d0bd400378c04851f40b8605861e
BLAKE2b-256 checksum
How to use checksums
b93af18c235f899accac5b5bd41ea3072a7135e2c98e97a3c7ff0a92d3fba812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for qsp 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page