Skip to content

Commit

Permalink
pytest fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jykhoo1987 committed Mar 24, 2024
1 parent 7a8ce66 commit f1f9b4c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/qibolab/instruments/simulator/backends/qutip_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,17 @@ def state_from_basis_vector(
# checks
if len(basis_vector) != self.nqubits:
raise Exception("length of basis_vector does not match number of qubits!")
if len(cbasis_vector) != self.ncouplers:
raise Exception(
"length of cbasis_vector does not match number of couplers!"
)
if cbasis_vector is None:
cbasis_vector = np.zeros(self.ncouplers).tolist()
else:
if len(cbasis_vector) != self.ncouplers:
raise Exception(
"length of cbasis_vector does not match number of couplers!"
)

basis_list = self.op_dict["basis"]
fullstate = Qobj(1)

if cbasis_vector is None:
cbasis_vector = np.zeros(self.ncouplers).tolist()

combined_basis_vector = (
cbasis_vector + basis_vector
) # basis_vector + cbasis_vector #
Expand Down

0 comments on commit f1f9b4c

Please sign in to comment.