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