quantum.gates#

Gates in a discopy.quantum.circuit.Circuit.

discopy.quantum.gates.QuantumGate(name, n_qubits)

Quantum gates, i.e. unitaries on n qubits.

discopy.quantum.gates.ClassicalGate(name, ...)

Classical gates, i.e. from digits to digits.

discopy.quantum.gates.Copy()

Takes a bit, returns two copies of it.

discopy.quantum.gates.Match()

Takes two bits in, returns them if they are equal.

discopy.quantum.gates.Digits(*digits[, dim, ...])

Classical state for a given string of digits of a given dimension.

discopy.quantum.gates.Bits(*bitstring[, _dagger])

Implements bit preparation for a given bitstring.

discopy.quantum.gates.Ket(*bitstring)

Implements qubit preparation for a given bitstring.

discopy.quantum.gates.Bra(*bitstring)

Implements qubit post-selection for a given bitstring.

discopy.quantum.gates.Parametrized(name, ...)

Abstract class for parametrized boxes in a quantum circuit.

discopy.quantum.gates.Rotation(phase[, ...])

Abstract class for rotation gates.

discopy.quantum.gates.Rx(phase)

X rotations.

discopy.quantum.gates.Rz(phase)

Z rotations.

discopy.quantum.gates.CU1(phase)

Controlled Z rotations.

discopy.quantum.gates.CRz(phase)

Controlled Z rotations.

discopy.quantum.gates.CRx(phase)

Controlled X rotations.

discopy.quantum.gates.Scalar(data[, ...])

Scalar, i.e. quantum gate with empty domain and codomain.

discopy.quantum.gates.Sqrt(data)

Square root.