YaoSym.@bra_strMacro
@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_strMacro
@ket_str

Create a ket register. See also @bra_str.

Examples

a symbolic quantum state can be created simply by

julia> ket"110" + 2ket"111"
|110⟩ + 2.0|111⟩

qubits can be partially actived by focus!

julia> ket"100" + ket"111" |> focus!(1:2)
|100⟩ + |111⟩