quantumΒΆ

Guppy standard module for quantum operations.

Classes

qubit()

Functions

ch(control, target)

Controlled-H gate command.

crz(control, target, angle)

Controlled-Rz gate command.

cx(control, target)

Controlled-X gate command.

cy(control, target)

Controlled-Y gate command.

cz(control, target)

Controlled-Z gate command.

discard(q)

Discard a single qubit.

discard_array(qubits)

Discard an array of qubits.

h(q)

Hadamard gate command

maybe_qubit()

Try to allocate a qubit, returning some(qubit) if allocation succeeds or nothing if it fails.

measure(q)

Measure a single qubit destructively.

measure_array(qubits)

Measure an array of qubits, returning an array of bools.

project_z(q)

Project a single qubit into the Z-basis (a non-destructive measurement).

reset(q)

Reset a single qubit to the \(|0 angle\) state.

rx(q, angle)

Rx gate.

ry(q, angle)

Ry gate.

rz(q, angle)

Rz gate.

s(q)

S gate.

sdg(q)

Sdg gate.

t(q)

T gate.

tdg(q)

Tdg gate.

toffoli(control1, control2, target)

A Toffoli gate command.

v(q)

V gate.

vdg(q)

Vdg gate.

x(q)

X gate.

y(q)

Y gate.

z(q)

Z gate.

functional

Guppy standard module for functional quantum operations.