Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix in qaoa_circuit in qiskit backend #212

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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