ubsuny / 23-Homework1G1

Homework 1 Repository Group 1
0 stars 6 forks source link

How to compose the circuit.. #28

Closed uarif closed 12 months ago

uarif commented 12 months ago

Hi James, How to compose a circuit for this multiplication function? Just like we did in the IMB quantum computer, compose circuits, but I know how to use 0s, 1s but not the higher digits.

WildJimmy commented 12 months ago

Hi Arif,

The general form of the circuit is (assuming I understand correctly) to encode the inputs onto qubits, then apply a hadamard gate to place the qubits into superposition states, then apply a QFT gate (quantum Fourier Transform), then a controlled phase shift gate to each pair to 'multiply' together, then an inverse QFT, then measure the output qubits.

This website https://quantumcomputinguk.org/tutorials/multiplication-on-quantum-computers-with-qiskit helps a little bit I think. It helped me a lot with troubleshooting. The actual circuit at a fundamental level is definitely tricky though, and I'm not very familiar with the platform for it

Edit: missed a step intially

AhmedCode99 commented 12 months ago

I found this tutorial to be very helpful:

https://www.youtube.com/watch?v=3Tkl_Zv0bJs