1
$\begingroup$

In classical digital logic, we have K-map and Quine–McCluskey algorithm to minimize boolean equation, thereby reducing the number of logic gates needed. Is there such a thing in quantum computing?.

One of the exercises from IBM Quantum Summer School 2022 is to achieve this quantum state

enter image description here

and this is my solution (which passed grader check)

enter image description here

The question is: in general, how do I know that a derived circuit is optimal/state of the art?

$\endgroup$
1

1 Answer 1

2
$\begingroup$

I don’t know if there is a systematic way to find out whether a circuit is optimal or not. But to that specific simple problem you could have used also one of the following 2 options:

enter image description here

q0 - Your solution. q1 + q2 - Other, shorter possible solutions.

This photo is from IBM Quantum Composer - you can see on the right side that all 3 options result in the same state.

$\endgroup$
2
  • $\begingroup$ Try to run the circuit on real QPU and have a look at the job. There you will see both your original circuit and transpiled one. The latter is composed of QPU native gates. I suspect that you will see almost same gates on all three qubits. $\endgroup$ Aug 7 at 6:39
  • 1
    $\begingroup$ q0 + q1 are indeed the same in the transpiled version (and consisted of 2 gates). q2 is the most efficient one consisted only of 1 gate [sqrt(X) is a native gate and it does exactly pi/2 rotation around the x-axis] $\endgroup$
    – Ohad
    Aug 7 at 9:49

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.