builtinsΒΆ

Reexports core types and functions that are available without an explicit import.

Classes

array(*args)

Sequence of homogeneous values with statically known fixed length.

bool()

Booleans representing truth values.

float()

An IEEE754 double-precision floating point value.

Function

alias of Callable

frozenarray()

An immutable array of fixed static size.

int()

A 64-bit signed integer.

list()

Mutable sequence items with homogeneous types.

Measurement()

Represents the result of a lazy measurement which needs to be explicitly read before being used.

nat()

A 64-bit unsigned integer.

Option()

Represents an optional value.

qubit()

str()

A string, i.e. immutable sequences of Unicode code points.

Unitary()

Controllable()

Daggerable()

Functions

abs(x)

callable(x)

control(*args, **kwargs)

Dummy function to support with control(...): blocks in Guppy code.

dagger(*args, **kwargs)

Dummy function to support with dagger(...): blocks in Guppy code.

divmod(x, y)

exit(msg[, signal])

Exit, reporting the given message (and signal if given), and immediately exit the program.

len(x)

nothing()

Constructs a nothing optional value.

output(tag, value)

Report an output with the given tag and value.

panic(msg[, signal])

Panic, throwing an error with the given message (and signal if given), and immediately exit the program, aborting any subsequent shots.

pow(x, y)

power(*args, **kwargs)

Dummy function to support with power(...): blocks in Guppy code.

range(start[, stop, step])

An iterator that yields a sequence of integers.

result(tag, value)

Report an output with the given tag and value.

round(x)

some(value)

Constructs a some optional value.