Skip to content

Commit

Permalink
bugfix in qaoa_circuit in qiskit backend
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal-ph committed Mar 23, 2023
1 parent 464dbe8 commit c9ff7dd
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/openqaoa-qiskit/backends/qaoa_qiskit_qpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,17 @@ def __init__(
False,
None,
]:
raise Exception("Connection to {} was made. Error connecting to the specified backend.".format(self.device.device_location.upper()))

raise Exception(
"Connection to {} was made. Error connecting to the specified backend.".format(
self.device.device_location.upper()
)
)

else:

raise Exception("Error connecting to {}.".format(self.device.device_location.upper()))

raise Exception(
"Error connecting to {}.".format(self.device.device_location.upper())
)

if self.device.n_qubits < self.n_qubits:
raise Exception(
Expand Down Expand Up @@ -140,7 +146,7 @@ def qaoa_circuit(self, params: QAOAVariationalBaseParams) -> QuantumCircuit:
self.backend_qpu,
initial_layout=self.initial_qubit_mapping,
)
return circuit_with_angles
return transpiled_circuit

@property
def parametric_qaoa_circuit(self) -> QuantumCircuit:
Expand Down

0 comments on commit c9ff7dd

Please sign in to comment.