From e82f9bcc49f9cd01976a5d408a11c34d8a4eacd4 Mon Sep 17 00:00:00 2001 From: KilianPoirier Date: Fri, 21 Jun 2024 03:55:18 +0000 Subject: [PATCH] Fix angle naming pyquil --- .../openqaoa_pyquil/backends/qaoa_pyquil_qpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openqaoa-pyquil/openqaoa_pyquil/backends/qaoa_pyquil_qpu.py b/src/openqaoa-pyquil/openqaoa_pyquil/backends/qaoa_pyquil_qpu.py index 455297eb..9f19e08e 100644 --- a/src/openqaoa-pyquil/openqaoa_pyquil/backends/qaoa_pyquil_qpu.py +++ b/src/openqaoa-pyquil/openqaoa_pyquil/backends/qaoa_pyquil_qpu.py @@ -300,9 +300,9 @@ def parametric_qaoa_circuit(self) -> Program: if each_gate.gate_label.type.value in ["MIXER", "COST"]: gatelabel_pyquil = each_gate.gate_label.__repr__() gatelabel_pyquil = ( - "one" + gatelabel_pyquil[1:] + "one" + gatelabel_pyquil[3:] if each_gate.gate_label.n_qubits == 1 - else "two" + gatelabel_pyquil[1:] + else "two" + gatelabel_pyquil[3:] ) angle_param = parametric_circuit.declare(gatelabel_pyquil.lower(), "REAL", 1) each_gate.angle_value = angle_param