mindquantum.core.operators.Projector
- class mindquantum.core.operators.Projector(proj)[source]
Projector operator.
For a projector shown as below:
The string format would be '01II'.
Note
The lower index qubit is at the right end of string format of bra and ket.
- Parameters
proj (str) – The string format of the projector.
Examples
>>> from mindquantum.core.operators import Projector >>> p = Projector('II010') >>> p I2 ⊗ ¦010⟩⟨010¦