Exemplo n.º 1
0
 def qf(x, y):
     qml.Displacement(x, 0, [0])
     qml.CubicPhase(0.2, [0])  # nongaussian succeeding x
     qml.Squeezing(0.3, x,
                   [1])  # x affects gates on both wires, y unused
     qml.Rotation(1.3, [1])
     return qml.expval.X(0), qml.expval.X(1)
Exemplo n.º 2
0
 def qf(x, y):
     qml.Displacement(x, 0, [0])
     qml.CubicPhase(0.2, [0])
     qml.Squeezing(0.3, y, [1])
     qml.Rotation(1.3, [1])
     #qml.Kerr(0.4, [0])  # nongaussian succeeding x but not y   TODO when QNode uses a DAG to describe the circuit, uncomment this line
     return qml.expval.X(0), qml.expval.X(1)