v0.1.1
All checks were successful
Build and Deploy Docker Image / build-and-push (push) Successful in 3m56s
All checks were successful
Build and Deploy Docker Image / build-and-push (push) Successful in 3m56s
-- added automativ queue reconenction (querying for queues to join from server)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
from multiprocessing.connection import Connection
|
||||
from typing import List
|
||||
|
||||
import jax
|
||||
import pennylane as qml
|
||||
@@ -88,10 +89,11 @@ def prepare_data(data):
|
||||
}
|
||||
|
||||
|
||||
def run_vqe(conn: Connection, dev1: Device, data: dict):
|
||||
def run_computation(conn: Connection, dev1: Device, data: dict):
|
||||
coordinates = jnp.array(data.get("coordinates"))
|
||||
charge = int(data.get("charge"))
|
||||
multiplicity = int(data.get("multiplicity"))
|
||||
|
||||
molecule = qchem.Molecule(
|
||||
data.get("symbols"),
|
||||
coordinates,
|
||||
@@ -115,7 +117,10 @@ def run_vqe(conn: Connection, dev1: Device, data: dict):
|
||||
|
||||
singles, doubles = qml.qchem.excitations(active_electrons, qubits)
|
||||
|
||||
params = np.array(np.zeros(len(singles) + len(doubles)), requires_grad=True)
|
||||
if False:
|
||||
params = np.array(last_state, requires_grad=True)
|
||||
else:
|
||||
params = np.array(np.zeros(len(singles) + len(doubles)), requires_grad=True)
|
||||
|
||||
conn.send(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user