Skip to content

Commit

Permalink
Fix bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
renlililoli committed Oct 9, 2024
1 parent be8794a commit 370225a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ def initialize_mcvqe(self) -> None:

initial_states[n] = np.asarray(Statevector(state))

self.initial_states = initial_states

if self.excitations == 's':

num_spin_orbitals = self.one_body_integrals.shape[0]
Expand All @@ -285,6 +283,8 @@ def initialize_mcvqe(self) -> None:

if self.initial_states is None:
self.initial_states = [QuantumCircuit(self.ansatz.num_qubits) for n in range(self.k)]

#self.initial_states = [QuantumCircuit(self.ansatz.num_qubits) for n in range(self.k)]

for n in range(self.k):
self.initial_states[n].initialize(initial_states[n], self.initial_states[n].qubits)
Expand Down
3 changes: 1 addition & 2 deletions tests/test_mcvqe.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# that they have been altered from the originals.

""" Test SSVQE """
import sys
sys.path.append('..')

import unittest
from tests.algorithms_test_case import QiskitAlgorithmsTestCase

Expand Down

0 comments on commit 370225a

Please sign in to comment.