Skip to content

Commit

Permalink
small issue in consistency test, silenced unnecesarry warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kottmanj committed Jun 28, 2023
1 parent f8de4ad commit fb49a8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tequila/quantumchemistry/orbital_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def optimize_orbitals(molecule, circuit=None, vqe_solver=None, pyscf_arguments=N
vqe_solver_arguments={}
vqe_solver_arguments["restrict_to_hcb"]=True
# consistency check
n_qubits = circuit.n_qubits
n_qubits = len(circuit.qubits)
n_orbitals = molecule.n_orbitals
if n_qubits > n_orbitals:
warnings.warn("Potential inconsistency in orbital optimization: use_hcb is switched on but we have\n n_qubits={} in the circuit\n n_orbital={} in the molecule\n".format(n_qubits,n_orbitals), TequilaWarning)
Expand Down

0 comments on commit fb49a8a

Please sign in to comment.