Researchers have devised a penny-sized silicon chip that uses photons to run Shor's algorithm - a well-known quantum approach - to solve a maths problem.
The algorithm computes the two numbers that multiply together to form a given figure, and has until now required laboratory-sized optical computers.
This kind of factoring is the basis for a wide variety of encryption schemes.
The work, reported in Science, is rudimentary but could easily be scaled up to handle more complex computing.
Shor's algorithm and the factoring of large numbers has been a particular case used to illustrate the power of quantum computing.
Quantum computers exploit the counterintuitive fact that photons or trapped atoms can exist in multiple states or "superpositions" at the same time.
For certain types of calculations, that "quantum indeterminacy" gives quantum computers a significant edge.
While traditional or "classical" computers find factoring large numbers impracticably time-consuming, for example, quantum computers can in principle crack the problem with ease.
That has important implications for encryption methods based on factoring, such as the "RSA" method that is used to make transactions on the internet more secure.
Optical computing has been touted as a potential future for information processing, by using packets of light instead of electrons as the information carrier.
But these packets, called photons, are also endowed with the indeterminate properties that make them quantum objects - so an optical computer can also be a quantum computer.
In fact just this kind of photon-based quantum factoring has been accomplished before, but the ability to put the heart of the machine on a standard chip is promising for future applications of the idea.
"The way people used to make this kind of circuit consumed square metres of laboratory space and took graduate students many months to align," said Jeremy O'Brien, the University of Bristol researcher who led the work.
"Doubling the complexity of the circuit often times turns it from being a difficult task to a practically impossible one, whereas for us to double the complexity it's really straightforward," he told BBC News.
The Bristol team's approach makes use of waveguides - channels etched into the chips that provide a path for the photons around the chips like the minuscule wires in conventional electronics.
While Professor O'Brien said he is confident that such waveguides are the logical choice for future optical quantum computers, he added that there is still a significant amount of work to do before they make it out of the laboratory.
The prototype version, finds the factors of 15 - three and five - a task that the team concedes could be easily accomplished by a child.
"To get a useful computer it needs to be probably a million times more complex, so a full-scale useful factoring machine is still at least two decades away," he said.
"But this is one important step in that direction."