Skip to content

Commit

Permalink
fix: Restore original complexes
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Mar 14, 2024
1 parent 2d78cf4 commit c5ba8e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qibo/models/qgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5ba8e7

Please sign in to comment.