Add another implementation for the "increment" function in the discrete quantum walk tutorial
The tutorial on Discrete Quantum Walks demonstrates an example of a quantum walk on a circle. The quantum_step_clockwise quantum function is implemented as a QFT-adder, however, there are other implementations available for such quantum operation, e.g., by applying a cascade of multi-controlled-X gates.
The goal of this issue is to add another implementation for the quantum_step_clockwise quantum function in the aforementioned tutorial.
Detailed guidelines:
- Within the section "Example: Symmetric Quantum Walk on a Circle" in the notebook do the following:
- Add a text explaining that in this example we will construct an implementation for the "clockwise_step"/"increment" function, which is different from the QFT-based implementation presented above.
- Add a cell defining a new quantum function with the following declaration:
qfunc increment(x: QArray[QBit]). - Use the new function in the specific example treated in the section.
- Modify the synthesis constraints: optimize over depth with a relevant constraint over the width.
- Under the "Technical Notes" section, add a short explanation about the implementation.
- Make sure to generate a qmod (using the write_qmod function) for the modified example.
- Make sure the notebook looks well, does not have any typos / mistakes, and is running properly.
- Follow the contribution guidelines to open a pull request.
If you have any questions or comments, you can ask them here in the issue, or in our slack community, and the Classiq team will be happy to assist.
Happy quantum coding!
@AbdullahKazi500 Please see the description above. Let us know if you have any questions.
sure let me have a look
@TomerGoldfriend I have started the work on this
Great @AbdullahKazi500 ! let us know if you have any questions.
Great @AbdullahKazi500 ! let us know if you have any questions.
Hi can we use auxiliary qubits (qr_aux) when implementing multi-controlled-X gates in Classiq?
Great @AbdullahKazi500 ! let us know if you have any questions.
Hi can we use auxiliary qubits (qr_aux) when implementing multi-controlled-X gates in Classiq?
You do not need to specify auxiliary qubits explicitly. Classiq supports various implementations for the multi-controlled-X operation. The implementation, and in particular whether there is a usage of auxiliaries or not, is determined automatically by the synthesis. For example, you can synthesize the following code
qfunc main(output target: qbit) {
qba: qnum;
allocate<5>(qba);
allocate<1>(target);
control (qba==2) {
X(target);
}
}
with different optimization/constraints and see that different implementations are chosen.
@TomerGoldfriend - is this still in progress or should I close it? Thanks
@AbdullahKazi500 could you please give an update? are you planning to work on this?
@TomerGoldfriend - is this still in progress or should I close it? Thanks
Hi @amir-naveh and @TomerGoldfriend this is still in progress I am testing my code will report soon
you can keep the issue open for now
@AbdullahKazi500 could you please give an update? are you planning to work on this?
Hi tomer I got the implementation running the code runs fine for now and is giving the output with the increment decrement but I have a doubt with the output /results we can discuss this next week when I make a PR
OK, good @AbdullahKazi500 .
@TomerGoldfriend - what is the status here? Can we close this?
@TomerGoldfriend - what is the status here? Can we close this?
there was some progress but the code is halfway done as I am busy this week and the coming week you can close it and if you want you can reopen it later on
OK, good @AbdullahKazi500 .
Hi Tomer if you want I can upload my file but I am not sure how well is the implementation been done
@AbdullahKazi500 no need to upload a partial code. @amir-naveh I am closing this and will reopen when @AbdullahKazi500 has something to contribute.