qcsys


Nameqcsys JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/EQuS/qcsys
Summaryqcsys
upload_time2024-03-04 10:51:19
maintainer
docs_urlNone
authorShantanu Jha, Shoumik Chowdhury
requires_python>=3.7
licenseApache 2.0
keywords quantum computing circuits
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # qcsys

[![License](https://img.shields.io/github/license/EQuS/qcsys.svg?style=popout-square)](https://opensource.org/license/apache-2-0) [![](https://img.shields.io/github/release/EQuS/qcsys.svg?style=popout-square)](https://github.com/EQuS/qcsys/releases) [![](https://img.shields.io/pypi/dm/qcsys.svg?style=popout-square)](https://pypi.org/project/qcsys/)

[S. R. Jha](https://github.com/Phionx), [S. Chowdhury](https://github.com/shoumikdc), [M. Hays](https://scholar.google.com/citations?user=06z0MjwAAAAJ), [J. A. Grover](https://scholar.google.com/citations?user=igewch8AAAAJ), [W. D. Oliver](https://scholar.google.com/citations?user=4vNbnqcAAAAJ&hl=en)


**Docs:** [https://equs.github.io/qcsys](https://equs.github.io/qcsys)

Built on JAX,  `qcsys` presents a scalable way to assemble and simulate systems of quantum circuits. 

## Installation

`qcsys` is published on PyPI. Simply run the following code to install the package:


```bash
pip install qcsys
```

For more details, please visit the getting started > installation section of our [docs](https://equs.github.io/qcsys/getting_started/installation.html).

## An Example

Here's an example on how to use `qcsys`:

```
import qcsys as qs


# Devices ----


_, Ec_a, El_a = qs.calculate_lambda_over_four_resonator_zpf(3, 50)

resonator = qs.Resonator.create(
    10,
    {"Ec": Ec_a, "El": El_a},
    N_pre_diag=10,
)


Ec_q = 1
El_q = 0.5
Ej_q = 8

qubit = qs.Fluxonium.create(
    25,
    {"Ec": Ec_q, "El": El_q, "Ej": Ej_q, "phi_ext": 0.47},
    use_linear=False,
    N_pre_diag=100,
)

# System ----

g_rq = 0.3

devices = [resonator, qubit]
r_indx = 0
q_indx = 1
Ns = [device.N for device in devices]

a0 = qs.promote(resonator.ops["a"], r_indx, Ns)
a0_dag = qs.promote(resonator.ops["a_dag"], r_indx, Ns)

q0 = qs.promote(qubit.ops["a"], q_indx, Ns)
q0_dag = qs.promote(qubit.ops["a_dag"], q_indx, Ns)

couplings = []
couplings.append(-g_rq * (a0 - a0_dag) @ (q0 - q0_dag))

system = qs.System.create(devices, couplings=couplings)
system.params["g_rq"] = g_rq

Es, kets = system.calculate_eig_linear()

# chi ----
χ_e = Es[1:, 1] - Es[:-1, 1]
χ_g = Es[1:, 0] - Es[:-1, 0]
χ = χ_e - χ_g

# kerr ----
# kerr[0,n] = (E(n+2, g) - E(n+1, g)) - (E(n+1, g) - E(n, g))
# kerr[1,n] = (E(n+2, e) - E(n+1, e)) - (E(n+1, e) - E(n, e))
K_g = (Es[2:, 0] - Es[1:-1, 0]) - (Es[1:-1, 0] - Es[0:-2, 0])
K_e = (Es[2:, 1] - Es[1:-1, 1]) - (Es[1:-1, 1] - Es[0:-2, 1])

χ, K_g, K_e
```



## Acknowledgements & History

**Core Devs:** [Shantanu A. Jha](https://github.com/Phionx), [Shoumik Chowdhury](https://github.com/shoumikdc)


This package was initially developed in early 2023 to aid in the design of a superconducting circuit device made for bosonic quantum error correction. This package was also briefly announced to the world at APS March Meeting 2023. Since then, this package has been open sourced and developed while conducting research in the Engineering Quantum Systems Group at MIT with invaluable advice from [Prof. William D. Oliver](https://equs.mit.edu/william-d-oliver/). 

## Citation

Thank you for taking the time to try our package out. If you found it useful in your research, please cite us as follows:

``` 
@unpublished{jha2024jaxquantum,
  title  = {An auto differentiable and hardware accelerated software toolkit for quantum circuit design, simulation and control},
  author = {Shantanu R. Jha, Shoumik Chowdhury, Max Hays, Jeff A. Grover, William D. Oliver},
  year   = {2024},
  url    = {https://github.com/EQuS/jaxquantum, https://github.com/EQuS/bosonic-jax, https://github.com/EQuS/qcsys}
}
```
> S. R. Jha, S. Chowdhury, M. Hays, J. A. Grover, W. D. Oliver. An auto differentiable and hardware accelerated software toolkit for quantum circuit design, simulation and control (2024), in preparation.


## Contributions & Contact

This package is open source and, as such, very open to contributions. Please don't hesitate to open an issue, report a bug, request a feature, or create a pull request. We are also open to deeper collaborations to create a tool that is more useful for everyone. If a discussion would be helpful, please email [shanjha@mit.edu](mailto:shanjha@mit.edu) to set up a meeting. 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EQuS/qcsys",
    "name": "qcsys",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "quantum computing circuits",
    "author": "Shantanu Jha, Shoumik Chowdhury",
    "author_email": "shantanu.rajesh.jha@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/90/32/84beb847b5a7e3afbd8d25fb78dbe5184585664ee2e560a0b8eb6e22e8af/qcsys-0.1.0.tar.gz",
    "platform": null,
    "description": "# qcsys\n\n[![License](https://img.shields.io/github/license/EQuS/qcsys.svg?style=popout-square)](https://opensource.org/license/apache-2-0) [![](https://img.shields.io/github/release/EQuS/qcsys.svg?style=popout-square)](https://github.com/EQuS/qcsys/releases) [![](https://img.shields.io/pypi/dm/qcsys.svg?style=popout-square)](https://pypi.org/project/qcsys/)\n\n[S. R. Jha](https://github.com/Phionx), [S. Chowdhury](https://github.com/shoumikdc), [M. Hays](https://scholar.google.com/citations?user=06z0MjwAAAAJ), [J. A. Grover](https://scholar.google.com/citations?user=igewch8AAAAJ), [W. D. Oliver](https://scholar.google.com/citations?user=4vNbnqcAAAAJ&hl=en)\n\n\n**Docs:** [https://equs.github.io/qcsys](https://equs.github.io/qcsys)\n\nBuilt on JAX,  `qcsys` presents a scalable way to assemble and simulate systems of quantum circuits. \n\n## Installation\n\n`qcsys` is published on PyPI. Simply run the following code to install the package:\n\n\n```bash\npip install qcsys\n```\n\nFor more details, please visit the getting started > installation section of our [docs](https://equs.github.io/qcsys/getting_started/installation.html).\n\n## An Example\n\nHere's an example on how to use `qcsys`:\n\n```\nimport qcsys as qs\n\n\n# Devices ----\n\n\n_, Ec_a, El_a = qs.calculate_lambda_over_four_resonator_zpf(3, 50)\n\nresonator = qs.Resonator.create(\n    10,\n    {\"Ec\": Ec_a, \"El\": El_a},\n    N_pre_diag=10,\n)\n\n\nEc_q = 1\nEl_q = 0.5\nEj_q = 8\n\nqubit = qs.Fluxonium.create(\n    25,\n    {\"Ec\": Ec_q, \"El\": El_q, \"Ej\": Ej_q, \"phi_ext\": 0.47},\n    use_linear=False,\n    N_pre_diag=100,\n)\n\n# System ----\n\ng_rq = 0.3\n\ndevices = [resonator, qubit]\nr_indx = 0\nq_indx = 1\nNs = [device.N for device in devices]\n\na0 = qs.promote(resonator.ops[\"a\"], r_indx, Ns)\na0_dag = qs.promote(resonator.ops[\"a_dag\"], r_indx, Ns)\n\nq0 = qs.promote(qubit.ops[\"a\"], q_indx, Ns)\nq0_dag = qs.promote(qubit.ops[\"a_dag\"], q_indx, Ns)\n\ncouplings = []\ncouplings.append(-g_rq * (a0 - a0_dag) @ (q0 - q0_dag))\n\nsystem = qs.System.create(devices, couplings=couplings)\nsystem.params[\"g_rq\"] = g_rq\n\nEs, kets = system.calculate_eig_linear()\n\n# chi ----\n\u03c7_e = Es[1:, 1] - Es[:-1, 1]\n\u03c7_g = Es[1:, 0] - Es[:-1, 0]\n\u03c7 = \u03c7_e - \u03c7_g\n\n# kerr ----\n# kerr[0,n] = (E(n+2, g) - E(n+1, g)) - (E(n+1, g) - E(n, g))\n# kerr[1,n] = (E(n+2, e) - E(n+1, e)) - (E(n+1, e) - E(n, e))\nK_g = (Es[2:, 0] - Es[1:-1, 0]) - (Es[1:-1, 0] - Es[0:-2, 0])\nK_e = (Es[2:, 1] - Es[1:-1, 1]) - (Es[1:-1, 1] - Es[0:-2, 1])\n\n\u03c7, K_g, K_e\n```\n\n\n\n## Acknowledgements & History\n\n**Core Devs:** [Shantanu A. Jha](https://github.com/Phionx), [Shoumik Chowdhury](https://github.com/shoumikdc)\n\n\nThis package was initially developed in early 2023 to aid in the design of a superconducting circuit device made for bosonic quantum error correction. This package was also briefly announced to the world at APS March Meeting 2023. Since then, this package has been open sourced and developed while conducting research in the Engineering Quantum Systems Group at MIT with invaluable advice from [Prof. William D. Oliver](https://equs.mit.edu/william-d-oliver/). \n\n## Citation\n\nThank you for taking the time to try our package out. If you found it useful in your research, please cite us as follows:\n\n``` \n@unpublished{jha2024jaxquantum,\n  title  = {An auto differentiable and hardware accelerated software toolkit for quantum circuit design, simulation and control},\n  author = {Shantanu R. Jha, Shoumik Chowdhury, Max Hays, Jeff A. Grover, William D. Oliver},\n  year   = {2024},\n  url    = {https://github.com/EQuS/jaxquantum, https://github.com/EQuS/bosonic-jax, https://github.com/EQuS/qcsys}\n}\n```\n> S. R. Jha, S. Chowdhury, M. Hays, J. A. Grover, W. D. Oliver. An auto differentiable and hardware accelerated software toolkit for quantum circuit design, simulation and control (2024), in preparation.\n\n\n## Contributions & Contact\n\nThis package is open source and, as such, very open to contributions. Please don't hesitate to open an issue, report a bug, request a feature, or create a pull request. We are also open to deeper collaborations to create a tool that is more useful for everyone. If a discussion would be helpful, please email [shanjha@mit.edu](mailto:shanjha@mit.edu) to set up a meeting. \n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "qcsys",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://equs.github.io/qcsys",
        "Homepage": "https://github.com/EQuS/qcsys",
        "Source Code": "https://github.com/EQuS/qcsys",
        "Tutorials": "https://github.com/EQuS/qcsys/tree/master/tutorials"
    },
    "split_keywords": [
        "quantum",
        "computing",
        "circuits"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "903284beb847b5a7e3afbd8d25fb78dbe5184585664ee2e560a0b8eb6e22e8af",
                "md5": "0ebffa832610bed6b068c8d78eda3dd0",
                "sha256": "a5285da1136ebd38783e5353539a698760bc80b85a6e1b3714ffa94bc3f961c2"
            },
            "downloads": -1,
            "filename": "qcsys-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0ebffa832610bed6b068c8d78eda3dd0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18030,
            "upload_time": "2024-03-04T10:51:19",
            "upload_time_iso_8601": "2024-03-04T10:51:19.659420Z",
            "url": "https://files.pythonhosted.org/packages/90/32/84beb847b5a7e3afbd8d25fb78dbe5184585664ee2e560a0b8eb6e22e8af/qcsys-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-04 10:51:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EQuS",
    "github_project": "qcsys",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "qcsys"
}
        
Elapsed time: 0.19444s