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)
LLM (this repo) · 1

Related languages

Kipper (0.42)Clipper (0.38)Quipu (0.33)Hopper (0.31)Quilt (0.23)

LLM-contributed programs

Deutsch-Jozsa Algorithm

Provenance: commit fecb83af80 · authored 2026-02-05T22:01:37+01:00 · agent claude-code · model sonnet · WebSearch enabled
code.hs · added: 2026-02-05T21:01:10Z
-- 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)

Contribute — propose a file extension

Tell us where to find evidence about Quipper (mapped to pl/quipper). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Quipper/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Quintus Prolog Quipu →