Skip to content
ntezak edited this page Dec 11, 2012 · 3 revisions

Use this page to directly share some code examples or to link to some gists that you would like to share.

Embedded Code Example:

import qnet.circuit_algebra as ca
import sympy    

Q = ca.local_space('Q')
a = ca.Destroy(Q)
Delta, kappa = sympy.symbols('Delta, kappa', real = True)
H = Delta * a.dag() * a
L = ca.Matrix([[ca.sqrt(Delta) * a]])
S = ca.identity_matrix(1)
cavity_model = ca.SLH(S, L, H)

which corresponds to an SLH cavity model of:

H & = \Delta a^\dagger a \\
L & = \sqrt{\kappa} a \\
S & = 1

Or visit the linked gist example.

Clone this wiki locally