I want to use a parameterized quantum-circuit which is $\text{CNOT}$ with another quantum-circuit that has no parameters, then after a series of gates on the second quantum-circuit, I want to measure and give it to the estimator and optimizer for VQE.
I have made a parameterized circuit and used it with a Hamiltonian containing constraint, but as soon as I add a non-parameterized circuit, I face two problems:
- How to give the measured set of qubits to the estimator?
- How to use VQE with or without
generate_preset_pass_manager
?
How to give the measured set of qubits to the estimator
you would have to do something custom and use SamplerV2 which returns counts and compute the expectation yourself. $\endgroup$