Skip to content

Commit

Permalink
Use Compat.@compat to mark public functions not exported
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Jan 9, 2025
1 parent 14599c8 commit 2f587d3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "0.8.0-DEV"
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
BijectiveDicts = "d089a002-103b-496c-a4e3-58f90cf955b0"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
DeltaArrays = "10b0fc19-5ccc-4427-889b-d75dd6306188"
EinExprs = "b1794770-133b-4de1-afb4-526377e9f4c5"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
Expand Down Expand Up @@ -61,6 +62,7 @@ ChainRules = "1.0"
ChainRulesCore = "1.0"
ChainRulesTestUtils = "1"
Combinatorics = "1.0"
Compat = "4.10"
Dagger = "0.18"
DeltaArrays = "0.1.1"
EinExprs = "0.5, 0.6"
Expand Down
51 changes: 40 additions & 11 deletions src/Tenet.jl
Original file line number Diff line number Diff line change
@@ -1,44 +1,73 @@
module Tenet

import EinExprs: inds
using Compat

include("Helpers.jl")
@compat public letter, nonunique, IndexCounter, currindex, nextindex!

include("Tensor.jl")
export Tensor, contract, dim, expand

include("Numerics.jl")

include("TensorNetwork.jl")
export TensorNetwork, tensors, arrays, neighbors, slice!
export contract, contract!, groupinds!
export TensorNetwork, tensors, arrays, neighbors, slice!, contract, contract!, groupinds!
@compat public AbstractTensorNetwork, ninds, ntensors, @unsafe_region, tryprune!, resetindex!

include("Transformations.jl")
export transform, transform!
#! format: off
@compat public Transformation,
HyperFlatten,
HyperGroup,
ContractSimplification,
Truncate,
DiagonalReduction,
AntiDiagonalGauging,
SplitSimplification
#! format: on

include("Site.jl")
export Site, @site_str, isdual
@compat public id

include("Quantum.jl")
export Quantum, ninputs, noutputs, inputs, outputs, sites, nsites
export Quantum, ninputs, noutputs, inputs, outputs, sites, lanes, socket
@compat public AbstractQuantum, Socket, Scalar, State, Operator, reindex!, @reindex!, nsites, nlanes, hassite

include("Lattice.jl")
@compat public Lattice

include("Ansatz.jl")
export Ansatz
export socket, Scalar, State, Operator
export boundary, Open, Periodic
export form, NonCanonical, MixedCanonical, Canonical

export canonize, canonize!, mixed_canonize, mixed_canonize!, truncate!, isisometry
#! format: off
export Ansatz,
boundary,
Open,
Periodic,
form,
NonCanonical,
MixedCanonical,
Canonical,
canonize,
canonize!,
mixed_canonize,
mixed_canonize!,
truncate!,
isisometry,
expect,
evolve!,
simple_update!,
overlap
#! format: on
@compat public AbstractAnsatz, Boundary, Form

include("Product.jl")
export Product

include("MPS.jl")
export MPS, MPO

export evolve!, expect, overlap
@compat public AbstractMPS, AbstractMPO, defaultorder, check_form

# reexports from EinExprs
export einexpr, inds
Expand Down

0 comments on commit 2f587d3

Please sign in to comment.