qsp


Nameqsp JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/mohsin-0/qsp
Summaryimplementation of different methods to prepare quantum states on quantum computer
upload_time2023-09-12 03:21:28
maintainer
docs_urlNone
authorMohsin Iqbal
requires_python>=3.9
licenseApache License 2.0
keywords quantum state preparation tensor networks
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/mohsin-0/qsp/blob/main/examples/state_prep_examples.ipynb) and some [benchmarks](https://github.com/mohsin-0/qsp/blob/main/examples/benchmarks.ipynb)


## Basic Example

```python
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](https://arxiv.org/abs/1908.07958),\
   Shi-Ju Ran, Phys. Rev. A 101, 032310 (2020)
   
2. [Variational power of quantum circuit tensor networks](https://arxiv.org/abs/2107.01307),\
   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](https://arxiv.org/abs/2209.07106),\
   Mohsin Iqbal,  David Munoz Ramo and Henrik Dreyer, arXiv preprint arXiv:2209.07106 (2022)
   
4. [Efficient adiabatic preparation of tensor network states](https://arxiv.org/abs/2209.01230),\
   Zhi-Yuan Wei, Daniel Malz and Ignacio J. Cirac, Phys. Rev. Research 5, L022037 (2023)
   


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mohsin-0/qsp",
    "name": "qsp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "quantum state preparation tensor networks",
    "author": "Mohsin Iqbal",
    "author_email": "mohsin.iqbal@cambridgequantum.com",
    "download_url": "",
    "platform": null,
    "description": "# Quantum State Preparation\n\nThis repository provides an implementation of various methods for preparing tensor network states (specifically, 1D tensor network states) on a quantum computer. \n\nTo use the package, you first need to specify a list of NumPy arrays that represent the MPS. You can then \ncall different routines in the package to prepare the state.\n\n## Installation\n\n```\npip install qsp\n```\n\nOne can also install the development version directly as \n```\npip install git+https://github.com/mohsin-0/qsp.git@main\n```\n\n## Tutorial\n[Usage tutorial](https://github.com/mohsin-0/qsp/blob/main/examples/state_prep_examples.ipynb) and some [benchmarks](https://github.com/mohsin-0/qsp/blob/main/examples/benchmarks.ipynb)\n\n\n## Basic Example\n\n```python\nfrom qsp.tsp import MPSPreparation\nimport numpy as np\nbond_dim, phys_dim = 4, 2\n\nL=10\ntensor_array = [np.random.rand(bond_dim,bond_dim,phys_dim) for _ in range(L)]\ntensor_array[ 0] = np.random.rand(bond_dim,phys_dim)  # end points of mps\ntensor_array[-1] = np.random.rand(bond_dim,phys_dim)\nprep = MPSPreparation(tensor_array, shape='lrp')\n\noverlap, circ = prep.sequential_unitary_circuit(num_seq_layers=4)\n```\n\n## References\n1. [Encoding of matrix product states into quantum circuits of one-and two-qubit gates](https://arxiv.org/abs/1908.07958),\\\n   Shi-Ju Ran, Phys. Rev. A 101, 032310 (2020)\n   \n2. [Variational power of quantum circuit tensor networks](https://arxiv.org/abs/2107.01307),\\\n   Reza Haghshenas, Johnnie Gray, Andrew C Potter,  and Garnet Kin-Lic Chan, Phys. Rev. X 12, 011047 (2022)\n   \n3. [Preentangling Quantum Algorithms--the Density Matrix Renormalization Group-assisted Quantum Canonical Transformation](https://arxiv.org/abs/2209.07106),\\\n   Mohsin Iqbal,  David Munoz Ramo and Henrik Dreyer, arXiv preprint arXiv:2209.07106 (2022)\n   \n4. [Efficient adiabatic preparation of tensor network states](https://arxiv.org/abs/2209.01230),\\\n   Zhi-Yuan Wei, Daniel Malz and Ignacio J. Cirac, Phys. Rev. Research 5, L022037 (2023)\n   \n\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "implementation of different methods to prepare quantum states on quantum computer",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/mohsin-0/qsp"
    },
    "split_keywords": [
        "quantum",
        "state",
        "preparation",
        "tensor",
        "networks"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b93af18c235f899accac5b5bd41ea3072a7135e2c98e97a3c7ff0a92d3fba812",
                "md5": "d7779285905bcf2d15e5a3e65d9fa02d",
                "sha256": "029410bd528515ca0b72ce6afcbe7f7c1862d0bd400378c04851f40b8605861e"
            },
            "downloads": -1,
            "filename": "qsp-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7779285905bcf2d15e5a3e65d9fa02d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 37751,
            "upload_time": "2023-09-12T03:21:28",
            "upload_time_iso_8601": "2023-09-12T03:21:28.532868Z",
            "url": "https://files.pythonhosted.org/packages/b9/3a/f18c235f899accac5b5bd41ea3072a7135e2c98e97a3c7ff0a92d3fba812/qsp-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-12 03:21:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mohsin-0",
    "github_project": "qsp",
    "github_not_found": true,
    "lcname": "qsp"
}
        
Elapsed time: 0.14853s