Skip to content

Commit c5ba8e7

Browse files
committed
fix: Restore original complexes
1 parent 2d78cf4 commit c5ba8e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qibo/models/qgan.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ def generate_real_samples(samples, distribution, real_samples):
259259
# determine half the size of one batch, for updating the discriminator
260260
half_samples = int(self.batch_samples / 2)
261261
if self.initial_params is not None:
262-
initial_params = tf.Variable(self.initial_params, dtype=tf.complex64)
262+
initial_params = tf.Variable(self.initial_params, dtype=tf.complex128)
263263
else:
264264
n = 10 * self.layers * self.nqubits + 2 * self.nqubits
265265
initial_params = tf.Variable(
266-
np.random.uniform(-0.15, 0.15, n), dtype=tf.complex64
266+
np.random.uniform(-0.15, 0.15, n), dtype=tf.complex128
267267
)
268268

269269
optimizer = tf.optimizers.Adadelta( # pylint: disable=no-member

0 commit comments

Comments
 (0)