In initial data preparation, your code has

with engine:

Dgate(disps_alpha) | q[0]

Dgate(disps_beta) | q[1]

where disps_alpha and disps_beta are lists of length 7.

disps_alpha = tf.constant(

[alpha, -alpha, alpha, -alpha, 1.0j * alpha, -1.0j * alpha, 1.0j * alpha]

)

My understanding is that Dgate takes at most 2 parameters. What am I missing?