fock


Namefock JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/magelead/fock
SummaryA continuous variable quantum neural network simulating framework written in PyTorch.
upload_time2022-05-14 05:53:26
maintainer
docs_urlNone
authorXiang Zhao
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Fock

A continuous variable quantum neural network simulating framework written in PyTorch. 

The name of the package comes from the fact that the Fock basis representation is used as the  munderlining mathematics.

It is forked from strawberryfields==0.10.0.





# Development Notes (Don't look)

torch.einsum('i,j->ij', x, y)

$|x\rangle \otimes |y \rangle = x_i y_j$ 

torch.einsum: Multiply each component of each operand then sum if possible.

Tensor product genralizes outer product.



# Todo

test_circuit.py













# How to debug







**test env named torch**



numpy==1.22.3

tensorflow-macos==2.8.0

torch==1.11.0



install fock from repo in editible mode

in the same directory as `setup.cfg`

```
pip install -e .
```





**migrate**

migrate strawberryfields==0.10.0 to tf2.0 then run comparison test to fock



**test**

write test logic

```
 cd tests/
 python3 test_ops.py
```





# Push to Github

in the same directory as `setup.cfg`

```
git add .
git commit -m ''
git push
```





# Publish to PyPI



change version number in `setup.cfg`

in the same directory as `setup.cfg`

```
python3 -m pip install --upgrade build
```

```
python3 -m build
```

```
python3 -m pip install --upgrade twine
```

```
python3 -m twine upload dist/*
```







# References

https://packaging.python.org/en/latest/tutorials/packaging-projects/

https://stackoverflow.com/questions/5341006/where-should-i-put-tests-when-packaging-python-modules


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/magelead/fock",
    "name": "fock",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Xiang Zhao",
    "author_email": "magelead@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/dd/51/f0a16fa379641b0d7a97f6f01ade2bf9f7f886eaf56edbbb56b02b027cdc/fock-0.0.4.tar.gz",
    "platform": null,
    "description": "# Fock\n\nA continuous variable quantum neural network simulating framework written in PyTorch. \n\nThe name of the package comes from the fact that the Fock basis representation is used as the  munderlining mathematics.\n\nIt is forked from strawberryfields==0.10.0.\n\n\n\n\n\n# Development Notes (Don't look)\n\ntorch.einsum('i,j->ij', x, y)\n\n$|x\\rangle \\otimes |y \\rangle = x_i y_j$ \n\ntorch.einsum: Multiply each component of each operand then sum if possible.\n\nTensor product genralizes outer product.\n\n\n\n# Todo\n\ntest_circuit.py\n\n\n\n\n\n\n\n\n\n\n\n\n\n# How to debug\n\n\n\n\n\n\n\n**test env named torch**\n\n\n\nnumpy==1.22.3\n\ntensorflow-macos==2.8.0\n\ntorch==1.11.0\n\n\n\ninstall fock from repo in editible mode\n\nin the same directory as `setup.cfg`\n\n```\npip install -e .\n```\n\n\n\n\n\n**migrate**\n\nmigrate strawberryfields==0.10.0 to tf2.0 then run comparison test to fock\n\n\n\n**test**\n\nwrite test logic\n\n```\n cd tests/\n python3 test_ops.py\n```\n\n\n\n\n\n# Push to Github\n\nin the same directory as `setup.cfg`\n\n```\ngit add .\ngit commit -m ''\ngit push\n```\n\n\n\n\n\n# Publish to PyPI\n\n\n\nchange version number in `setup.cfg`\n\nin the same directory as `setup.cfg`\n\n```\npython3 -m pip install --upgrade build\n```\n\n```\npython3 -m build\n```\n\n```\npython3 -m pip install --upgrade twine\n```\n\n```\npython3 -m twine upload dist/*\n```\n\n\n\n\n\n\n\n# References\n\nhttps://packaging.python.org/en/latest/tutorials/packaging-projects/\n\nhttps://stackoverflow.com/questions/5341006/where-should-i-put-tests-when-packaging-python-modules\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A continuous variable quantum neural network simulating framework written in PyTorch.",
    "version": "0.0.4",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "be49671ea3f4952722b7b020bf830f9f",
                "sha256": "8ca7f1ac8d4f0caa726a792a48d99ea03e86395fd2d5a2d95d9f22ac740c8c86"
            },
            "downloads": -1,
            "filename": "fock-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "be49671ea3f4952722b7b020bf830f9f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6887,
            "upload_time": "2022-05-14T05:53:24",
            "upload_time_iso_8601": "2022-05-14T05:53:24.172234Z",
            "url": "https://files.pythonhosted.org/packages/33/70/2afe1bd6b51ccc93b39c70ae1a427aac014cbf586a400e644d49cb644b9f/fock-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "55e8e272fd41aa210c0eaf759e7989d0",
                "sha256": "953f7551e9bc11dffca9aa976a6d9099bce1ab5b9464e1b5c2215f1a9160e92a"
            },
            "downloads": -1,
            "filename": "fock-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "55e8e272fd41aa210c0eaf759e7989d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6560,
            "upload_time": "2022-05-14T05:53:26",
            "upload_time_iso_8601": "2022-05-14T05:53:26.181229Z",
            "url": "https://files.pythonhosted.org/packages/dd/51/f0a16fa379641b0d7a97f6f01ade2bf9f7f886eaf56edbbb56b02b027cdc/fock-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-05-14 05:53:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "magelead",
    "github_project": "fock",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fock"
}
        
Elapsed time: 0.34096s