Exemplo n.º 1
0
 def overlap(params, wires):
     variational_ansatz(gs_params, wires)
     qml.inv(qml.template(variational_ansatz)(params, wires))
     # obs = qml.expval(qml.PauliZ(0) @ qml.PauliZ(1) @ qml.PauliZ(2))
     return qml.probs([0, 1, 2])
Exemplo n.º 2
0
 def overlap2(params, wires):
     variational_ansatz(fes_params, wires)
     qml.inv(qml.template(variational_ansatz)(params, wires))
     return qml.probs([0, 1, 2])
 def overlap(params, shifted_params):
     variational_circuit(shifted_params)
     qml.inv(qml.template(variational_circuit)(params))
     #obs = qml.expval(qml.PauliZ(0) @ qml.PauliZ(1) @ qml.PauliZ(2))
     return qml.probs([0, 1, 2])