From 1703ef3ae174fb3dfa32c1c786509ee8f41ecffe Mon Sep 17 00:00:00 2001 From: Iago Leal Date: Fri, 20 Dec 2024 18:41:31 -0500 Subject: [PATCH] fix: identation on docstrings --- .github/workflows/TagBot.yml | 2 -- docs/make.jl | 1 - src/solution.jl | 2 +- src/solver.jl | 8 ++++---- test/utils.jl | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index 4bad0ec..0cd3114 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -28,6 +28,4 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - # Edit the following line to reflect the actual name of the GitHub Secret containing your private key ssh: ${{ secrets.DOCUMENTER_KEY }} - # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} diff --git a/docs/make.jl b/docs/make.jl index 5ce73b2..5fdc60a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -18,4 +18,3 @@ if !("local" in ARGS) repo = "github.com/SECQUOIA/TenSolver.jl.git" ) end - diff --git a/src/solution.jl b/src/solution.jl index 2994ad9..6c5143c 100644 --- a/src/solution.jl +++ b/src/solution.jl @@ -15,7 +15,7 @@ sample(psi::Distribution) = ITensorMPS.sample!(psi.tensor) .- 1 """ - in(xs, psi::Distribution [; cutoff) + in(xs, psi::Distribution [; cutoff) Whether the vector `xs` has a positive probability of being sampleable from `psi`. When setting `cutoff`, it will be used as the minimum probability considered positive. diff --git a/src/solver.jl b/src/solver.jl index c0dd682..92b563d 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -113,8 +113,6 @@ by finding the ground state (least eigenspace) of the Hamiltonian where D_i acts locally on the i-th qubit as [0 0; 0 1], i.e, the projection on |1>. -See also [`maximize`](@ref). - The optional keyword `device` controls whether the solver should run on CPU or GPU. For using a GPU, you can import the respective package, e.g. CUDA.jl, and pass its accelerator as argument. @@ -126,6 +124,8 @@ minimize(Q; device = CUDA.cu) import Metal minimize(Q; device = Metal.mtl) ``` + +See also [`maximize`](@ref). """ function minimize( Q :: AbstractMatrix{T} , l :: Union{AbstractVector{T}, Nothing} = nothing @@ -160,7 +160,7 @@ function minimize( Q :: AbstractMatrix{T} end """ -minimize(Q::Matrix, c::Number; kwargs...) + minimize(Q::Matrix, c::Number; kwargs...) Solve the Quadratic Unconstrained Binary Optimization problem without a linear term. @@ -173,7 +173,7 @@ See also [`maximize`](@ref). minimize(Q :: AbstractMatrix{T}, c :: T; kwargs...) where T = minimize(Q, nothing, c; kwargs...) """ -maximize(Q::Matrix[, l::Vector[, c::Number; kwargs...) + maximize(Q::Matrix[, l::Vector[, c::Number; kwargs...) Solve the Quadratic Unconstrained Binary Optimization problem for maximization. diff --git a/test/utils.jl b/test/utils.jl index 912cd4b..cfc2ebb 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -4,7 +4,7 @@ =# """ - brute_force(f, n) + brute_force(f, n) A QUBO solver using a brute force approach instead of Tensor networks. Despite being painfully slow, this is useful as a sanity check.