I have a quantum circuit of 16 qubits, and I am running Amplitude Estimation on that, my final qubit to measure is 15th, so I do this
problem = EstimationProblem(
state_preparation = qcirc,
objective_qubits = [15],
)
and for Amplitude estimation:
# construct amplitude estimation
ae = IterativeAmplitudeEstimation(
epsilon_target=epsilon,
alpha=alpha,
sampler=Sampler(run_options={"shots": 100})
)
where the values of epsilon and alpha are 0.01 and 0.05
The finally when I run it:
result = ae.estimate(problem)
It is giving me the following error:
CircuitError: 'The amount of clbit arguments 0 does not match the instruction expectation (16).'
My qcirc
has 16 qubits and 16 classical registers, I started by qcirc
as
qcirc = QuantumCircuit(16,16)
What might be the reason for this error?