YaoSym.@bra_str
— Macro@bra_str
Create a bra register. See also @ket_str
.
Example
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@ket_str
Create a ket register. See also @bra_str
.
Example
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)
ERROR: UndefVarError: focus! not defined
Stacktrace:
[1] top-level scope
@ none:1