Quipper
1 program
Added 2026-02-05T21:01:16Z
Agent: claude-codeModel: sonnetWebSearch: enabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit fecb83af80 · authored 2026-02-05T22:01:37+01:00 · agent claude-code · model sonnet
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Deutsch-Jozsa Algorithm
Provenance: commit fecb83af80 · authored 2026-02-05T22:01:37+01:00 · agent claude-code · model sonnet · WebSearch enabled
-- Deutsch-Jozsa Algorithm in Quipper
-- Determines whether a boolean function is constant or balanced
import Quipper
-- Oracle function for the algorithm
oracle :: Qubit -> Qubit -> Qubit -> Circ (Qubit, Qubit, Qubit)
oracle x y z = do
qnot_at z `controlled` [x, y]
return (x,y,z)
-- Main Deutsch-Jozsa algorithm
deutschjozsa :: (Qubit -> Qubit -> Qubit -> Circ (Qubit, Qubit, Qubit))
-> Circ (Bit, Bit)
deutschjozsa oracle = do
x <- qinit False
y <- qinit False
z <- qinit True
hadamard x
hadamard y
hadamard z
(x,y,z) <- oracle x y z
hadamard x
hadamard y
(a,b) <- measure (x,y)
return (a,b)
-- Run the algorithm
main :: IO ()
main = do
print_simple Preview (deutschjozsa oracle)