For coprime integers , the multiplicative order is the smallest positive exponent
It exists because multiplication by is an element of the finite group of units modulo an integer. For the example, the successive residues are
None of the first three is one, so the order is four.
The factor extraction from an even modular order uses the factorization . If the multiplicative order is even, put . Minimality of the multiplicative order excludes ; we also require . Thus is a nontrivial square root of one. Neither nor is divisible by all of . If either were coprime to , its inverse modulo , applied to , would make the other divisible by , a contradiction. Hence the greatest common divisors
are proper nontrivial factors. For odd , and have no common prime divisor of , so these two divisors are complementary. If the initial is not coprime to , a proper already supplies a factor without quantum order finding.
For and , and , which is neither nor . The factors are
The necessary conditions for this order-based reduction are a unit , even true multiplicative order, and .
Let . In the Shor algorithm, first use classical arithmetic to deal with even and perfect powers, and to reject prime inputs. Perfect-power recognition and primality testing have polynomial-time classical algorithms. Factoring a perfect power , with , already gives a nontrivial factor . We may therefore consider an odd composite with at least two distinct prime factors.
Choose uniformly from and compute its greatest common divisor with using the Euclidean algorithm. A proper nontrivial divisor ends the computation. Otherwise is a unit, and the remaining task is quantum order finding. Set
Prepare a uniform quantum superposition in a -qubit register and use quantum modular exponentiation in a second register to obtain
Repeated squaring and reversible modular multiplication implement this step with polynomially many quantum gates in . Apply the inverse quantum Fourier transform to the first register and perform a quantum measurement in the computational basis, obtaining . Measuring the second register first, and Fourier-transforming the resulting periodic coset, gives the same distribution of .
Here is a quantitative quantum Fourier sampling bound for order finding. If , multiplication by cycles its orbit states. The Fourier eigenstates of that cycle have eigenvalues , and the initial state has squared overlap with each, for . Therefore
Conditioned on a particular eigenphase , its nearest integer outcome obeys and has probability at least . Indeed the absolute amplitude is , where . For , the numerator is at least and the denominator at most ; the limiting value at is one.
If , the fraction is reduced, and gives
Use continued-fraction recovery in quantum order finding. The relevant approximation theorem says that reduced fractions satisfying are continued fraction convergents of . For an input rational of digits, their candidates can be enumerated classically in time, and their denominators are at most the reduced input denominator. This is the supplied continued-fraction result; discard candidate denominators exceeding . A zero measurement is treated as a failed order-finding sample.
For each remaining even candidate denominator , compute by repeated squaring, and try and . Return only a divisor with ; otherwise repeat the quantum sample or choose another . This candidate-denominator gcd post-processing cannot return an incorrect factor, since its output is checked directly. When the recovered denominator is the true even multiplicative order and the square root of one is nontrivial, part (i) guarantees success. Checking before trying the gcds is also a valid, more restrictive convention; the single-run distinction matters in part (iii).
Two further standard quantitative facts explain why repetitions remain efficient. First, for a uniformly chosen unit modulo an odd integer with at least two distinct prime divisors, the probability of a useful unit in Shor factorization is at least : its true multiplicative order is even and . To see the source of this bound, the Chinese remainder theorem for unit groups makes the prime-power components independent. Each odd-prime-power unit group is cyclic. If its 2-primary order is , the probability of the largest possible value of is , and the probability of any specified smaller value is at most . Failure requires all components to have the same : either all zero, making odd, or all the same positive value, making the halfway power in every component. Conditioning on one component, the chance another component matches it is at most , so total failure is at most .
Second, the fraction of phase numerators coprime to is , where is the Euler totient function. The elementary totient-ratio lower bound suffices: if the distinct prime divisors are , then and . The totient product formula therefore gives
Thus for a good , the probability of sampling a coprime phase numerator with the required accuracy is at least . This is inverse-polynomial in the input length, so polynomially many repetitions achieve any fixed success probability. The quantum Fourier transform uses elementary rotations and Hadamard gates in the ideal gate description, and the other quantum and classical stages are polynomial in .
The reduction is therefore polynomial in the bit length:
A small denominator need not itself be the true multiplicative order; verification of the final factor is essential, and no guarantee is claimed for every individual sample.
Here the true multiplicative order is four, and it divides every power-of-two Fourier-register size , including the choice from part (ii). A second-register measurement produces one of the four periodic cosets
Its quantum Fourier transform has nonzero amplitudes only at , and each has squared modulus . The inverse transform only changes phases or permutes these four labels. Hence the measured ratios are equally likely.
For or , continued-fraction recovery in quantum order finding returns denominator four. Part (i) then gives factors three and five. For , the reduced denominator is two. Although two is not a period, the candidate-denominator gcd post-processing in part (ii) still gives a factor:
The zero outcome produces no useful even candidate and the run fails. For the factor-extraction procedure specified above, three of the four outcomes succeed:
There is an important convention behind this answer. A version that rejects a candidate unless before attempting any gcd rejects , since . Under that validated-period convention only the two odd-numerator phases succeed, giving
Thus the probability of recovering the true multiplicative order is , whereas the probability of finding a factor with direct gcd post-processing is . The printed question does not specify this classical post-processing detail; stating it avoids identifying these two different events.
Take to be normalized and let be the orthogonal projection onto the good subspace. The two reflection operators are
The first fixes the hyperplane orthogonal to and negates its normal direction. The second fixes and negates . Both are Hermitian operators and unitary operators, since their defining projectors square to themselves. For a non-normalized nonzero vector, divide by .
Put , with , and define normalized orthogonal good and bad vectors
Then . The amplitude amplification theorem states that the iterate satisfies, for every nonnegative integer ,
To prove it, the span of is invariant under both reflection operators. In that ordered orthonormal basis,
Multiplying the second matrix into advances the angle by . Induction proves the formula, and projecting onto gives . The minus sign in is just a global phase choice, but it makes the displayed state formula exact.
If is known, choose nearest to , with . The final angle is within of , so . For , this is at least after iterations, and is close to one when is small. For , measuring the initial state already has success above . Repeated independent attempts with a success test give any fixed desired success probability. This is the quadratic improvement of amplitude amplification over repeated sampling, which takes attempts. At there is no good component to amplify, and at the initial state is already entirely good; these endpoint cases do not require the undefined normalized component vectors.
Prepare an ancillary qubit in
It can be prepared from by an operation followed by a Hadamard gate, independently of . One call to the Boolean quantum oracle then gives quantum phase kickback:
The data state receives a minus sign precisely on the basis vectors spanning , while the ancilla remains unchanged and unentangled. One oracle call realizes the reflection. By linearity it is the marked-state phase oracle
with one oracle call. The ancillary preparation and its optional inverse use only fixed operations, so no additional knowledge of is needed.
Follow the printed examples by counting positive squares, so zero is not marked. For , the marked output set is
A one-to-one map from the finite set to itself is a permutation, so exactly inputs have outputs in . In the uniform quantum superposition , the initial good probability is therefore . For permutation-preimage quantum search, this known marked density under a permutation is .
Define the efficiently computable predicate to be one if and only if is a positive square. The assumed Boolean quantum oracle for , acting on and a ancilla, implements its diagonal sign operation . Compute the modular-addition quantum oracle into a zero output register, apply this sign operation, and uncompute:
This implements for , with the work registers clean. Only forward calls to were promised, but its inverse costs one such call: if on the second register, then
Indeed the output addition is changed into subtraction. Thus each marked reflection costs exactly two queries to ; all other operations used here are independent of the unknown .
Use the amplitude amplification theorem with , whose reflection is allowed by the assumptions. With , choose nearest to . Here for every , so a trial succeeds with probability at least . Also
Measure and use one additional query to evaluate and check . On failure, restart with fresh registers. Four independent trials have failure probability at most , so the required confidence and query bound are
This is an upper bound on quantum query complexity, not a claim that arbitrary reflections or every classical gate have constant cost. Including zero as a square would change to without changing the asymptotic bound. With the printed positive-square interpretation, has no valid output and no algorithm can satisfy the success requirement; the intended asymptotic task necessarily has .
Store a tensor-product element of the Pauli group as
The phases of the original single-qubit factors can all be accumulated into . This binary phase representation of a Pauli string uses bits. It retains phases, which must not be dropped when computing probabilities later.
For the conjugation convention in the question, direct multiplication of the two-by-two matrices gives
and
These backward Pauli updates for Hadamard and phase gates use , not . On the affected line , the updates are
All phases are reduced modulo four and the updates use the old bits.
For a Controlled-Z gate on lines , its diagonal action gives
For the controlled-Z update in the binary phase representation, conjugation respects products, so these determine the rule for every Pauli operator on those lines. In the chosen ordered convention it is
The phase arises when a newly introduced is moved past . For instance becomes , so this sign matters.
The untouched factors are unchanged. Each Clifford operation therefore needs only a fixed number of local bit updates; reconstructing the requested full list takes time. Put the final phase into the first factor, which is permitted because the single-qubit Pauli group includes all multiples by . The classical cost is polynomial, despite the exponentially large matrix of the operation on the full state space.
The computational-basis projectors on the first qubit are
The Pauli Z gate acts as on the first subspace and on the second, so . By the Born rule, . Therefore the expectation determines the output probabilities:
The normalization supplies ; no product-state assumption is needed for this identity.
Write . Instead of storing the output vector, use Heisenberg propagation of a Pauli observable through a Clifford circuit:
Initialize the compact Pauli group representation at and conjugate successively by , in that order, using . This gives
with local-update work and storage. The resulting Pauli operator is Hermitian, so we can express it as , where and each is or . Any factors in the representation from part (i) are converted using , with their phases absorbed into .
The product state input now makes the expectation factorize:
Each factor is a two-by-two matrix calculation. More explicitly, for , the three nontrivial expectations are , , and for , respectively.
Thus this single-output process has a strong classical simulation in polynomial time, even when the individual input states are not stabilizer states. As usual, the given state identities must provide efficiently computable amplitudes. With finite-precision inputs, each factor can be evaluated to error and its approximation clipped to to obtain the final expectation to error at most , because all factors lie in . The required extra precision is only bits. Exact evaluation applies when the input descriptions support exact arithmetic. This avoids silently assigning a finite exact-computation cost to arbitrary unspecified real numbers.
Once the probabilities are known, a classical randomized computation can reproduce this measured bit. The argument concerns the specified one-qubit output; it does not assert that every joint measurement distribution for arbitrary product inputs can be simulated by this same single-observable calculation.
Use GHZ preparation with Hadamard and controlled-Z gates for . Apply a Hadamard gate to the first qubit, then a controlled-NOT gate from that qubit to each of the other qubits. Every controlled-NOT can be written in the allowed gate set as
Indeed conjugating the target by makes the controlled phase into a controlled . The rightmost gate acts first. Consequently the Clifford circuit uses allowed gates and gives
For every chosen qubit , tracing out the other qubits yields . Equivalently, across that qubit versus the rest, the displayed state is a Schmidt decomposition with two nonzero coefficients . It is therefore entangled across every such bipartition.
Entanglement does not prevent the polynomial single-output simulation from part (iii). The simulation follows the measured observable rather than claiming that the intermediate states remain product states. When , there is no remaining subsystem and the requested entanglement is impossible; the construction and claim require .
The spectral norm is the induced Euclidean operator norm:
It is the largest singular value. From the definition, multiplying on either side by a unitary operator leaves the norm unchanged: right multiplication permutes the unit sphere of possible inputs, and left multiplication preserves output lengths. In particular every unitary operator has norm one.
For unitary product telescoping, replace the factors one at a time. With empty products interpreted as the identity,
All cross terms cancel. By the triangle inequality and unitary invariance of the spectral norm,
This bound is independent of the dimension and does not assume that any of the factors commute.
For first-order two-local Hamiltonian simulation, regard each term as a Hermitian operator, as is standard for a local-Hamiltonian decomposition. The Lie-Trotter product formula for bounded operators states
in operator norm; the reversed factor ordering is just as valid as the displayed one. Take and use the circuit
Each factor is a unitary operator on at most two qubits and hence is one allowed two-qubit gate, with a spectator identity for a one-qubit term. The factors in the rightmost part of each written product act first. Merely quoting the limit would not establish the requested rate, so we give a quantitative error bound.
For two Hermitian operators and , differentiating
gives . The commutator identity obtained by differentiating implies . Since the surrounding factors are unitary, integration yields the first-order unitary product-formula error bound
Splitting the terms successively and using the triangle inequality therefore gives the one-step estimate
for . Here submultiplicativity of the operator norm gives . The ordering chosen for the products changes the sign of local commutators, not this norm bound. Applying part (i) to the steps gives
Choose . For the error is strictly below ; is exact already with . The quantum circuit contains two-qubit gates. A sufficient gate count is
Thus the worst-case polynomial degree in this first-order bound is six. Terms with disjoint supports commute and may improve the count in particular decompositions, but the stated assumptions alone suffice for this bound, without a further sparsity or bounded-degree condition. The requested gate model allows arbitrary two-qubit unitaries, so no additional compilation error is incurred here.

Articles by others on the same topic (0)

There are currently no matching articles.