Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def circuit():
return qml.var(qml.PauliX(0))
def circuit(x):
qml.RX(x, wires=[0])
qml.CNOT(wires=[0, 1])
qml.RY(0.4, wires=[0])
qml.RZ(-0.2, wires=[1])
return qml.expval(qml.PauliX(0)), qml.var(qml.Hermitian(H, wires=1))
def circuit(r, phi):
qml.Squeezing(r, 0, wires=0)
qml.Rotation(phi, wires=0)
return qml.var(qml.X(0))
def circuit(n, a):
qml.ThermalState(n, wires=0)
qml.Displacement(a, 0, wires=0)
return qml.var(op)
def layer3_diag(x, y, z, h, g, f):
non_parametrized_layer(a, b, c)
qml.RX(x, wires=0)
qml.RY(y, wires=1)
qml.RZ(z, wires=2)
non_parametrized_layer(a, b, c)
return qml.var(qml.PauliZ(2)), qml.var(qml.PauliY(1))
def layer3_diag(x, y, z, h, g, f):
non_parametrized_layer(a, b, c)
qml.RX(x, wires=0)
qml.RY(y, wires=1)
qml.RZ(z, wires=2)
non_parametrized_layer(a, b, c)
return qml.var(qml.PauliZ(2)), qml.var(qml.PauliY(1))
def template(x):
for i in range(5):
qml.RZ(i * x, wires=0)
return qml.var(qml.PauliZ(0)), qml.sample(qml.PauliX(1))
def layer2_diag(x, y, z, h, g, f):
non_parametrized_layer(a, b, c)
qml.RX(x, wires=0)
qml.RY(y, wires=1)
qml.RZ(z, wires=2)
non_parametrized_layer(a, b, c)
qml.RY(f, wires=2)
return qml.var(qml.PauliX(1))
def layer3_diag(x, y, z, h, g, f):
non_parametrized_layer(a, b, c)
qml.RX(x, wires=0)
qml.RY(y, wires=1)
qml.RZ(z, wires=2)
non_parametrized_layer(a, b, c)
return qml.var(qml.PauliZ(2)), qml.var(qml.PauliY(1))