Quipper

The Circ monad

data Circ a

Basic types

data Qubit

data Bit

type Qulist

type Bitlist

Basic gates

type Timestep

Reversible gates in functional style

qnot

hadamard

gate_H

gate_X

gate_Y

gate_Z

gate_S

gate_S_inv

gate_T

gate_T_inv

gate_E

gate_E_inv

gate_omega

gate_V

gate_V_inv

expZt

rGate

gate_W

gate_iX

gate_iX_inv

global_phase

global_phase_anchored

qmultinot

cnot

swap

Reversible gates in imperative style

qnot_at

hadamard_at

gate_H_at

gate_X_at

gate_Y_at

gate_Z_at

gate_S_at

gate_S_inv_at

gate_T_at

gate_T_inv_at

gate_E_at

gate_E_inv_at

gate_omega_at

gate_V_at

gate_V_inv_at

expZt_at

rGate_at

gate_W_at

gate_iX_at

gate_iX_inv_at

qmultinot_at

cnot_at

swap_at

Gates for state preparation and termination

qinit

qterm

qdiscard

cinit

cterm

cdiscard

qc_init

qc_init_with_shape

qc_term

qc_discard

measure

prepare

qc_measure

qc_prepare

Gates for classical circuits

cgate_xor

cgate_eq

cgate_not

cgate_and

cgate_or

cgate_if

circ_if

User-defined gates

named_gate

named_gate_at

named_rotation

named_rotation_at

extended_named_gate

extended_named_gate_at

Dynamic lifting

dynamic_lift

Other circuit-building functions

qinit_plusminus

qinit_of_char

qinit_of_string

map_hadamard

map_hadamard_at

controlled_not

controlled_not_at

bool_controlled_not

bool_controlled_not_at

qc_copy

qc_uncopy

qc_copy_fun

qc_uncopy_fun

mapUnary

mapBinary

mapBinary_c

qc_mapBinary

Notation for controls

class ControlSource a

data ControlList

(.&&.)

(.==.)

(./=.)

controlled

Signed items

data Signed a

from_signed

get_sign

Comments and labelling

comment

label

comment_with_label

without_comments

class Labelable a s

Hierarchical circuits

box

nbox

box_loopM

loopM_boxed_if

Block structure

Ancillas

with_ancilla

with_ancilla_list

with_ancilla_init

Automatic uncomputing

with_computed_fun

with_computed

with_basis_change

Controls

with_controls

with_classical_control

without_controls

without_controls_if

Loops

for

endfor

foreach

loop

loop_with_index

loopM

loop_with_indexM

Operations on circuits

Reversing

reverse_generic

reverse_simple

reverse_generic_endo

reverse_generic_imp

reverse_generic_curried

reverse_simple_curried

reverse_endo_if

reverse_imp_if

Printing

data Format

data FormatStyle

format_enum

print_unary

print_generic

print_simple

print_of_document

print_of_document_custom

Classical circuits

classical_to_cnot

classical_to_quantum

Ancilla uncomputation

classical_to_reversible

Circuit transformers

User-definable transformers

type Transformer m a b

data T_Gate m a b x

Pre-defined transformers

identity_transformer

An example transformer

Applying transformers to circuits

transform_generic

transform_generic_shape

Auxiliary type definitions

type InverseFlag

type NoControlFlag

data B_Endpoint a b

type Endpoint

type Ctrls a b

Automatic circuit generation from classical code

Extended quantum data types

Homogeneous quantum data types

class QShape ba qa ca

class QData qa

class CData ca

class BData ba

Heterogeneous quantum data types

class QCData qc

class QCDataPlus qc

Shape-related operations

bit

qubit

qshape

qc_false

Quantum type classes

class QEq qc

class QOrd qa

q_lt

q_gt

q_le

q_ge