rectset


Namerectset JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryAnalytical potentials for rectangle electrodes in a surface ion trap
upload_time2023-11-23 09:27:41
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Carmelo Mordini Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords python trapped ions surface electrodes set ion trap quantum computing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rectset

[![License](https://img.shields.io/badge/License-MIT-g.svg?style=flat-square)](https://opensource.org/license/mit/)
[![DOI](https://zenodo.org/badge/659181965.svg)](https://zenodo.org/badge/latestdoi/659181965)

Analytical potentials for rectangle electrodes in a surface ion trap.

This package provides numpy functions to calculate analytically the electric potential, gradient, and hessian generated by a rectangular electrode in the upper half-space above it $(z > 0)$.

## Install

```bash
pip install rectset
```

## Dependencies

`numpy`

## API

`rectangle_electrode.py`

Static potential, gradient and hessian generated by a rectangle electrode of finite size delimited by corner points $(x_1, y_1)$ and $(x_2, y_2)$, set at a DC potential of 1 V.

`pseudopotential.py`

Static potential and gradient of a pair of electrodes symmetric around $y = 0$, separated by a distance $a$, of width $w$ and infinitely extended along $x$; pseudopotential generated by the same pair loaded by an AC voltage of amplitude 1 V, frequency of 1 MHz, for a particle of charge +1 elementary charge and of mass 1 amu.

![Geometry](.assets/geometry.svg)

## Usage

```python
import numpy as np
from rectset import rectangle_electrode as rect
from rectset import pseudopotential as ps

# Square electrode of 20 x 20 um
# Potential and derivatives along one line at 50 um above the trap plane

x1, y1 = -10e-6, -10e-6
x2, y2 = 10e-6, 10e-6

x = np.linspace(-100, 100) * 1e-6
y = 0
z = 50e-6

pot = rect.rect_el_potential(x, y, z, x1, x2, y1, y2)  # ndarray, shape (50,)
grad = rect.rect_el_gradient(x, y, z, x1, x2, y1, y2)  # ndarray, shape (50, 3)
hess = rect.rect_el_hessian(x, y, z, x1, x2, y1, y2)  # ndarray, shape (50, 3, 3)


# Infinite pair of RF electrodes, large 100 um and separated by 40 um
# Pseudopotential and derivatives experienced by a 40Ca+ ion with
# RF voltage amplitude = 50 V
# RF voltage frequency = 30 MHz

a = 40e-6
w = 100e-6
rf_v = 50  # volt
rf_freq_mhz = 30  # megahertz
ion_unit_charge = 1  # elementary charge
ion_mass_amu = 40  # amu

K = (rf_v**2 * ion_unit_charge) / (ion_mass_amu * rf_freq_mhz**2)  # trap and ion scaling factor

pspot = K * ps.pseudo_potential(x, y, z, a, w)  # ndarray, shape (50,)
psgrad = K * ps.pseudo_gradient(x, y, z, a, w)  # ndarray, shape (50, 3)
pshess = K * ps.pseudo_hessian(x, y, z, a, w)  # ndarray, shape (50, 3, 3)

```

## References

M.G.House, "Analytic model for electrostatic fields in surface-electrode ion traps", Phys. Rev. A 78, 033402 (2008) <https://doi.org/10.1103/PhysRevA.78.033402>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "rectset",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "python,trapped ions,surface electrodes,SET,ion trap,quantum computing",
    "author": "",
    "author_email": "Carmelo Mordini <carmelo.mordini@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b2/0d/ead70f1e681847fdb6a0127334af7ebc2aef1444d9fbc86a8e30ad54cbfb/rectset-1.0.1.tar.gz",
    "platform": null,
    "description": "# rectset\n\n[![License](https://img.shields.io/badge/License-MIT-g.svg?style=flat-square)](https://opensource.org/license/mit/)\n[![DOI](https://zenodo.org/badge/659181965.svg)](https://zenodo.org/badge/latestdoi/659181965)\n\nAnalytical potentials for rectangle electrodes in a surface ion trap.\n\nThis package provides numpy functions to calculate analytically the electric potential, gradient, and hessian generated by a rectangular electrode in the upper half-space above it $(z > 0)$.\n\n## Install\n\n```bash\npip install rectset\n```\n\n## Dependencies\n\n`numpy`\n\n## API\n\n`rectangle_electrode.py`\n\nStatic potential, gradient and hessian generated by a rectangle electrode of finite size delimited by corner points $(x_1, y_1)$ and $(x_2, y_2)$, set at a DC potential of 1 V.\n\n`pseudopotential.py`\n\nStatic potential and gradient of a pair of electrodes symmetric around $y = 0$, separated by a distance $a$, of width $w$ and infinitely extended along $x$; pseudopotential generated by the same pair loaded by an AC voltage of amplitude 1 V, frequency of 1 MHz, for a particle of charge +1 elementary charge and of mass 1 amu.\n\n![Geometry](.assets/geometry.svg)\n\n## Usage\n\n```python\nimport numpy as np\nfrom rectset import rectangle_electrode as rect\nfrom rectset import pseudopotential as ps\n\n# Square electrode of 20 x 20 um\n# Potential and derivatives along one line at 50 um above the trap plane\n\nx1, y1 = -10e-6, -10e-6\nx2, y2 = 10e-6, 10e-6\n\nx = np.linspace(-100, 100) * 1e-6\ny = 0\nz = 50e-6\n\npot = rect.rect_el_potential(x, y, z, x1, x2, y1, y2)  # ndarray, shape (50,)\ngrad = rect.rect_el_gradient(x, y, z, x1, x2, y1, y2)  # ndarray, shape (50, 3)\nhess = rect.rect_el_hessian(x, y, z, x1, x2, y1, y2)  # ndarray, shape (50, 3, 3)\n\n\n# Infinite pair of RF electrodes, large 100 um and separated by 40 um\n# Pseudopotential and derivatives experienced by a 40Ca+ ion with\n# RF voltage amplitude = 50 V\n# RF voltage frequency = 30 MHz\n\na = 40e-6\nw = 100e-6\nrf_v = 50  # volt\nrf_freq_mhz = 30  # megahertz\nion_unit_charge = 1  # elementary charge\nion_mass_amu = 40  # amu\n\nK = (rf_v**2 * ion_unit_charge) / (ion_mass_amu * rf_freq_mhz**2)  # trap and ion scaling factor\n\npspot = K * ps.pseudo_potential(x, y, z, a, w)  # ndarray, shape (50,)\npsgrad = K * ps.pseudo_gradient(x, y, z, a, w)  # ndarray, shape (50, 3)\npshess = K * ps.pseudo_hessian(x, y, z, a, w)  # ndarray, shape (50, 3, 3)\n\n```\n\n## References\n\nM.G.House, \"Analytic model for electrostatic fields in surface-electrode ion traps\", Phys. Rev. A 78, 033402 (2008) <https://doi.org/10.1103/PhysRevA.78.033402>\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Carmelo Mordini  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Analytical potentials for rectangle electrodes in a surface ion trap",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/carmelom/rectset"
    },
    "split_keywords": [
        "python",
        "trapped ions",
        "surface electrodes",
        "set",
        "ion trap",
        "quantum computing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b9670a05d67ecab6c4319255c580d4e5193247fdd8aa5ae343d6ad97f032ac17",
                "md5": "8c0f0ec0a6c1aeb62b3e5723aa1ac635",
                "sha256": "a0967bc75bb35c88d1c07fc1c621acff937a572b0b0538d4a17cefb04b66dc00"
            },
            "downloads": -1,
            "filename": "rectset-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c0f0ec0a6c1aeb62b3e5723aa1ac635",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7468,
            "upload_time": "2023-11-23T09:27:40",
            "upload_time_iso_8601": "2023-11-23T09:27:40.874072Z",
            "url": "https://files.pythonhosted.org/packages/b9/67/0a05d67ecab6c4319255c580d4e5193247fdd8aa5ae343d6ad97f032ac17/rectset-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b20dead70f1e681847fdb6a0127334af7ebc2aef1444d9fbc86a8e30ad54cbfb",
                "md5": "7f62914aa92eb9721538d2b71d4679d2",
                "sha256": "58ec6fbe46174b6307b8edfb99d4efa6815dfaf6edf643f5fe05e2c7f65f8899"
            },
            "downloads": -1,
            "filename": "rectset-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7f62914aa92eb9721538d2b71d4679d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8374,
            "upload_time": "2023-11-23T09:27:41",
            "upload_time_iso_8601": "2023-11-23T09:27:41.895469Z",
            "url": "https://files.pythonhosted.org/packages/b2/0d/ead70f1e681847fdb6a0127334af7ebc2aef1444d9fbc86a8e30ad54cbfb/rectset-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-23 09:27:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "carmelom",
    "github_project": "rectset",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rectset"
}
        
Elapsed time: 0.17152s