Package pyscript :: Package lib :: Module quantumcircuits
[show private | hide private]
[frames | no frames]

Module pyscript.lib.quantumcircuits

Quantum circuits objects library
Classes
Boxed Draws a box around an object, the box can be placed according to standard Area tags
Circled Draws a circle around an object

Function Summary
  cbox(obj, x, yt, yc)
Return a controlled box
  classicalpath(*paths)
Return classical path
  Cnot(c, targetDist, direction)
Controlled NOT gate
  CPGate(c, controlDist, direction, side)
Controlled phase gate
  CXGate(c, controlDist, direction, side)
Controlled X gate
  CYGate(c, controlDist, direction, side)
Controlled Y gate
  CZGate(c, controlDist, direction, side)
Controlled Z gate
  Detector(e, height, label)
Detector
  detector(**options)
Return a D shaped detector
  HGate(c, side)
Hadamard get
  PGate(c, side)
Phase gate
  Rail(w, length, labelIn, labelOut, buff)
A Rail of a quantum circuit diagram
  XGate(c, side)
X gate
  YGate(c, side)
Y gate
  ZGate(c, side)
Z gate

Variable Summary
str __revision__ = '$Revision: 1.12 $'

Function Details

cbox(obj, x, yt, yc)

Parameters:
obj - the object to put a box around
           (type=object)
x - x position of line and centre of box
           (type=float)
yt - y position of target
           (type=float)
yc - y position of control
           (type=float)
Returns:
a controlled box

classicalpath(*paths)

Parameters:
paths - 1 or more Path() objects
Returns:
classical path

Cnot(c=<class 'pyscript.vectors.P'>, targetDist=1.0, direction='up')

Controlled NOT gate
Parameters:
targetDist - distance to the target rail
           (type=float)
direction - in which direction is the target rail? up/down
           (type=string)

CPGate(c=<class 'pyscript.vectors.P'>, controlDist=1.0, direction='up', side=0.5)

Controlled phase gate
Parameters:
controlDist - distance to the control
           (type=float)
direction - in which direction is the control? up/down
           (type=string)
side - length of the box side
           (type=float)

CXGate(c=<class 'pyscript.vectors.P'>, controlDist=1.0, direction='up', side=0.5)

Controlled X gate
Parameters:
controlDist - distance to the control
           (type=float)
direction - in which direction is the control? up/down
           (type=string)
side - length of the box side
           (type=float)

CYGate(c=<class 'pyscript.vectors.P'>, controlDist=1.0, direction='up', side=0.5)

Controlled Y gate
Parameters:
controlDist - distance to the control
           (type=float)
direction - in which direction is the control? up/down
           (type=string)
side - length of the box side
           (type=float)

CZGate(c=<class 'pyscript.vectors.P'>, controlDist=1.0, direction='up', side=0.5)

Controlled Z gate
Parameters:
controlDist - distance to the control
           (type=float)
direction - in which direction is the control? up/down
           (type=string)
side - length of the box side
           (type=float)

Detector(e=<class 'pyscript.vectors.P'>, height=1.0, label=None)

Detector
Parameters:
height - height of detector
           (type=float)
label - detector label
           (type=string)

detector(**options)

Returns:
a D shaped detector

HGate(c=<class 'pyscript.vectors.P'>, side=0.5)

Hadamard get
Parameters:
side - length of the box side
           (type=float)

PGate(c=<class 'pyscript.vectors.P'>, side=0.5)

Phase gate
Parameters:
side - length of the box side
           (type=float)

Rail(w=<class 'pyscript.vectors.P'>, length=1.0, labelIn=None, labelOut=None, buff=0.050000000000000003)

A Rail of a quantum circuit diagram
Parameters:
length - length of the rail
           (type=float)
labelIn - input label
           (type=string)
labelOut - output label
           (type=string)
buff - buffer of space between the end of the rail and the label
           (type=float)

XGate(c=<class 'pyscript.vectors.P'>, side=0.5)

X gate
Parameters:
side - length of the box side
           (type=float)

YGate(c=<class 'pyscript.vectors.P'>, side=0.5)

Y gate
Parameters:
side - length of the box side
           (type=float)

ZGate(c=<class 'pyscript.vectors.P'>, side=0.5)

Z gate
Parameters:
side - length of the box side
           (type=float)

Variable Details

__revision__

Type:
str
Value:
'$Revision: 1.12 $'                                                    

Generated by Epydoc 2.0 on Mon Apr 24 17:02:36 2006 http://epydoc.sf.net