1
$\begingroup$

When I submit a parametrized circuit as an input for the mixed operator in QAOAAnsatz, some strange results appear.

For example, when I submit a parametrized circuit with a parameter b as the input for the mixed operator, and set reps=4, the parameters of the circuit are ParameterView([ParameterVectorElement(β[0]), ParameterVectorElement(β[1]), ParameterVectorElement(β[2]), ParameterVectorElement(β[3]), ParameterVectorElement(γ[0]), ParameterVectorElement(γ[1]), ParameterVectorElement(γ[2]), ParameterVectorElement(γ[3])])

which is correct because parameter $\beta$ will substitute parameter b in QAOAAnsatz.

But if I transpile this circuit or decompose this circuit, the parameters change to ParameterView([Parameter(b), ParameterVectorElement(β[0]), ParameterVectorElement(β[1]), ParameterVectorElement(β[2]), ParameterVectorElement(β[3]), ParameterVectorElement(γ[0]), ParameterVectorElement(γ[1]), ParameterVectorElement(γ[2]), ParameterVectorElement(γ[3])]).

The change of the parameters

Could anyone tell me what is wrong with my code?

$\endgroup$
1
  • 3
    $\begingroup$ Hello! This seems very Qiskit-specific, could you open an issue at github.com/Qiskit/qiskit-terra/issues? That's a more suitable platform to discuss potential bugs like this as you're reaching the developers directly. If you open the issue there could you make sure to include a full snippet, including circuit construction, that reproduces the error? :) $\endgroup$
    – Cryoris
    Commented Feb 1, 2023 at 13:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.