Skip to main content

toolbox for higher spin and symmetrization

Project description

toolbox for higher spin and symmetrization

https://readthedocs.org/projects/spheres/badge/?version=latest https://badge.fury.io/py/spheres.svg https://travis-ci.com/heyredhat/spheres.svg?branch=main https://codecov.io/gh/heyredhat/spheres/branch/main/graph/badge.svg?token=980CL7KIFL https://pyup.io/repos/github/heyredhat/spheres/shield.svg https://pyup.io/repos/github/heyredhat/spheres/python-3-shield.svg https://raw.githubusercontent.com/heyredhat/spheres/main/stereographic_projection.jpg

spheres provides tools for dealing with higher spin systems and for symmetrized quantum circuits. Among other things, we provide implementations of:

  1. The “Majorana stars” representation of a spin-j state as a degree-2j complex polynomial defined on the extended complex plane (the Riemann sphere). The eponymous stars are the 2j roots of this polynomial and each can be interpreted as a quantum of angular momentum contributing 1/2 in the specified direction. This polynomial can be defined in terms of the components of a |j, m> vector or in terms of a spin coherent wavefunction <-xyz|psi>, where |psi> is the spin state and <-xyz| is the adjoint of a spin coherent state at the point antipodal to xyz.

  2. The “symmetrized spinors” representation of a spin-j state as 2j symmetrized spin-1/2 states (aka qubits). Indeed, the basis states of 2j symmetrized qubits are in 1-to-1 relation to the |j, m> basis states of a spin-j. Such a representation is naturally useful for simulating spin-j states on a qubit based quantum computer, and we provide circuits for preparing such states.

  3. The “Schwinger oscillator” representation of a spin-j state as the total energy 2j subspace of two quantum harmonic oscillators. Indeed, the full space of the two oscillators furnishes a representation of spin with a variable j value: a superposition of j values. This construction can be interpreted as the “second quantization” of qubit, and is appropriate for implementation of photonic quantum computers.

In addition, we provide many useful tools for dealing with oscillators and spin more generally: coherent state polynomials for oscillators, quantum polyhedra, a little spinorial special relativity, and much more. Everything is accompanied by 3D visualizations thanks to vpython, and interfaces to popular quantum computing libraries from qutip to StrawberryFields.

Finally, we provide tools for implementing a form of quantum error correction or “stablization” by harnessing the power of symmetrization. We provide automatic generation of circuits which perform a given quantum experiment multiple times in parallel while periodically projecting them all jointly into the symmetric subspace, which in principle increases the reliability of the computation under noisy conditions.

spheres is a work in progress! Beware!

Special thanks to the Quantum Open Source Foundation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spheres-0.3.0.4.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

spheres-0.3.0.4-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file spheres-0.3.0.4.tar.gz.

File metadata

  • Download URL: spheres-0.3.0.4.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for spheres-0.3.0.4.tar.gz
Algorithm Hash digest
SHA256 a7b8343b5944464260deb36c494f0a84882bca6e8dce3252e7ab02652d0d343e
MD5 e5311364e46b35e6e468789d0dda0225
BLAKE2b-256 e474da18547eab1f6a8f19f893c6e8ae1176047b1069b89a50e73751c3b7bd4c

See more details on using hashes here.

File details

Details for the file spheres-0.3.0.4-py3-none-any.whl.

File metadata

  • Download URL: spheres-0.3.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for spheres-0.3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bda8f129b426ab52d7d36e44d7feb8bafc013799ac5f22ec54f99c487558e467
MD5 7795a36b3d0d1b8453cf9b00a1136e81
BLAKE2b-256 b7114f7c1faf7bca99856fda2e947979d4db72f4d212a2f41303c1e67059205f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page