diff --git a/src/qibo/models/qgan.py b/src/qibo/models/qgan.py index b209e0f584..c14b5caf19 100644 --- a/src/qibo/models/qgan.py +++ b/src/qibo/models/qgan.py @@ -259,11 +259,11 @@ def generate_real_samples(samples, distribution, real_samples): # determine half the size of one batch, for updating the discriminator half_samples = int(self.batch_samples / 2) if self.initial_params is not None: - initial_params = tf.Variable(self.initial_params, dtype=tf.complex64) + initial_params = tf.Variable(self.initial_params, dtype=tf.complex128) else: n = 10 * self.layers * self.nqubits + 2 * self.nqubits initial_params = tf.Variable( - np.random.uniform(-0.15, 0.15, n), dtype=tf.complex64 + np.random.uniform(-0.15, 0.15, n), dtype=tf.complex128 ) optimizer = tf.optimizers.Adadelta( # pylint: disable=no-member