Encode#
- class discopy.quantum.circuit.Encode(n_bits=1, constructive=True, reset_bits=False)[source]#
Bases:
RealConjugate,BoxControlled preparation, i.e. encode n bits into n qubits.
- Parameters:
n_bits (int) – Number of bits to encode.
constructive (bool, optional) – Whether to do a classically-controlled correction instead.
reset_bits (bool, optional) – Whether to reset the bits to the uniform distribution.