Ket
Ket#
- class discopy.quantum.gates.Ket(*bitstring)[source]#
Bases:
SelfConjugate
,QuantumGate
Implements qubit preparation for a given bitstring.
>>> assert Ket(1, 0).cod == qubit ** 2 >>> assert Ket(1, 0).eval()\ ... == Tensor[complex](dom=Dim(1), cod=Dim(2, 2), array=[0, 0, 1, 0])
- property bitstring#
The bitstring of a Ket.