Hi,
I am trying to implement the tutorial on the X8 machine but it is giving me a device-error code.
import numpy as np
import strawberryfields as sf
from strawberryfields import ops
from strawberryfields import RemoteEngine
from strawberryfields.utils import random_interferometer
U = random_interferometer(4)
np.set_printoptions(precision=16)
print(U)
prog = sf.Program(8, name="remote_job1")
with prog.context as q:
# Initial squeezed states
# Allowed values are r=1.0 or r=0.0
ops.S2gate(1.0) | (q[0], q[4])
ops.S2gate(1.0) | (q[1], q[5])
ops.S2gate(1.0) | (q[3], q[7])
# Interferometer on the signal modes (0-3)
ops.Interferometer(U) | (q[0], q[1], q[2], q[3])
ops.BSgate(0.543, 0.123) | (q[2], q[0])
ops.Rgate(0.453) | q[1]
ops.MZgate(0.65, -0.54) | (q[2], q[3])
# *Same* interferometer on the idler modes (4-7)
ops.Interferometer(U) | (q[4], q[5], q[6], q[7])
ops.BSgate(0.543, 0.123) | (q[6], q[4])
ops.Rgate(0.453) | q[5]
ops.MZgate(0.65, -0.54) | (q[6], q[7])
ops.MeasureFock() | q
eng = RemoteEngine("X8")
results = eng.run(prog, shots=20)
print(results.samples)
The full error message below:
raise FailedJobError(message)
strawberryfields.engine.FailedJobError: The remote job fde5275e-6be1-48a3-ad9b-28378a4ef0aa failed due to an internal server error: {'error-code': 'device-error', 'error-detail': 'The hardware device was unable to process your job request. The error was forwarded to technical support. If this error occurs repeatedly and you would like to follow up on a bugfix, please contact technical support with a copy of this error message, including the job-id.'}. Please try again.
The versions of my packages-
numpy 1.23.5
StrawberryFields 0.23.0