YaoSym.szero_state
— Methodszero_state(n; nbatch=1)
Create a symbolic zero state, same as ket"000"
, but allows you use an integer.
YaoSym.@bra_str
— Macro@bra_str
Create a bra register. See also @ket_str
.
Examples
Similar to @ket_str
literal, a symbolic quantum state can be created by
julia> bra"111" + 2bra"101"
2.0⟨101| + ⟨111|
julia> bra"111" * (ket"101" + ket"111")
1
YaoSym.@ket_str
— Macro