0
$\begingroup$

I want to perform post-selection on IBM Qiskit and run on actual quantum computer. (What is post-selection) How can I perform it ?

Can I use qiskit.circuit.QuantumCircuit.reset for it ? How to use it ?

$\endgroup$

2 Answers 2

3
$\begingroup$

Qiskit is used to have get_subsystems_counts function which takes complete_system_counts and returns the counts subject to a post selection specified using post_select_index and post_select_flag parameters.

complete_system_counts = { '10 1': 255, '11 0':320, '01 1': 449 }
result = get_subsystems_counts(complete_system_counts, 1, '1')
print(result)

However, since get_subsystems_counts is part of Qiskit Aqua, it is now deprecated. I'm not aware of any alternative, but you can get its code from here.

$\endgroup$
1
  • $\begingroup$ Any alternative ways to do it ? $\endgroup$ Aug 24, 2022 at 13:19
2
$\begingroup$

Postselection isn't a gate. You can't apply it on an actual quantum computer.

What you can do is take many unpostselected samples and discard the ones that didn't meet the selection criteria.

$\endgroup$
1
  • $\begingroup$ Thanks for the reply, what methods to use to perform it on Qiskit ? $\endgroup$ Aug 22, 2022 at 14:51

Your Answer

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

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