3
$\begingroup$

I want to try the UCC ansatz for problems other than quantum chemistry. For that I want to 'extract' the UCC ansatz (say from Qiskit) and supply it to my own VQE: I need a parameterised circuit where everything else is already set up.

How do I do that?

$\endgroup$
1
  • $\begingroup$ I'm not sure I quite understand the problem. Do you want to use the UCC ansatz from Qiskit (if yes, why not just import it) or create a new parameterized circuit (which you could also create with Qiskit)? $\endgroup$
    – Cryoris
    Dec 2 '21 at 7:45
1
$\begingroup$

UCC ansatz is already a parametrized circuit, since it extends EvolvedOperatorAnsatz, which extends NLocal. You can parametrize it manually using assign_parameters(parameters) where parameters is a list of values. You can add the created circuit to your remaining circuit using standard circuit.compose.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.