Giter VIP home page Giter VIP logo

simba's Introduction

SImBA - Systematic Inference of Bosonic quAntum systems

License: MIT Documentation Status

>>Documentation<<

Compute graphical quantum system representations from transfer functions

from simba import transfer_function_to_graph, tf2rss, adiabatically_eliminate
from sympy import symbols

s = symbols('s')
gamma_f, lmbda = symbols('gamma_f lambda', real=True, positive=True)
tf = (s**2 + s * gamma_f - lmbda) / (s**2 - s * gamma_f - lmbda)

transfer_function_to_graph(tf, 'active_coupled_cavity.png', layout='dot')

Active coupled cavity realisation

Calculate system transfer functions from the inferred system

split_network = tf2rss(tf).to_slh().split()
h_int = split_network.interaction_hamiltonian
h_int.expr.simplify()

Compute transfer functions between any degrees of freedom of the system

print(split_network.state_vector)
tfm = split_network.tfm
tf = tfm.open_loop('a_1', 'aout_1').simplify()
gamma_1, _ = split_network.aux_coupling_constants
adiabatically_eliminate(tf, gamma_1)

Installation

Install via pip install quantum-simba

See notebooks for examples.

To clone the dev environment run,

$ conda env create -f=environment.yml
$ conda activate simba

To install simba for development purposes,

$ pwd
... (simba code directory containing setup.py)
$ pip install -e .
(then to run test suite)
$ py.test

To build documentation locally,

$ pwd
... (simba code directory containing setup.py)
$ ./make_docs.sh

Motivation

Often when designing detectors for high-precision measurements, we are most interested in the frequency domain behaviour of such systems. For example, when computing the measurement shot noise of a gravitational wave detector, the noise spectrum is determined solely by the transfer function from the internal degree of freedom perturbed by the passing gravitational wave to the measurement output of the detector.

Until recently there has been no way to infer the layout of a quantum system directly from its transfer function, but now due to recent research in the quantum control community this is possible.

This software makes the process of finding a given physical realisation from the input-output transfer function completely automatic. Once this has been computed, it can then be used, for example, to deduce physical realisations, or more interestingly, to compute the most sensitive possible detector for a given numbers of internal degrees of freedom by minimizing the quantum Cramer-Rao bound.

TODO

  • Example notebooks
  • Write paper
  • Implement scattering matrix
  • Include examples on this page

simba's People

Contributors

joebentley avatar

Stargazers

 avatar Ramin  avatar abdul dakkak avatar Misha Brukman avatar tony eve avatar  avatar Stuart avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

mbrukman

simba's Issues

Missing dependency: pygraphviz?

Looks like pygraphviz is required but is not pulled via dependencies during installation (this is on Mac OS):

(finesse3) Artemiis-MacBook-Pro:~ admitriev$ python3
Python 3.8.2 (default, Mar 26 2020, 10:43:30)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from simba import transfer_function_to_graph, tf2rss, adiabatically_eliminate
>>> from sympy import symbols
>>> s = symbols('s')
>>> gamma_f, lmbda = symbols('gamma_f lambda', real=True, positive=True)
>>> tf = (s**2 + s * gamma_f - lmbda) / (s**2 - s * gamma_f - lmbda)
>>> transfer_function_to_graph(tf, 'active_coupled_cavity.png', layout='dot')
0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/admitriev/miniconda3/envs/finesse3/lib/python3.8/site-packages/simba/graph.py", line 266, in transfer_function_to_graph
    g = nodes_from_dofs(*split_system(ss.to_slh())).as_graphviz_agraph()
  File "/Users/admitriev/miniconda3/envs/finesse3/lib/python3.8/site-packages/simba/graph.py", line 113, in as_graphviz_agraph
    import pygraphviz as pgv
ModuleNotFoundError: No module named 'pygraphviz'

Note that on Mac OS installing pygraphviz via pip requires graphviz to be already installed on the system, which can be done via brew or via conda if the latter is being used. I managed to get a working pygraphviz installation via

conda install graphviz
pip install pygraphviz

After doing that, the example code above worked without errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.