def circuit(r, phi):
     qml.Displacement(r, phi, [0])
     return qml.expval.X(0)
 def circuit(y):
     qml.Displacement(alpha, 0., [0])
     qml.Rotation(y, [0])
     return qml.expval.X(0)
 def circuit(y):
     qml.Displacement(alpha, 0., [0])
     qml.Beamsplitter(y, 0, [0, 1])
     return qml.expval.X(0)
Ejemplo n.º 4
0
 def circuit(a):
     qml.Displacement(a, 0, wires=0)
     return qml.var(qml.MeanPhoton(0))
 def circuit(x, y):
     qml.Displacement(x, 0, [0])
     qml.Rotation(y, [0])
     qml.Displacement(0, x, [0])
     return qml.expval.X(0)
Ejemplo n.º 6
0
 def qf(x):
     qml.RX(x, wires=[0])
     qml.Displacement(0.5, 0, wires=[0])
     return qml.expval(qml.PauliZ(0))
Ejemplo n.º 7
0
 def circuit(*x):
     """Reference quantum function"""
     qml.Displacement(a, 0, wires=[0])
     op(*x, wires=wires)
     return qml.expval.X(0)
Ejemplo n.º 8
0
 def circuit(r, phi):
     qml.Displacement(r, phi, wires=[0])
     return qml.expval(qml.X(0))
Ejemplo n.º 9
0
 def qf(x, y):
     qml.Kerr(y, [1])
     qml.Displacement(x, 0, [0])
     qml.Beamsplitter(0.2, 1.7, [0, 1])
     return qml.expval.X(0), qml.expval.X(1)
Ejemplo n.º 10
0
 def qf(x, y):
     qml.Kerr(y, wires=[1])
     qml.Displacement(x, 0, wires=[0])
     qml.Beamsplitter(0.2, 1.7, wires=[0, 1])
     return qml.expval(qml.X(0)), qml.expval(qml.X(1))
Ejemplo n.º 11
0
 def circuit(x, y):
     qml.Displacement(x, 0, wires=[0])
     qml.Rotation(y, wires=[0])
     qml.Displacement(0, x, wires=[0])
     return qml.expval(qml.X(0))
Ejemplo n.º 12
0
 def qf(x, y):
     qml.Displacement(x, 0, wires=[0])
     qml.CubicPhase(0.2, wires=[0])  # nongaussian succeeding x
     qml.Squeezing(0.3, x, wires=[1])  # x affects gates on both wires, y unused
     qml.Rotation(1.3, wires=[1])
     return qml.expval(qml.X(0)), qml.expval(qml.X(1))
Ejemplo n.º 13
0
 def circuit(a):
     qml.Displacement(a, 0, wires=0)
     return qml.var(qml.NumberOperator(0))
Ejemplo n.º 14
0
 def circuit(n, a):
     qml.ThermalState(n, wires=0)
     qml.Displacement(a, 0, wires=0)
     return qml.var(qml.NumberOperator(0))
Ejemplo n.º 15
0
 def qf(x):
     qml.RX(x, [0])
     qml.Displacement(0.5, 0, [0])
     return qml.expval.PauliZ(0)
 def circuit(y, r=0.5):
     qml.Displacement(r, 0., [0])
     qml.Squeezing(y, 0., [0])
     return qml.expval.X(0)
Ejemplo n.º 17
0
 def qf(x):
     qml.Displacement(0.5, 0, [0])
     return qml.expval.X(0)
 def qf(x, y, z):
     qml.Displacement(x, 0.2, [0])
     qml.Squeezing(y, z, [0])
     qml.Rotation(-0.2, [0])
     return qml.expval.X(0)
Ejemplo n.º 19
0
 def qf(x):
     qml.Displacement(0.5, 0, wires=[0])
     return qml.expval(qml.X(0))
 def qf(x, y):
     qml.Displacement(x, 0, [0])
     qml.Squeezing(y, -1.3 * y, [0])
     return qml.expval.X(0)
Ejemplo n.º 21
0
 def circuit(x):
     """Test quantum function"""
     qml.Displacement(x, 0, wires=0)
     return qml.expval(qml.X(0))
Ejemplo n.º 22
0
 def circuit(n, a):
     qml.ThermalState(n, wires=0)
     qml.Displacement(a, 0, wires=0)
     return qml.var(qml.MeanPhoton(0))