Open tanujkhattar opened 9 months ago
I figure this is a good issue to implement in order to familiarize myself with qualtran and the development workflow in general. I've written a bloq which I believe implements the simplest method for Hamming weight phasing with a configurable number of ancilla, but I am unsure what the best-practice method is for sending a subset of a register to a component bloq. At the moment I split the entire register, take a slice of that list corresponding to my subset, then join the slice and send that to the component bloq. I then split the output of that component bloq and add them to an initially empty list. Following this, the elements of the list look like: Split<0>.reg[0], Split<0>.reg[1], ... Now when I run bb.join on this list, I get ValueError("'join' expects a 1-d array of input soquets to join."). My understanding was that bb.split yielded exactly a 1-d array of soquets, so intuitively sticking the results of a bunch of splits together and running bb.join would work. I think I am misunderstanding how join and split work/are meant to be used, and I am sure there is a better way of doing what I am trying to do. Any suggestions would be greatly appreciated.
My understanding was that bb.split yielded exactly a 1-d array of soquets, so intuitively sticking the results of a bunch of splits together and running bb.join would work.
This is how it's supposed to work, how are you "sticking the results of a bunch of splits together" ? Can you maybe share some code snippets / open a draft PR so we can look at the code and give some more concrete feedback?
Also, if you are looking for useful things to work on to familiarize yourself with Qualtran, then https://github.com/quantumlib/Qualtran/issues/1434 is a good one. The outline of the bloq already exists in https://github.com/quantumlib/Qualtran/blob/b0ef1777c75b675794c07594d434bfd75bf4bb38/qualtran/bloqs/gf_arithmetic/gf2_multiplication.py#L50 and the goal would be to fill in the implementation by implementing the build_composite_bloq
method.
Compilation of Fault-Tolerant Quantum Heuristics for Combinatorial Optimization gives detailed costings and constructions of oracles for useful optimization problems. This issue is to track the addition of these oracles to Qualtran. The following is a running list of useful oracles that we should add
n - n.bit_count()
additional ancilla qubits described in https://arxiv.org/abs/1709.06648. This task is to expand this implementation s.t. the the primitive expects number of ancilla qubits as a configurable parameter and follows the strategy described in Appendix A.2 of https://arxiv.org/pdf/1902.10673.pdfxref https://github.com/quantumlib/Qualtran/issues/485