qit.gate

Quantum gates

This module implements many common types of quantum gates (and some other useful linear maps). The returned gates are represented as Lmap instances. The data type is float unless complex entries are actually needed.

Utilities

single(L, t, d_in)

Single-qudit operator.

two(B, t, d_in)

Two-qudit operator.

controlled(U[, ctrl, dim])

Controlled gate.

dist(A, B)

Distance between two unitary Lmaps.

Unitary gates

id(dim)

Identity gate.

phase(theta[, dim])

Diagonal phase shift gate.

qft(*args)

Quantum Fourier transform gate.

walsh(n)

Walsh-Hadamard gate.

mod_inc(x, dim[, N])

Modular incrementation gate.

mod_mul(x, dim[, N])

Modular multiplication gate.

mod_add(dim1, dim2[, N])

Modular adder gate.

swap(d1, d2)

Swap gate.

Linear maps

copydot(n_in, n_out[, d])

Copy dot.

plusdot(n_in, n_out[, d])

Plus dot.

epsilon(n)

Epsilon tensor.

Functions

controlled(U[, ctrl, dim])

Controlled gate.

copydot(n_in, n_out[, d])

Copy dot.

dist(A, B)

Distance between two unitary Lmaps.

epsilon(n)

Epsilon tensor.

id(dim)

Identity gate.

mod_add(dim1, dim2[, N])

Modular adder gate.

mod_inc(x, dim[, N])

Modular incrementation gate.

mod_mul(x, dim[, N])

Modular multiplication gate.

phase(theta[, dim])

Diagonal phase shift gate.

plusdot(n_in, n_out[, d])

Plus dot.

single(L, t, d_in)

Single-qudit operator.

swap(d1, d2)

Swap gate.

two(B, t, d_in)

Two-qudit operator.

walsh(n)

Walsh-Hadamard gate.