A system and method for separating a quantum state into multiple subspaces
The quantum computer system efficiently projects quantum states onto subspaces with specified Hamming weights using entanglement and measurement, addressing inefficiencies in existing methods and improving computational efficiency and noise resistance.
Patent Information
- Application Number
- PCT/GB2025/050204
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-01
- Filing Date
- 2025-02-03
- Publication Date
- 2025-08-07
AI Technical Summary
Existing quantum computing methods struggle to efficiently project quantum states onto subspaces with specified Hamming weights, particularly in the context of quantum devices representing interactions between discrete physical, logical, or geometric objects, and there is a need for improved computational efficiency and additional functionality in these projections.
A quantum computer system and method using a first and second register to perform quantum entanglement and measurement, iteratively separating a quantum state into distinct subspaces of a Hilbert space indexed by entangled values, ensuring only one subspace contains elements of a specific Hamming weight k, optimized for architectures like ion-trap quantum computers with high connectivity.
The method achieves efficient projection of quantum states onto subspaces with specified Hamming weights, reducing circuit depth and noise sensitivity, and enhances computational efficiency by leveraging the specific constraints and capabilities of quantum computing hardware.
Smart Images

Figure GB2025050204_07082025_PF_FP_ABST
Abstract
Description
[0001]A SYSTEM AND METHOD FOR SEPARATING A QUANTUM STATE INTO MULTIPLE SUBSPACES Field The present application relates to a system and method for separating a quantum state into multiple subspaces, for example to obtain a subspace comprising elements havinga specified Hamming weight k.Background States on ^-qubit quantum devices are elements of a 2^dimensional Hilbert space. In many applications of such devices, it is important to prepare and maintain (provide) stateswhich are restricted to subspaces of this Hilbert space. One such family of subspaces is thatof the ^-Hamming weight computational basis states (seehttps: / / en.wikipedia.org / wiki / Hamming_weight for additional information on Hammingweights). This subspace is particularly important when the states of the ^-qubit quantumdevice are used to represent the behaviour of ^ discrete physical, logical or geometricobjects, for example interacting systems of particles, biomarkers or network nodes. In thesecases, the ^-Hamming weight subspace can be used to represent the interactions between^ out of ^ of the objects. For most of these applications, the objects themselves aredistinguishable only by their interactions with other objects. For this reason, an important problem in such applications is how to restrict or projectan ^-qubit state to the ^-Hamming weight subspace, both at the beginning of a computation(in state preparation) and throughout the computation (mid-circuit). These projections allowus to filter the quantum states on the device to focus on ones having a certain Hammingweight or set of Hamming weights. One problem addressed here is how to perform thisprojection via quantum entanglement, for example using an auxiliary register, followed bymeasurement. Although known solutions are available for this problem, there is a desire to improve such solutions, for example to improve computational efficiency and / or to provide additional functionality when working with k-Hamming weights. The following papers provide examples of research relating to the technical areadescribed herein (the first two providing an existing solution to the problem of how to performthe above projection). Ionicioiu, R., Popescu, A. E., Munro, W. J., and Spiller, T. P. Generalized paritymeasurements. Phys. Rev. A 78 (Nov 2008), 052326. This paper discloses generalisedparity measurements for state preparation Ubaru, S., Akhalwaya, I. Y., Squillante, M. S., Clarkson, K. L., and Horesh, L. Quantum topological data analysis with linear depth and exponential speedup.arXiv:2108.02811 (2021). This paper discloses mid-circuit projections applied toconstructing Laplacians. Cruz, D., Fournier, R., Gremion, F., Jeannerot, A., Komagata, K., Tosic, T., Thiesbrummel, J., Chan, C.L., Macris, N., Dupertuis, M.-A. and Javerzac-Galy, C. EfficientQuantum Algorithms for GHZ and W States, and Implementation on the IBM QuantumComputer. Adv. Quantum Technol., 2: 1900015. https: / / doi.org / 10.1002 / qute.201900015(2019). This paper proposes efficient deterministic algorithms with logarithmic step complexities for the generation of entangled GHZNand WNstates useful for quantum networks. Ismail Yunus Akhalwaya, Shashanka Ubaru, Kenneth L. Clarkson, Mark S. Squillante, Vishnu Jejjala, Yang-Hui He, Kugendran Naidoo, Vasileios Kalantzis, and Lior Horesh. Towards Quantum Advantage on Noisy Quantum Computers.https: / / arxiv.org / abs / 2209.09371 (2022). This paper relates to noisy intermediate-scalequantum topological data analysis (NISQ-TDA) and presents an implemented end-to-endquantum machine learning method needing only a short circuit-depth.Bärtschi, A., Eidenbenz, S. (2019). Deterministic Preparation of Dicke States. In: Gąsieniec, L., Jansson, J., Levcopoulos, C. (eds) Fundamentals of Computation Theory. FCT 2019. Lecture Notes in Computer Science, vol 11651. Springer, Cham. https: / / doi.org / 10.1007 / 978-3-030-25027-0_9. A. Bärtschi and S. Eidenbenz, "Short-Depth Circuits for Dicke State Preparation," 2022 IEEE International Conference on Quantum Computing and Engineering (QCE), Broomfield, CO, USA, 2022, pp.87-96, doi: 10.1109 / QCE53715.2022.00027. These two citations above both provide efficient ways of preparing the k-Dicke stateon n qubits using a single register. The k-Dicke state is a specific quantum state in the k-Hamming weight space; in particular, the k-Dicke state is the uniform superposition over allcomputational basis states having Hamming weight k. Summary The invention is defined in the appended claims. A quantum computer system and a method for using such a quantum computer system are disclosed. The quantum computer system comprises a first register and a second register which are used to separate a quantum state into multiple subspaces of a 2ndimensional Hilbert space. The method comprises defining a quantum state comprising 2nelements on the first register, the first register comprising n qubits; defining a quantum stateon the second register, the second register comprising one or more qubits; and receiving avalue k, where k is a binary integer such that 0 =< k =< n. The method further comprisesperforming a bit-wise iteration process comprising: (i) performing a quantum entanglement between the first and second registers to separate the quantum state on the first register into distinct subspaces of the Hilbert space which are indexed by the entangled values on the second register, and (ii) measuring an outcome on the second register to find a match with aportion of k, wherein said portion of k increases incrementally with the iteration process untilthe match is with all of k. The bit-wise iteration process is used to separate the quantum state on the first register into distinct subspaces of the Hilbert space, wherein elements of the distinct subspaces have different Hamming weights and exactly one of the subspaces contains only elements of Hamming weight k. Also disclosed is a method for using a quantum computer system including aquantum circuit comprising a first register and a second register to provide a quantum state representing a subspace of a 2ndimensional Hilbert space, the quantum state having a k Hamming weight. The method comprises defining a quantum state comprising 2nelementson the first register of the quantum circuit, the first register comprising n qubits; defining aquantum state on the second register of the quantum circuit, the second register comprisingone or more qubits; and receiving a value k, where k is a binary integer such that 0 =< k =<n. The method further comprises performing a bit-wise iteration, starting at i =1corresponding to a least significant bit of k, wherein each iteration comprises: (a) performinga quantum entanglement between the quantum state of the first register and the quantum state of the second register, wherein performing the quantum entanglement includes makinga projection of the n qubit state to a subspace U which contains the k Hamming weightsubspace; (b) deriving a bit from the quantum entanglement by making a measurement ofthe second register to realise the projection; (c) determining whether or not the derived bit isequal to the i th bit of k; d) if the derived bit is not equal to the i th bit of k, terminating themethod as failing; and (e) if the derived bit is equal to the i th bit of k, incrementing i by oneand performing the next iteration, wherein the subspace U converges to the k Hammingweight over the course of the iterations. The method further comprises terminating the bit-wise iteration as a success if the derived bit for i = [log (n+1)] is equal to the most significantbit of k, indicative of the system determining a quantum state having a Hamming weight of k. Also provided is a quantum computing system configured to perform the above method. Features of the above methods and systems can be combined in any suitable manner according to the circumstances of a given implementation. In the current NISQ era before universal error correction, computer-implemented methodswhich are well adapted to the capabilities and requirements of the quantum computinghardware are critically important to extract the greatest efficiency from the available quantumcomputing hardware. Example computer-implemented methods described herein have theadvantage of being adapted to take account of the specific constraints and capabilities ofparticular quantum computing architectures. In a particular example, the auxiliary registerhas been configured such that it may be adapted to the routing constraints of the architecture. The controlled phase gates used in the method, coupling the auxiliary register to qubits in the main register, may be performed on any qubit in the auxiliary register. This has significant implications for the problem of routing gates onto physical qubits, both in terms of reducing number of gates and reducing the depth of the circuit.An example of a computer system architecture for which the configurability of the auxiliaryregister can be exploited is an ion-trap based quantum computer such as, for example,Quantinuum’s H1 and H2 ion-trap based quantum computers. The architectures of thesesystems provide high connectivity between qubits within an ion trap - the connectivity is notlimited to connections between nearest neighbours, and can be up to all-to-all connectivity. In practice, all-to-all connectivity is not essential and the advantages of potentially high connectivity are limited by the transport time to shuttle qubits into gate zones (a region of the quantum computer in which gates may be performed on qubits). Therefore, for an optimal implementation, the auxiliary qubits may be kept physically close to gate zones. This reduces the length of the transport time, enabling a shorter run-time and improving theefficiency of processing. Furthermore, the size of the auxiliary register can be optimized forthe number of gate zones available. This would allow for the maximum possible parallelisation for the fewest necessary resources in the auxiliary register. Brief Description of the Figures Various examples and implementations of the disclosure will now be described in detail by way of example only with reference to the following figures: Figure 1 provides an example of a quantum circuit diagram giving an overview of thecomponents for a single-bit Hamming weight projection. Figure 2A provides an example of a quantum circuit diagram for performing a singlebit projection for a single auxiliary qubit. Figure 2B provides another example of a quantum circuit diagram for performing asingle bit projection Figure 2B represents a parallel version whereall the rotations may be done in depth 2 using an auxiliary register having ^ / 2 qubits. Figure2B therefore shows how the circuit may be modified to reduce circuit depth when a largernumber of auxiliary qubits are available.Figure 3 provides an example of a quantum circuit diagram for ^^, the full Hammingweight ^ projection. In particular, Figure 3 shows an overview of how to construct thequantum circuit from components which perform single bit projections. Figure 4 provides an example of a quantum circuit diagram showing an overview ofthe components for constructing a single bit controlled Hamming weight projection. If^^,…,^^^^are the first ^−1 bits of the Hamming weight of ^^, … , ^^, then the measurementwill return the ^^^bit of the Hamming weight. Figure 5 provides an example of a quantum circuit diagram showing an adaptedversion of the quantum circuit of Figure 4 which, under certain assumptions, returns 0 from a final measurement if and only if the ^^^bit of the Hamming weight is ^^. Figure 6 provides an example of a quantum circuit diagram for projecting onto thesubspace of states | ^^ … ^^^ for which the ^^^ bit of the Hamming weight (∑ ^^) agrees withthe mth bit of ^.Figure 7 provides an example of a quantum circuit diagram for projecting onto thesubspace of states for which the ^^^through ^th bits of the Hamming weight agree withthose of ^. The quantum circuit projects onto the space spanned by states |^^ … ^^^ whereall bits between the ^th bit and the ^th bit of ∑ ^^ are the same as those of ^.Figures 8A and 8B depict a flowchart which provides an example of a method forobtaining a quantum state having a specified Hamming weight as disclosed herein. Theoperations shown in Figure 8B repesent details (sub-operations) of one of the operations shown in Figure 8A. Figures 9A-9D are examples of variations on the approach shown in Figures 8A and 8B. In particular, Figure 9A illustrates a variation in which a match is achieved for a subset of the bits of the Hamming weight (rather than for the full Hamming weight). Figures 9B-9D illustrate variations in which Hamming weight bits are not measured in every iteration butmay be used instead to control a separate operation.Figure 10 is a schematic diagram showing an example of a quantum computingsystem for implementing a method for separating a quantum state into multiple subspaces such as disclosed herein, for example to obtain a subspace comprising elements having aspecified Hamming weight k.Detailed Description1. Technical specification of the quantum circuitsAs disclosed herein, a quantum computer is used to perform projections from a fullHilbert Space on ^ qubits, (and various different subspaces of this), to the space spanned by computational basis states having Hamming weight ^, ^^(and various statesmade by combining such states). A modular measurement-based procedure is adoptedwhich performs the projections by breaking up the full projection ^^: ℋ^ → into a series ofsmaller projections. To this end, the following definitions are adopted:• For any whole number m such that 0 < ^ ≤ ⌈log^⌉, ^^^represents thesubspace spanned by computational basis states whose Hamming weight, ^′ iscongruent to ^ modulo 2^, i.e. the first ^ bits of ^′ match those of ^. That is (the ⊕ symbol is the symbol for direct product, which is like the union operator for vectorspaces). •For ^ = 0, we adopt the convention that ^ ^^ = ℋ^.• For any whole number m such that 0 < ^ ≤ ⌈log^⌉, write ^^^^ for the direct sum of spaces ^^^^ for ^^ = 0,1, ⋯ , ^ − 1. That is This defines the space spanned by all states for which the first m bits of their Hammingweight agree with one of 0, 1, 2, …., k-1. •For any whole number m such that 0 ≤ ^′ < ^ ≤ ⌈log^⌉, write ^^^^,^for the projection from the space ^^^^to the space ^^^. That is, •When ^′ = 0, write this projection as ^^for the projection from the spac^^^ e ^^to the space ^^^ , and for any whole number m when ^ ≥ ⌈log^⌉ we have ^^ = ^^^. •For any ^ ≤ ^, we write ^^^ for the projection from the full ^-qubit Hilbert spacethe subspace ^^^^ . We now consider how to construct the quantum circuits for implementing theprojections on an ^-qubit register using a variable number of qubits from an auxiliaryregister. We first describe in detail the projection ^^^which projects from the full ^-qubit Hilbert space to the space spanned by computational basis states whose Hamming weighthas the same first bit as ^ and show how to adapt this projection to perform the relativeprojections ^^^^^,^. We then describe how to assemble the relative projections to form ^^.Here, the ‘relative projections’ correspond to the projections ^(^^^,^) ^ which handle a singlebit. They are ‘relative’ in the sense that they perform a certain projection relative to theassumption on the input that the Hamming weights agree with k for the first m-1 bits. Finally,we describe how to add controlled operations to perform the projections ^^^.2. Single bit projectionA method is described for performing a single bit projection ^ ^^ and this can then actas a model for the other, more complicated, projections. The steps of the method orprocedure may be implemented as follows on a main (first) register in combination with anauxiliary (second) register, for example, based on the quantum circuit diagram of Figure 1,which provides an overview of the components for a single-bit Hamming projection. 1. Prepare a Greenberger–Horne–Zeilinger (GHZ) state on the auxiliary register.That is a state |^^^^^ =^ √^(|0 … 0^ + |1 … 1^). This construction is known (see Cruz et al ascited above) and may be performed in log depth by applying a Hadamard followed by a “fan-out” circuit (see Akhalwaya et al as cited above).2. For each qubit in the main register, a controlled ^-rotation gate is applied to theauxiliary register controlled by that qubit. The angle for this rotation may be ^ =^ ^ and therotation may be applied to any qubit of the auxiliary register. To minimise gate depth, wecycle through the auxiliary qubits in turn as these controlled rotations are applied.3. Next, a z-rotation of −^^ is applied to any of the auxiliary qubits.4. The inverse of the GHZ state preparation circuit is then applied to the auxiliaryregister. 5. Lastly, the first qubit in the computational basis is measured, and the projection succeeds if the outcome of the measurement is|0^. To extend the above approach to the projection we do exactly theprocess with ^ = In particular, Figure 2A shows a quantum circuit for performing abit projection for a single auxiliary qubit (the top line in Figure 2A).Figure 2B shows an example of a parallel version where all the rotations are performed indepth 2 using n / 2 auxiliary qubits (=4 auxiliary qubits in the particular configuration of Figure2B). Accordingly, Figures 2A and 2B illustrate how the quantum circuit may be modified toutilise a reduced circuit depth when additional auxiliary qubits are available – such a lowercircuit depth allows a smaller quantum circuit to be used which is then more resistant to noise.3. Bit-wise Hamming weight projectionThe above relatively simple projections can be assembled to perform (obtain) the fullprojection ^^. Mathematically, the projection can be written as a product of successive projections, where ^ = ⌈log^⌉. The projection ^^ may therefore be performed by successively applyingthe single bit projections for ^ = 1, … , ⌈log^⌉. This overall (full) projection succeeds ifand only if each of the constituent projections succeeds. This gives the advantage of being able to detect failure of the projection at multiple points in the running of the circuit, thereby leading to a shorter circuit on average.4. Controlled operations and projecting on arbitrary bitsThe quantum circuits in the previous two sections perform Hamming weightprojections one bit at a time, starting from the lowest bit. In particular, when performing theprojection ^^,^^^^ with a quantum circuit such as described in Figures 2A and 2B, the outputof a successful projection is in the space spanned by all computational basis states whoseHamming weights agree with ^ on the ^ + 1th bit. To achieve this, the input state must be inthe space spanned by all computational basis states whose Hamming weights agree with ^ on every bit up to the ^th bit. Figure 3 provides an example quantum circuit diagram for ^^, the full Hammingweight ^ projection. This diagram provides an overview of how to construct the quantumcircuit from components which perform single bit projections. There are important applications however where we only care about projecting ontothe space spanned by states whose Hamming weight agrees with ^ on the ^th bit alone(without any assumption on the other bits). To this end, we refer to Figure 4 which providesan example of a quantum circuit diagram showing an overview of the components for constructing a single bit controlled Hamming weight projection. are the first ^−1bits of the Hamming weight of ^^, … , ^^ then the measurement will return the ^^^bit of the Hamming weight. Thus in Figure 3, the output is a collection of substates which have (share) a predetermined Hamming weight, whereas in Figure 4, the output is the value of a particular bit in the Hamming weight. Without measurement, this circuit based on Figure 4 is called ^^^. If a measurementis performed, this forces the circuit to collapse into one of the two cases which the circuit hasseparated corresponding to the two possible values of the lth bit of the Hamming weight; removing the measurement allows us to keep both cases in superposition along with the extra qubit of information which can be used in later computations. The quantum circuit fromFigure 4 performs the projection in the main (data or “q”) register onto the space spannedby computational basis states whose Hamming weights agree with the ^th bit of ^ (as long asthe input state is in the space spanned by states |^^ … ^^^^^|0^|^^ … ^^^ where ^^, … , ^^^^ arethe first ^ − 1 bits of the Hamming weight ∑ ^^).Note that the controlled phase operations between the “b” register and the auxiliaryregister may be placed on any qubit of the auxiliary register (the b register, which is alsoreferred to herein as the control register) may be implemented separately from or incombination with the main and / or auxiliary registers). In particular, in some implementations,there may not be ^ − 1 qubits available in the auxiliary register. However, if there areenough qubits available from the auxiliary register, then the phase gates may be spread outto save depth (and so improve noise resistance).If we remove the measurement from this circuit of Figure 4, it can be seen that afterapplying this circuit (with ^ =^ ^^) to a state |^^|0^|^^ as described above, the first qubit of theauxiliary register will store the ^th bit of the Hamming weight of ^ and the other qubits of theauxiliary register will be in the state |0^. We refer to this circuit as ^^^, where ^ denotes thecontrol from the ^ register. Note that ^^^ has no control register and prepares the first bit ofthe Hamming weight of the main register - we will call this ^^ to indicate the lack of a controlregister. Figure 5 provides a quantum circuit diagram showing an adapted version of the ^^^circuit which, under certain assumptions, returns 0 from the final measurement if and only if the ^^^bit of the Hamming weight is ^^. This circuit is called ^^^^,^. Adapting this onstruction, the quantum circuit ^^^,^^ i^ cs formed by setting ^ = and adding a single ^gate of angle + ⋯ + 2^^^^^)^ before the ^^^^block, where ^^is the ^th bit of ^.When applied to a computational basis state |^^|0^|^^ where ^^, … , ^^^^, ^^ , … ^^^^ are thefirst ^ − 1 bits of the Hamming weight ∑ ^^, the measurement at the end will yield 0 if andonly if the ^th bit of the Hamming weight is ^^, the ^th bit of ^. A simple adaptation to thiscircuit (removing the ^^ component of the final Z rotation) results in a measurement whichreturns the mth bit of the Hamming Weight ∑ ^^. This variant is used in later examples. Wewrite ^^^^for the circuit ^^^^,^. Figure 6 provides a quantum circuit diagram for projecting onto the subspace ofstates for which the ^^^ bit of the Hamming weight is the same as that of ^. In other words,we can use this modified circuit to construct a projection onto the space spanned bycomputational basis states whose Hamming weights agree with ^ on the ^th bit. The circuitprojects onto the space spanned by states |^^ … ^^^, assuming that the ^th bit of ∑ ^^ is thesame as that of ^. The first ^ − 1 subcircuits prepare a register containing the first ^ − 1 bits of the Hamming weight and the final subcircuit and measurement use these to perform the appropriate projection. An extension to the configuration in Figure 6 is shown in Figure 7. Here we combine the bitwise construction in Figure 3 and the conditional construction in Figure 6. This allows us to perform a projection onto Hamming weights where multiple bits (but not all bits) agreewith the bits of ^. In particular, Figure 7 provides a quantum circuit diagram for projectingonto the subspace of states for which the ^^^through ^th bits of the Hamming weight agreewith those of ^. The circuit projects onto the space spanned by states |^^ … ^^^ where allbits between the ^th and the ^th bit of ∑ ^^ are the same as those of ^. For example, if weset ^ = 0 and m = ⌈log2 (^ + 1)⌉, this construction performs the projection onto the spacespanned by states with Hamming weight strictly less than The block at the endensures that the auxiliary qubits storing the bits of the first ^ − 1 bits of the Hamming weightare “uncomputed” to zero. In particular, at the end of the computation, we want to return the auxiliary register to all 0’s. Doing this without affecting the state on the data register is called“uncomputing” the auxiliary qubits. This is a standard term in quantum computing and isusually performed (as here) by applying the inverse of the series of entangling operationswhich computed the auxiliary qubits in the first place. It will be appreciated that the present approach may use some known components(e.g. GHZ preparation circuits) but these may be included in a particular method or system toprovide bitwise Hamming weight checks as described herein. Accordingly, the presentapproach supports the determination of Hamming weights in a quantum computingenvironment and helps to improve / supplement existing implementations. For example, theapproach described herein may be performed with smaller and shallower quantum circuits(compared with existing solutions), which is important for near-term applications of quantumcomputing. The approach described herein generally involves (inter alia) three parts. The first part is the use of a reduced (short)-depth circuit in conjunction with a variable number ofauxilliary qubits for performing a single bit projection. This part is implemented with aquantum circuit that performs a projection from the whole Hilbert space on ^-qubits to thespace spanned by those states whose Hamming weights are either even or odd.In particular, each “computational basis state” has a Hamming weight which is eithereven or odd. In general, a state may be a superposition of basis states with even or oddHamming weight. The projections are used to separate this superposition according to information about the Hamming weight of each constituent state. As depicted in Figures 2A and 2B, this bit check may be performed with a short depthusing controlled phase gates and GHZ preparation circuits. The depth of this circuit is logarithmic in ^, the number of qubits in the second (auxiliary) register, with an additionaldepth contribution of ^ / ^ from the controlled phase gates, thereby giving an overall depth oflog^ when ^ is linear in ^.The second part of the present approach is a scheme for organising the circuits inFigures 2A and 2B, which perform one bit of the bitwise projections, to determine the fullHamming weight ^ projection from the full Hilbert space to the space spanned by states ofHamming weight ^. As depicted in Figure 3, this is performed in a bitwise manner usinglog^ copies of the single bit projection. The overall depth of this circuit is thus log^^ and itsmodular structure allows for a very efficient use of classical data from the measurements. Inparticular, a measurement of 1 at any step indicates failure of the projection and thus thecircuit can be stopped at this point and repeated if necessary. There are two common different ways to use a projection P in a quantum computingmethod. The first is to prepare a desired quantum state P|q> which then gets used in a laterquantum computation. Here, repeating until we succeed is involved. The second is whenwe would like to know what fraction of the input state |q> satisfies the conditions for the projections to succeed. Mathematically this means computing the inner product <q|P|q>. This can be estimated by running the circuit for the projection with input |q> and counting the successes and failures. In this case, the failures are “useful” and we stop when we haveenough samples rather than when we achieve a certain outcome (so repetition is not alwaysnecessary). In the third part of the present approach, the single bit projection quantum circuit iscontrolled to perform further projections based on the Hamming weight of an ^-qubit state.Figures 6 and 7 show how to perform this adaptation by using the single bit projectionmodules (without measurements) to prepare additional auxiliary qubits which store some bitsof the Hamming Weight.Figures 8A and 8B are flowcharts of a method for providing an example of a quantumstate having a specified Hamming weight as disclosed herein – see in particular the abovesections: 1. Technical specification of the quantum circuits; 2. Single bit projection; and 3.Bit-wise Hamming weight projection. The operations shown in Figure 8B repesent details (sub-operations) of one of the operations shown in Figure 8A. In the Input operation 810, the main (first / data) register is prepared into an initial state|Φ > that supports various operations being performed on the qubits. In addition, the qubitsof the auxiliary (second) register are cleaned (set to zero). The initial value of m is set to 0.Operations 820, 830, 840, 850, 855A and 855B then provide an iteration loop. At thestart of the loop, in the Assume operation 820, the state | Φ > is assumed to be an elementof ^^^ which represents the subspace spanned by computational basis states whoseHamming weight, ^′, is assumed to be congruent to ^ modulo 2^, i.e. the first ^ bits of ^′are assumed to match those of ^. The rationale for this assumption is apparent fromsections 2. Single bit projection and 3. Bit-wise Hamming weight projection as set out above.In the Separate operation 830, the state | > is separated into a first set of stateswhich do agree with the (m + 1)th bit of k and a second set of states which do not agree withthe (m + 1)th bit of k. More detail about this separation is provided by Figure 8B as described further below. A measurement is now performed in operation 840 on the firstqubit of the auxiliary register; this has the effect of collapsing the system to the first orsecond set of states. If the measurement selects the set of states which correspond to the (m + 1)th bit of k, then the method proceeds to operation 850. However, if the measurementselects the set of states which do not correspond to the (m + 1)th bit of k, this represents afailure to find elements of Hamming weight k. In this case the processing continues tooperation 849 which indicates a restart of the computation is required to progress.Although such a restart increases the time taken to find elements of Hamming weightk, the bitwise nature of the iteration in Figure 8A allows failed (partial) rejections to bedetected relatively quickly. The overall result is the approach of Figure 8A may be moreefficient than architectures in which the full set of computations are performed before a failure is detected. Atest is made at operation 850 to compare m+1 with [log2 (n+1)], the latterrepresenting the number of bits in n. For the initial iterations, m < [log2 n], so the output fromoperation 850 is progressed to operation 855A. In operation 855A, m is incremented andthe set of states is now limited to the first or second state from operation 830 according tothe measurement 840. It will be appreciated that incrementing m for each iteration allowsmatching with a greater (increasing) portion of k for each iteration, i.e. matching to a largernumber of bits within k. Given this incrementing of m (and assuming a computation restart of operation 849 isavoided), the comparison of operation 850 will eventually produce a match, i.e. m = [log2(n+1)], whereby the analysis for the full bit-length of k is completed. Accordingly, an outputis provided at Output operation 855B corresponding to the full projection ^^: ℋ^ → broken down into a series of smaller projections, where ^^represents the subspace of spanned by computational basis states having a Hamming weight of k.The operations shown in Figure 8B repesent details (five sub-operations) of the Separate step 850 as shown in Figure 8A. The (sub) operations are shown in the sequence of boxes in the top half of the diagram, and the elliptic shapes below the boxes represent thestored state information on the main and auxiliary registers after the corresponding (sub)operations have been performed. (The reference numerals beneath the elliptical shapesapply to both the boxes above and the elliptical shapes below).The first operation is Input 2, which follows on from the Assume box 820 in Figure 8A. The Input 2 operation 831 may be considered as corresponding to a combination of the Input operation 810 and the Assume box 820 shown in Figure 8A. The Input 2 operation operation 831 is applied during the iterations of Figure 8A (whereas Input 810 is onlyinvolved in setting up the iterations). In the Input 2 operation, the state | Φ > on the main(data) register is an element of ^^^ which represents the subspace spanned bycomputational basis states whose Hamming weight, ^′, is assumed to be congruent to ^modulo 2^, i.e. the first ^ bits of ^′ are assumed to match those of ^.The next operation 832 in Figure 8B is Entangle and produces a quantumentanglement between the auxiliary and main registers. Producing this quantumentanglement involves the preparation of a Greenberger–Horne–Zeilinger (GHZ) state onthe auxiliary register. Such a GHZ state may be obtained in log depth by applying aHadamard followed by a “fan-out” circuit. Operation 833, Count, is performed in relation to both the main and auxiliary registers. This operation involves loading the first m+1 bits of the Hamming weight in thedata (main) register into the phase of the GHZ state on the auxiliary register, see also theelliptical shape contents 833. In operation Adjust 834, the states in the auxiliary register are rotated by -kπ / 2m; the motivation of this rotation is to arrange the qubits in the auxiliaryregister to have possible phases of 0 and π, which supports ready access to the stateinformation held in the auxiliary register. In the final operation of Figure 8B, Disentangle835, a fan-in circuit, is used to reverse the GHZ state preparation to turn the phases intomeasurable binary output. As indicated above, the operations of Figure 8B correspond to the Separate operation 830 of Figure 8A. Accordingly, following the (sub)operation of Distentangle 835, we return from Figure 8B to the Measure operation 840 of Figure 8A, which performs a measurement to collapse the first auxiliary qubit as discussed above. Figures 9A-9D are examples of different variations on the approach shown in Figures 8A and 8B. In particular, Figure 9A illustrates a variation in which a match is achieved for a subset of the bits of the Hamming weight (rather than for the full Hamming weight). Figures 9B-9D illustrate variations in which Hamming weight bits are not measured in every iteration but may be used instead for controlling a separate operation. Figure 9A is a flowchart providing a subset of the k bits of the full Hamming weight;for example, the subset (portion) may comprise bits in the range It will be appreciated that many aspects of the processing shown in Figure 9A match processing in Figure 8A as indicated by corresponding reference numerals (810, 910; 820, 920, etc). For conciseness, the discussion of Figure 9A will therefore focus on those aspects of the processing that is different compared with Figure 8A. The Input section in Input 810 sets the value of m to 0 corresponding to the initial(least significant) bit of k. With this start, the process of Figure 8A results in a determinationof all the bits of k. In contrast, in Figure 9A, Input operation 910 sets the value of m torepresent the start of the bit range of interest to the user (with respect to the full length of Hamming weight k). Processing in Figure 9A then proceeds via the Assume 920 box, the Separate box930, and the Measure box 940 – these operations generally correspond to the operationswith the same name in Figure 8A and so will not be discussed further. (The same applies with respect to the additional processing of Figure 8B, given that this additional processing represents part of the Separate box as discussed above). The processing of Figure 9A at operation 950 then diverges again from that of Figure8A at operation 850. In particular, in Figure 8A the testing determines whether the last bit of the k-Hamming weight has been reached. In contrast, in Figure 9A the testing 950 determines whether the highest bit of interest (m’) has been reached (rather than the last bit of k). If the last bit to be tested (according to the appropriate test of 850 or 950) has notbeen reached, the processing increments m at operation 855A, 955A fand progresses to thenext iteration. Operation 955A is generally the same as operation 855A, hence the description above with respect to operation 855A can also be generally applied to operation 955A. However, if the test 850 / 950 indicates that the last bit to be tested has been reached,the processing exits via the Output box of 855B, 955B respectively. Note that whereas theOutput 855B spans the full bit range of the k Hamming weight, the projection of the Output955B is limited to the portion of k corresponding to the specified bit range from m to m’. Thisprocessing of Figure 9A demonstrates that the processing may be started and stopped at bitindexes other than 0 and [log n], thereby giving partial Hamming weight projections according to user specifications. Figures 9B-9D relate to a system such as depicted in Figure 4 and Figure 5. In sucha system, there is no measurement (observation) for every Hamming weight bit which isproduced; instead at least some of the bits may be re-used as a ‘controlled separateoperation’. Figure 4 provides an example of a quantum circuit diagram showing an overviewof the components for constructing a single bit controlled Hamming weight projection. If^^,…,^^^^are the first ^−1 bits of the Hamming weight of ^^, … , ^^, then the measurementwill return the ^^^bit of the Hamming weight. Without measurement, this quantum circuit is called ^^^. The quantum circuit from Figure 4 performs the projection in the main “q” register for the space spanned by computational basis states whose Hamming weights agree with the^th bit of ^ (as long as the input state is in the space spanned by states|^^ … ^^^^^|0^|^^ … ^^^ where ^^, … , ^^^^ are the first ^ − 1 bits of the Hamming weight ∑ ^^).Figure 9B commences with an Input operation 931 which involves preparation of thestate | Φ > on the main (data) register (analogous to Inbox operation 810 of Figure 8A). TheInput operation 931 further includes cleaning (zeroing) the auxiliary bits on the auxiliary register (again analogous to Inbox operation 810 of Figure 8A). The Input operation 931 further includes cleaning (zeroing) the control register. The control register may be implemented by any suitable / available element in the quantum computing system. The Inputoperation 931 further sets m to 0.In the Assume operation 942, a computational basis state |^^|0^|^^ is assumed inwhich ^^, … , ^^^^, ^^ , … ^^ correspond to the first ^ bits of the Hamming weight ∑ ^^. In theC-Separate box 943 (for controlled separation), a computation is made of the (m+1)th bit ofthe Hamming weight. Box 944 then performs a test 944 to determine whether m < ^ -1.Further information about the C-Separate box (operation) is provided below in Figure 9D. If the test of box 944 is posiive, we proceed to the Rearrange box 947, whereuponthe computed qubit is moved to the control register. The value of m is now incremented, andwe return to the Assume box 942 for the next iteration. On the other hand, if the test 944 is negative, processing flows through to theMeasure Box 945, which measures the (m+1)th bit of the Hamming weight as determined atoperation 943. If this measured value disagrees with km+1, corresponding to option 949, then the computation must be restarted (analogous to the outcome 849 in Figure 8A). However,if the (m+1)th bit of the Hamming weight agrees with km+1, processing is directed to Test 946,which determines if m = u-1. If the deterination is negative, the value of m is nowincremented, and we return to the Assume box 942 for the next iteration. Alternatively, if thedetermination is positive, we progress to the Output box 948, where the state | Φ > may beoutput subject to agreement between the Hamming weight and k between the ^th and ^th bits.It can be seen that there are various parallels between the processing of Figure 9Bcompared with the processing of Figure 8A. Thus Figure 8A has a sequence of Input,Assume, Separate, Measure, and then loop or Output. Figure 9B also has a sequence ofInput, Assume, Separate, Measure and then loop or Output. However, in Figure 9B the Separate box is for a controlled Separate and there is an additional iteration path involving Test 944 and the Rearrange box 947. Figure 9C provides an illustrative example of 3 rounds (iterations) of C-Separate 943and Rearrange 947 such as shown in Figure 9B. It can be seen that for each iteration, theprojection of the state | Φ > becomes increasingly specific but also complex with more terms.Figure 9D is a more detailed representation of the C-Separate box 943 from Figure 9B (in a similar manner to Figure 8B representing a more detailed view of the Separate box from Figure 8A). In particular, Figure 9D depicts the process for performing the projectiononto the subspace of states whose Hamming weights agree with k on each of the bitsbetween the l th and uth (inclusive).As shown in Figure 9D, the C-Separate box 943 from Figure 9B comprises an Input 2 box 981 (distinct from the Input box 931 in Figure 9B), an Entangle operation 982, a Count operation 983, an Adjust operation 984 and a Disentangle operation 985. Accordingly, the sequence of operations in Figure 9D generally matches the Input 2, Entangle, Count, Adjust and Disentangle operations shown in Figure 8B. The Input 2 box 981 in Figure 9D includes cleaning (zeroing) the qubits on the auxiliary register, as for the Input 2 box 831 in Figure 8B. However, Input 2 box 981 inFigure 9D also has entangled data (main) and control registers (which is not the case inFigure 8B). The Entangle operation 982 in Figure 9D matches the Entangle operation 832 in Figure 8B as described above. Likewise, the Count operation 983 in Figure 9D matches the Count operation 833 in Figure 8B as described above, with both of these operations 833 and 983 involving the main (data) and auxiliary registers. In particular, Count operation 983involves, for both data and auxiliary registers, loading the first m + 1 of the Hamming weightin the data register into the phase of the GHZ state on the auxiliary register. The auxiliary and control registers are rotated at Adjust operation 984 so that thepossible phases are 0 and π, which is generally the same as the Adjust operation 834 in Figure 8B. In more detail, for each state in the data register of Figure 9D, the corresponding phase on the auxiliary register is rotated using controlled rotations from the control register, which ensure the possible phases are 0 and π as mentioned above. Lastly, the Disentangle operation 985 in Figure 9D has some overlap with the Disentangle operation 835 in Figure 8B. In particular, both of these operations are performed on the auxiliary register and utilise a fan-in circuit to reverse the GHZ state preparation and turn phases into measurable binary output. In the particular case of the Disentangle operation 985 of Figure 9D, the phases are turned into a single bit representing the (m+1)thbit of the values on the data register. Figure 10 is a schematic diagram showing a potential implementation of a quantumcomputing system such as for implementing a method for preparing or maintaining a quantum state having a specified Hamming weight as disclosed herein. The computing system of Figure 10 comprises two components, a classical computing system 210 and aquantum computer system 250. The classical computing system 210 may comprise aknown form of digital computer(s) including one or more processors for executing program instructions and memory for storing the program instructions and data. Note that in some cases, the quantum computer system 250 may be provided by an emulation of a quantum computing system running on (provided by) a classical computer system. Such emulation may be used, for example, when developing a program for use on a quantum computing system, to allow testing of the program in a noise-free environment. The classical computing system 210 is shown as including two facilities a compiler 220 and a control facility 225. These two facilities are shown for convenience as located on a single classical computing system 210, but they could be provided on two separate classical computing systems if so desired. The compiler 220 is responsible for taking as input program (software) instructions and implementing the instructions on the quantum computer. The control facility 225 provides a facility for a user to control the operation of programs on the quantum computing system 250. For example, the control facility 225 may allow a user to specify settings for the program which are then applied during execution of the program. The control facility 225 may also be used to manage various interoperationsbetween the classical computing system 210 and the quantum computing system 250, forexample, transferring a compiled quantum circuit (program) to the quantum computing system 250 for execution. The quantum computing system 250 includes a quantum circuit 260, which is configured to interact directly with the hardware of the quantum computing system, for example to create and manipulate qubits 255. The quantum computing system 250 further includes various gates 256 for performing operations on the qubits 255. The quantum circuit 260 can be considered as somewhat analogous to a compiled program (low-level code) which has been adapted to run on the specific hardware implementation of the quantum computer, such as reflecting the number and connectivity of the qubits and gates255 available on the quantum computer.The quantum computing system 250 of Figure 10 further includes first (main) and second (auxiliary) registers 281, 282 for storing qubits between performing operations withgates 256. Although the first and second registers 281, 282 are shown separately in Figure9, they may be implemented (for example) using a single register having a first portion corresponding to the first register 281 and a second portion corresponding to the second register 282. More generally, it will be appreciated that the configuration and architecture shown in Figure 9 is provided by way of illustration and not by way of limitation and hence the approach described herein may be implemented on many different types of quantum computing systems or platforms. *** The approach described herein for determining Hamming weights introduces a sequential bitwise projection whose components are simpler quantum circuits than thoseused, for example, in existing implementations in this field. Further, the overall size of thewhole sequence is less than for such existing implementations. Compared with suchexisting implementations, the approach described herein also allows the use of a (much)simpler circuit when a weaker projection is desired (compared with a projection from the full Hilbert space to the desired k-Hamming weight space). By way of example, we may know that an input state (on 16 qubits say) is asuperposition of states of Hamming weight 1, 2, 3, 4, 5 or 6 for example and we want toproject onto the part of this state with Hamming weight 4. In general, a state on 16 qubits can have Hamming weight from 0 to 16 and the number 16 has 5 bits in binary. However, inthe situation above, and adopting the approach described herein, the possible Hammingweights only go up to 6 (which has 3 bits). The bitwise projection would then only need to run its loop 3 times (rather than 5 times) to achieve the correct projections. In the non- bitwise Hamming weight projections, such a saving is not possible in the same way. Accordingly, compared to existing implementations for generalised parity measurements, the approach described herein helps to remove the reliance on qubits (which are physically hard to produce and manipulate). In addition, the approach described herein removes reliance on performing a quantum Fourier transform. Such a quantum Fourier transform may be used for performing topological data analysis (TDA) on a noisy intermediate-scale quantum (NISQ) device, but scales unfavourably in terms of size and noise-robustness scales at large values of k. More generally, the approach described hereinhelps to reduce circuit sizes for certain existing computations, such as computing a k-dimensional Laplacian. The approach described herein presents (inter alia) two significant developments indetermining Hamming weight projections. The first is that the projection is done without preparing a new register containing the entire Hamming weight, which is typically performedusing existing techniques, see (i) the generalised parity measurements of Ionicioiu et al. and(ii) the direct computation of Akhalwaya et al. (both as cited above). This difference is significant because these previous methods require an auxiliary register which grows with the number of qubits in the main register, whereas the approachdescribed herein may use only 1 or 2 qubits in the auxiliary register. The present approachalso has the flexibility to use additional auxiliary qubits (or indeed qudits) if such resourcesare available. As presented herein, every additional auxiliary qubit shortens the circuits by aconstant factor. The second development is the adaptable use of different rounds in the bitwiseconstruction. In previous work such as mentioned above, the projections onto Hammingweight states are done in a single shot, usually consisting of a measurement with noutcomes. In contrast, the approach disclosed herein uses a sequence of lognmeasurements each having 2 outcomes. This distinction has (at least) two importantadvantages over the one-shot approach based on a single measurement with n outcomes.Firstly, the sequence of measurements allows us to detect most projection failures without running the entire circuit. For problems such as probabilistic quantum state preparation, this means that we can detect and restart failed preparations much earlier,thereby leading to an overall quicker preparation of states.Secondly, in the present approach, certain rounds of measurement may be omitted. In effect, this allows a measurement to be made which is targeted at only certain bits of the Hamming weight. This adaptability helps to save resources in situations where the full Hamming weight projection is not required. For example, in a situation in which the states on a quantum computer are used to represent superpositions over arrangements of a fixed number of particles, a quantum circuit may be applied which simulates some rounds of adding and removing particles in this system. If we then want to project to those states which have a particular number of states remaining it will frequently be the case that we know the states after this process will have a number of particles in some small range. By applying a few rounds of the bitwise projection, the Hamming weights of the output states can be distinguished without using the full Hamming weight projection. Other advantages of the approach described herein are that the bitwise Hammingweight projection retains the flexibility that full computation has of making a projection onto aunion of Hamming weight subspaces. In addition, quantum circuits such as those used for the Laplacian contain guarantees that the mid-circuit states don’t stray too far from thedesired subspace and so involve only the simpler projections which can be achieved by thebitwise formulation.5. Projections between direct sums of Hamming weight subspacesIn general, we adapt the procedure depicted in Figure 7 to perform a Hammingweight projection procedure on n qubits can be defined for any set ^ = {^^, … , ^^} ofHamming weights (between 0 and n) and any subset ^ = This projection whichwe will call ^^,^is realised as a method for processing a quantum state on n qubits which isrestricted to the subspace of the full n-qubit Hilbert space defined by ^^ = andproducing the state representing the projection of the input to the space ^^ .This will not work for all choices of I and O as explained below in step 3a. The method forperforming this projection is as follows :1. On a classical computing system, produce a set B, whose elements correspondto bit indices ^ for which each element of O agrees on the value at bit index ^ .2. For each element ^ ∈ ^, store on the classical computing system the subset ofvalues ^^ of the set ^ for which the value of the bit at index ^ disagrees with thevalue of the bit at index ^ for all elements of O.3. Using a classical computing system to control a quantum computer with threeregisters as depicted in Figure 7 (call these control, auxiliary and data), iteratethrough the bit indices 0 to ⌈log ^⌉ starting at the least significant bit and for eachnew index b: a. If b is in B and ^^ is empty proceed to the index. If ^^ is not empty performa controlled projection for that bit onto any Hamming weight from the set O. If the projection is successful, remove the elements of ^^ from I and allsubsequent sets ^ ^^^ , ^ ∈ ^.If I = O after this update, exit and proceed to Step 4. If b = ⌈log ^⌉ and I is not equal to O then the desired projection is notpossible. b. If b is not in B, then compute the bit onto the control register using theprocedure shown in Figure 5 (without the measurement). The control bits are all previous bits computed using Step 3 b and the single qubit adjustment is ∑^^2^ / 2^where the sum is taken over all ^^which have been processed in Step 3 a up to this point of the computation. 4. Return the control register to its original state (uncompute) by reversing all thesingle bit computations from Step 3 b. This method enables more general projections than those described in Figure 7. In particular, taking I = [0, 1,…,25] and O = [10,11,14,15], the above process would allow us to perform this separation with 4 loops of Step 3, computing bits 0 and 2 to the control register, measuring bits 1 and 3 and ignoring bit 4. The advantages on resource savings can be seen mostly in Step 3 a. The ability to skip certain projections (if they do not reduce the size of I) and to finish early (if I has already been reduced to the target set O) will save on projections and reverse computations. In the given example we perform the projection with 2 single-bit computations, 2 single-bit projections and 2 single-bit reverse computations. The equivalent projection performed as two applications of the projection in Figure 7 would require 4 single- bit computations, 2 single-bit projections and 4 single-bit reverse computations.6. Detecting errors on NISQ quantum devicesA recognised limitation of NISQ quantum computing devices is the rate at which errors occur when performing entangling (2-qubit) operations on the qubits. We refer to thisin this section as two-qubit gate error and it is given as a proportion of two-qubit operationswhich are expected to produce an error. On some ion-trap devices, two-qubit gate error wasin the range 10^^ to 10^^. These errors (when undetected) reduce the quality of the output(the signal produced) from any computation on the quantum device. It is thus advantageousto detect errors where possible and to use this capability to counteract the effect of error onthe output by repeating and / or restarting operations or reweighting output data. Ourprocedure configured such that there is an advantageous opportunity to detect errors incertain computations. As mentioned above (in page 19, line 9), there are situations whererounds of the of the Hamming weight projection can be removed when we know that the quantum state being processed is contained in a restricted Hamming weight subspace of the full Hilbert space on n-qubits. Instead of omitting these rounds to save resources, we have the option to include them and use their output for error detection in noisy devices. This would work as follows, for any Hamming weight projection from one restricted Hamming weight space to another if a simple “bit flip error” (a |0> state becomes a |1> state on somequbit in the device) has occurred at some point in the computation, this error can bedetected by the Hamming weight shifting by one (similarly compounding bit flip errors can result in larger shifts). Where such a shift would be detected by measuring an additional bitof the Hamming weight, we can include the corresponding round and use its output solely forerror detection. As these rounds are not necessary for the computation but only for error detection, they can be included or excluded by a classical control system according to theirrunning cost and the expected noise of the quantum device. For example, given acharacterisation of the expected gate error of the device, it is possible to compute the probability that performing one such error-detection round of the Hamming weight projection introduces a new error (call this ^^^^ ^^^) depending on the computation performed up to this point it may also be possible to compute the probability that an error has occurred which is detectable by this round of Hamming weight projection (call this ^^^^ ^^^). Then the classical control could be programmed with a logic that decides when to perform the additional error detection rounds. A simple example of this logic may be to perform such a round when it is more likely that such a round detects an error than introduces one (^^^^ ^^^<(1 − ^^^^ ^^^) × ^^^^ ^^^). In procedures where a single round of Hamming weight projectionuses a small percentage of the total number of two qubit gates (e.g. in TDA application) this condition is frequently satisfied. This logic can also be made probabilistic rather than deterministic which will mitigate the risk of such error detection introducing bias in the data (e.g. by focusing only on detecting a single type of error). In conclusion, various implementations and examples have been disclosed herein. It will be appreciated that these implementations and examples are not intended to be exhaustive, and the skilled person will be aware of many potential variations and modifications of these implementations and examples that fall within the scope of the present disclosure. It will also be understood that features of particular implementations and examples can typically be incorporated into other implementations and examples (unless the context clearly indicates to the contrary). In summary, the various implementations and examples herein are disclosed by way of illustration rather than limitation, and the scope of the present invention is defined in the appended claims.
Claims
Claims1. A method for using a quantum computer system comprising a first register and asecond register to separate a quantum state into multiple subspaces of a 2n dimensionalHilbert space, the method comprising: defining a quantum state comprising 2nelements on the first register, the first registercomprising n qubits;defining a quantum state on the second register, the second register comprising one or more qubits; receiving a value k, where k is a binary integer such that 0 =< k =< n;performing a bit-wise iteration process comprising: (i) performing a quantumentanglement between the first and second registers to separate the quantum state on the first register into distinct subspaces of the Hilbert space which are indexed by the entangledvalues on the second register, and (ii) measuring an outcome on the second register to finda match with a portion of k, wherein said portion of k increases incrementally with theiteration process until the match is with all of k,whereby the bit-wise iteration is used to separate the quantum state on the first register into distinct subspaces of the Hilbert space, wherein elements of the distinct subspaces have different Hamming weights and exactly one of the subspaces contains only elements of Hamming weight k.
2. The method of claim 1, further comprising using the quantum computer system toperform projections from the 2n dimensional Hilbert Space on n qubits, Hn, to the spacespanned by computational basis states having Hamming weight k, Wk.
3. The method of claim 2, further comprising utilising a modular measurement-basedprocedure to perform the projections by breaking up the full projection ^^: ℋ^ →into a series of smaller projections.
4. The method of claim 3, wherein the full projection ^^: ℋ^ → ^^ is determined bygenerating (i) an initial projection ^^^which projects from Hn to the space spanned bycomputational basis states whose Hamming weight has the same first bit as ^, (ii) asequence of relative projectionsfor the mth bit of k for m = 2 to n, which projectsfrom Hn to the space spanned by computational basis states whose Hamming weight hasthe same mth bit as k, given that the Hamming weights agree with k for the first m-1 bits.
5. The method of claim 4, further comprising assembling the initial projection ^^^and thesequence of relative projections to form the full projection, ^^.
6. The method of claim 4 or 5, further comprising, for the initial projection, the steps of:a Step 1 of preparing on the second register a Greenberger–Horne–Zeilinger (GHZ)state, namelyaStep 2 of applying, for each qubit in the first register, a controlled ^-rotation gateproviding a fixed angle ^ to the second register controlled by that qubit;a Step 3 of applying a z-rotation of −^^ to any of the qubits of the second register;a Step 4 of applying the inverse of the GHZ state preparation circuit to the secondregister; aStep 5 of measuring the first qubit in the computational basis, wherein theprojection succeeds if the outcome of the measurement is|0^.
7. The method of claim 6, further comprising at least one of:applying at Step 1 a Hadamard followed by a “fan-out” circuit which may beperformed in log depth;applying at Step 2 a rotation of ^ =^to any qubit of the second register; and / orcycling at Step 2 through the auxiliary qubits in turn as the controlled rotations areapplied to minimise gate depth.
8. The method of any of claims 4 to 7, wherein the output of a successful relativeprojection performed on an input state is in the space spanned by all computational basisstates whose Hamming weights agree with k on the m+1th bit, wherein the input state mustbe in the space spanned by all computational basis states whose Hamming weights agreewith k on every bit up to the m th bit.
9. The method of any of claims 6 to 8, wherein generating the relative projections^^^,^ includes applying the same process^ ^^ as for the initial projection but with ^ =for Step 2.
10. The method of claim 9, further comprising the use of a parallel version for ^ =^ ^^inwhich all rotations are performed in depth [n / t] with any whole number t of bits in the secondregister, where (1 ≤ t ≤ n).
11. The method of claim 10, wherein the parallel version is implemented for ^ =^withall rotations being performed in depth 2 using n / 2 auxiliary qubits.
12. The method of any of claims 3 to 11, wherein the full projection is implemented as aproduct of successive projections by successively applying the single bit projections:wherein the full projection ^^succeeds if and only if each of the constituent projections succeeds.
13. The method of claim 12, wherein the method is configured to detect failure of theprojection at multiple points in the running of the quantum circuit leading to a shorter circuit on average.
14. The method of claim 13, further comprising responding to a detected failure of theprojection by resetting the quantum computing system to restart the method from the beginning.
15. The method of any preceding claim, wherein intermediate information generatedwhile performing the bit-wise iteration process is stored in the phase of the second registerand not in the bits of the second register.
16. The method of any preceding claim, wherein the method is configured to project ontothe space spanned by states whose Hamming weight agrees with k on the ^ th bit alonewithout any assumption on the other bits.
17. The method of any preceding claim, wherein the method is adopted to:(i) prepare a desired quantum state for use in a later quantum computation, wherebyrepetition is performed until the desired quantum state has been successfully achieved; and / or(ii) determine what fraction of an input state satisfies conditions for projections tosucceed by repeated running of a circuit for the projections and counting the successes andfailures until enough samples have been achieved to allow the fraction to be determined.
18. The method of any preceding claim, wherein a single bit projection quantum circuit iscontrolled to perform further projections based on the Hamming weight of an ^-qubit state, such as by using single bit projection modules without measurement to prepare additional auxiliary qubits which store some bits of the Hamming weight.
19. The method of any preceding claim, wherein the second register comprises 1 or 2qubits.
20. The method of any preceding claim, further comprising omitting one or more roundsof measurement during the iterative process, thereby allowing a measurement to be madewhich is targeted at only certain bits of the Hamming weight.
21. The method of any preceding claim, the method including:defining a quantum state comprising 2n elements on the first register of the quantumcircuit, the first register comprising n qubits;defining a quantum state on the second register of the quantum circuit, the secondregister comprising one or more qubits; receiving a value k, where k is a binary integer such that 0 =< k =< n;performing a bit-wise iteration, starting at i =1 corresponding to a least significant bitof k, wherein each iteration comprises: (a) performing a quantum entanglement between the quantum state of the first register and the quantum state of the second register, wherein performing the quantum entanglement includes making a projection of the n qubit state to asubspace U which contains the k Hamming weight subspace;(b) deriving a bit from the quantum entanglement by making a measurementof the second register to realise the projection; (c) determining whether or not the derived bit is equal to the i th bit of k;(d) if the derived bit is not equal to the i th bit of k, terminating the method asfailing; and(e) if the derived bit is equal to the i th bit of k, incrementing i by one andperforming the next iteration, wherein the subspace U converges to the k Hammingweight over the course of the iterations;and terminating the bit-wise iteration as a success if the derived bit for i = [log (n+1)]is equal to the most significant bit of k, indicative of the system determining a quantum statehaving a Hamming weight of k.
22. A method of using a quantum computer system having a first register providing nqubits and a second register, the method performing a projection from a 2n dimensionalHilbert Space on n qubits by:a step of preparing on the second register a Greenberger–Horne–Zeilinger (GHZ)state, namelyastep of applying, for each qubit in the first register, a controlled ^-rotation gate tothe second register controlled by that qubit;a step of applying a rotation of ^ = −^^ to any of the qubits of the second register;a step of applying the inverse of the GHZ state preparation circuit to the secondregister; anda step of measuring the first qubit in the computational basis, wherein the projectionsucceeds if the outcome of the measurement is|0^.
23. The method of any preceding claim wherein:the measuring of an outcome on the second register is used to detect an error; if an error is detected, terminating the method as failing and restarting the method from the beginning.
24. The method of claim 23, wherein the measurement comprises measuring an additional bit of the Hamming weight to detect a bit flip error.
25. The method of claim 23 further comprising using a classical computer system to determine whether to perform an error-detection scheme based on a running cost of the iterative process and / or an expected noise of the quantum computer system.
26. A quantum computing system configured to perform the method of any precedingclaim.
27. A method for using a quantum computer system comprising a first register and asecond register to separate a quantum state into multiple subspaces of a 2n dimensionalHilbert space, the method comprising:defining a quantum state comprising 2nelements on the first register, the first registercomprising n qubits;defining a quantum state on the second register, the second register comprising one or more qubits; receiving a set O of values k, where each k is a binary integer such that 0 =< k =< n;produce a set B, whose elements correspond to bit indices ^^for which each element of O agrees on the value at bit index ^^. performing a bit-wise iteration process comprising: (i) performing a quantum entanglement between the first and second registers to separate the quantum state on the first register into distinct subspaces of the Hilbert space which are indexed by the entangled values on the second register, and (ii) measuring an outcome on the second register to find a match with a portion of the bit indices in set B, wherein said portion of bit indices in set B increases incrementally with the iteration process until the match is with all bit indices in set B, whereby the bit-wise iteration is used to separate the quantum state on the first register into distinct subspaces of the Hilbert space, wherein elements of the distinct subspaces have different Hamming weights and exactly one of the subspaces contains only elements whose values agree with all bit indices in set B.