diff --git a/README.md b/README.md index 592361b..1116f35 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # YaoToEinsum [![CI](https://github.com/QuantumBFS/YaoToEinsum.jl/workflows/CI/badge.svg)](https://github.com/QuantumBFS/YaoToEinsum.jl/actions) +[![codecov](https://codecov.io/gh/QuantumBFS/YaoToEinsum.jl/graph/badge.svg?token=ZwzRcQCksQ)](https://codecov.io/gh/QuantumBFS/YaoToEinsum.jl) -Convert Yao circuit to OMEinsum notation for tensor network based simulation. +Convert [Yao](https://github.com/QuantumBFS/Yao.jl) circuit to tensor networks (einsum). ## Installation @@ -12,7 +13,7 @@ Convert Yao circuit to OMEinsum notation for tensor network based simulation. pkg> add YaoToEinsum ``` -## Example +## Using This package contains one main function `yao2einsum(circuit; initial_state=Dict(), final_state=Dict(), optimizer=TreeSA())`. It transform a [`Yao`](https://github.com/QuantumBFS/Yao.jl) circuit to a generalized tensor network (einsum notation). The return value is a `TensorNetwork` object. @@ -54,6 +55,6 @@ julia> contract(network)[] ≈ Yao.zero_state(n)' * (Yao.zero_state(n) |> circui true ``` -## References - +## Contribute and Cite +If you have any questions or suggestions, please feel free to open an issue or pull request. If you use this package in your work, please cite the relevant part of the papers included in [CITATION.bib](CITATION.bib). \ No newline at end of file diff --git a/src/Core.jl b/src/Core.jl index 6a89806..1fa162a 100644 --- a/src/Core.jl +++ b/src/Core.jl @@ -8,7 +8,7 @@ function Base.show(io::IO, c::TensorNetwork) print(io, contraction_complexity(c)) end function Base.show(io::IO, ::MIME"text/plain", c::TensorNetwork) - print(io, c) + Base.show(io, c) end function Base.iterate(c::TensorNetwork, state=1) if state > 2