Semiprime 2026-10-06
A semiprime is a composite number that is a product of exactly two prime numbers, counted with multiplicity. For example, and are semiprimes. Distinct factors give for the Euler totient function, whereas equal factors give . This distinction matters when constructing a uniform coprime state for a semiprime.
For a semiprime with distinct known primes, this quantum state is uniform over the reduced residue classes. With binary digits in , its fraction among all computational labels is . An ancilla qubit whose one probability is dilutes the joint good probability to exactly . A reversible range-and-greatest common divisor predicate marks the good labels with ancilla qubit one, and a single exact amplitude amplification iteration produces . Known prime factors provide the cardinality; the membership test itself needs only . Polynomial gate complexity presumes ideal one-qubit rotations at the specified amplitudes.