diff --git a/.github/ISSUE_TEMPLATE/08_ITensorGLMakie_bug_report.md b/.github/ISSUE_TEMPLATE/08_ITensorGLMakie_bug_report.md deleted file mode 100644 index 4405ece1ad..0000000000 --- a/.github/ISSUE_TEMPLATE/08_ITensorGLMakie_bug_report.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -name: ITensorGLMakie.jl bug report -about: Create a bug report to help us improve ITensorGLMakie.jl -title: "[ITensorGLMakie] [BUG] YOUR SHORT DESCRIPTION OF THE BUG HERE" -labels: ["ITensorGLMakie", "bug"] -assignees: '' - ---- - -**Description of bug** - -Please give a brief description of the bug or unexpected behavior here. - -**Minimal code demonstrating the bug or unexpected behavior** - -If applicable, provide a minimal code that can be run to demonstrate the bug or unexpected behavior. - -If you are unable to construct a minimal code that demonstrates the bug or unexpected behavior, provide detailed steps for how to reproduce the behavior you are seeing. - -
Minimal runnable code

- -```julia -[YOUR MINIMAL RUNNABLE CODE HERE] -``` -

- - -**Expected output or behavior** - -Describe what you expected to happen. - -If you provided a minimal code that can be run to demonstrate the bug or unexpected behavior, describe what you expected the output would be. - - -**Actual output or behavior** - -Describe what actually happened. - -If you provided a minimal code that demonstrates the bug or unexpected behavior, provide the output you get from that code. If the code leads to an error or warning, include the full error or warning below. - -
Output of minimal runnable code

- -```julia -[OUTPUT OF YOUR MINIMAL RUNNABLE CODE HERE] -``` -

- - -**Version information** - - - Output from `versioninfo()`: -```julia -julia> versioninfo() -[YOUR OUTPUT HERE] -``` - - Output from `using Pkg; Pkg.status("ITensors")`: -```julia -julia> using Pkg; Pkg.status("ITensors") -[YOUR OUTPUT HERE] -``` diff --git a/.github/ISSUE_TEMPLATE/08_ITensorGLMakie_feature_request.md b/.github/ISSUE_TEMPLATE/08_ITensorGLMakie_feature_request.md deleted file mode 100644 index a97fa92829..0000000000 --- a/.github/ISSUE_TEMPLATE/08_ITensorGLMakie_feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: ITensorGLMakie.jl feature request -about: Suggest an idea for ITensorGLMakie.jl -title: "[ITensorGLMakie] [ENHANCEMENT] YOUR SHORT DESCRIPTION OF THE FEATURE REQUEST HERE" -labels: ["ITensorGLMakie", "enhancement"] -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** - -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** - -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** - -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** - -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/generate_issue_templates/generate_issue_templates.jl b/.github/ISSUE_TEMPLATE/generate_issue_templates/generate_issue_templates.jl index 045308f103..aaaa985ff5 100644 --- a/.github/ISSUE_TEMPLATE/generate_issue_templates/generate_issue_templates.jl +++ b/.github/ISSUE_TEMPLATE/generate_issue_templates/generate_issue_templates.jl @@ -2,9 +2,9 @@ using FileUtils template_package_name = "PACKAGE" -package_names = ["ITensors", "NDTensors", "ITensorGLMakie"] +package_names = ["ITensors", "NDTensors"] -package_ordering = Dict(["ITensors" => 1, "NDTensors" => 2, "ITensorGLMakie" => 3]) +package_ordering = Dict(["ITensors" => 1, "NDTensors" => 2]) function bug_report_file(package_name::String) return "$(package_name)_bug_report.md" diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index 35e96b0a3f..2a47aec48e 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -12,4 +12,4 @@ jobs: - name: CompatHelper.main() env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "ITensorGLMakie", "NDTensors"])' + run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "NDTensors"])' diff --git a/.github/workflows/test_itensorglmakie_ubuntu.yml b/.github/workflows/test_itensorglmakie_ubuntu.yml deleted file mode 100644 index 09c5058888..0000000000 --- a/.github/workflows/test_itensorglmakie_ubuntu.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Run ITensorGLMakie tests (Ubuntu) - -on: - push: - branches: - - main - tags: '*' - pull_request: - -jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.threads }} thread(s) - runs-on: ${{ matrix.os }} - env: - JULIA_NUM_THREADS: ${{ matrix.threads }} - strategy: - matrix: - version: - - '1.6' - - '1' - os: - - ubuntu-20.04 - threads: - - '1' - arch: - - x64 - exclude: - # MacOS not available on x86 - - {os: 'macOS-latest', arch: 'x86'} - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - - name: Install Julia dependencies and run tests - run: | - JULIA_REFERENCETESTS_UPDATE=true DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --depwarn=yes -e 'using Pkg; Pkg.activate(temp=true); Pkg.develop(path="./NDTensors"); Pkg.develop(path="."); Pkg.develop(path="./ITensorGLMakie"); Pkg.test("ITensorGLMakie")' diff --git a/.gitignore b/.gitignore index 07b862bd33..0036a0b19d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,6 @@ benchmark/mult benchmark/*.json docs/Manifest.toml docs/build/ -ITensorGLMakie/Manifest.toml -ITensorGLMakie/test/Manifest.toml NDTensors/Manifest.toml NDTensors/test/Manifest.toml precompile/tmp diff --git a/ITensorGLMakie/.JuliaFormatter.toml b/ITensorGLMakie/.JuliaFormatter.toml deleted file mode 100644 index 08f664cdb9..0000000000 --- a/ITensorGLMakie/.JuliaFormatter.toml +++ /dev/null @@ -1,2 +0,0 @@ -style = "blue" -indent = 2 diff --git a/ITensorGLMakie/LICENSE b/ITensorGLMakie/LICENSE deleted file mode 100644 index 555297e50a..0000000000 --- a/ITensorGLMakie/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 The Simons Foundation, Inc. - All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/ITensorGLMakie/NEWS.md b/ITensorGLMakie/NEWS.md deleted file mode 100644 index 3c5d0dab23..0000000000 --- a/ITensorGLMakie/NEWS.md +++ /dev/null @@ -1,25 +0,0 @@ -This file is a (mostly) comprehensive list of changes made in each release of ITensorGLMakie.jl. For a completely comprehensive but more verbose list, see the [commit history on Github](https://github.com/ITensor/ITensors.jl/commits/main/ITensorGLMakie). - -While we are in v0.x of the package, we will follow the convention that updating from v0.x.y to v0.x.(y+1) (for example v0.1.15 to v0.1.16) should not break your code, unless you are using internal/undocumented features of the code, while updating from `v0.x.y` to `v0.(x+1).y` might break your code, though we will try to add deprecation warnings when possible, such as for simple cases where the name of a function changes. - -Note that as of Julia v1.5, in order to see deprecation warnings you will need to start Julia with `julia --depwarn=yes` (previously they were on by default). Please run your code like this before upgrading between minor versions of the code (for example from v0.1.41 to v0.2.0). - -After we release v1 of the package, we will start following [semantic versioning](https://semver.org). - -ITensorGLMakie v0.1.1 Release Notes -=================================== - -Bugs: - -Enhancements: - -- Update compats (#1031) - -ITensorGLMakie v0.1.0 Release Notes -=================================== - -Bugs: - -Enhancements: - -- Register ITensorGLMakie package, code in ITensors.jl repository diff --git a/ITensorGLMakie/Project.toml b/ITensorGLMakie/Project.toml deleted file mode 100644 index 2bd15e9a10..0000000000 --- a/ITensorGLMakie/Project.toml +++ /dev/null @@ -1,15 +0,0 @@ -name = "ITensorGLMakie" -uuid = "3f718f31-6db8-4f43-a433-67cb5c73363e" -authors = ["Matthew Fishman "] -version = "0.1.2" - -[deps] -GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" -ITensorMakie = "72ca75eb-df6f-4d6b-80c5-d5eab17be3f9" -Reexport = "189a3867-3050-52da-a836-e630ba90ab69" - -[compat] -GLMakie = "0.9" -ITensorMakie = "0.1.2" -Reexport = "1.2.2" -julia = "1.6" diff --git a/ITensorGLMakie/examples/ex_2d_tensor_network_layered.jl b/ITensorGLMakie/examples/ex_2d_tensor_network_layered.jl deleted file mode 100644 index 09ad91f093..0000000000 --- a/ITensorGLMakie/examples/ex_2d_tensor_network_layered.jl +++ /dev/null @@ -1,10 +0,0 @@ -using ITensors -using ITensorGLMakie -using Graphs -using LayeredLayouts - -tn = itensornetwork(grid((4, 4)); linkspaces=3) -layout(g) = layered_layout(solve_positions(Zarate(), g)) -@visualize fig tn arrow_show = true layout = layout - -fig diff --git a/ITensorGLMakie/examples/ex_contraction_sequence.jl b/ITensorGLMakie/examples/ex_contraction_sequence.jl deleted file mode 100644 index 60835e3434..0000000000 --- a/ITensorGLMakie/examples/ex_contraction_sequence.jl +++ /dev/null @@ -1,20 +0,0 @@ -using ITensors -using ITensorGLMakie -using Graphs - -using ITensors.ContractionSequenceOptimization: optimal_contraction_sequence - -N = 5 -g = Graph(N) -g_edges = [2 => 3, 1 => 4, 1 => 5, 4 => 5] -for e in g_edges - add_edge!(g, e) -end - -A = itensornetwork(g; linkspaces=5) -sequence = optimal_contraction_sequence(A) -edge_labels = (; tags=true) -R = @visualize_sequence fig ITensors.contract(A; sequence=sequence) edge_labels = - edge_labels - -fig diff --git a/ITensorGLMakie/examples/ex_dmrg.jl b/ITensorGLMakie/examples/ex_dmrg.jl deleted file mode 100644 index 64be720c06..0000000000 --- a/ITensorGLMakie/examples/ex_dmrg.jl +++ /dev/null @@ -1,34 +0,0 @@ -using ITensors -using ITensorGLMakie - -N = 10 -sites(n) = Index([QN("Sz", 0) => 1, QN("Sz", 1) => 1]; tags="S=1/2,Site,n=$n") -l(n) = Index([QN("Sz", 0) => 10, QN("Sz", 1) => 10]; tags="Link,l=$n") -h(n) = Index([QN("Sz", 0) => 5, QN("Sz", 1) => 5]; tags="ham,Link,l=$n") -s⃗ = [sites(n) for n in 1:N] -l⃗ = [l(n) for n in 1:(N - 1)] -h⃗ = [h(n) for n in 1:(N - 1)] - -# Add some more indices between two of the tensors -x = Index([QN("Sz", 0) => 2]; tags="X") -y = Index([QN("Sz", 0) => 2]; tags="Y") - -n = 2 -ψn1n2 = randomITensor(l⃗[n - 1], s⃗[n], s⃗[n + 1], l⃗[n + 1], dag(x), dag(y)) -hn1 = randomITensor(dag(h⃗[n - 1]), s⃗[n]', dag(s⃗[n]), h⃗[n], x, y) -hn2 = randomITensor(dag(h⃗[n]), s⃗[n + 1]', dag(s⃗[n + 1]), h⃗[n + 1]) -ELn0 = randomITensor(l⃗[n - 1]', h⃗[n - 1], dag(l⃗[n - 1])) -ERn2 = randomITensor(l⃗[n + 1]', dag(h⃗[n + 1]), dag(l⃗[n + 1])) - -edge_labels = (; plevs=true) - -R = @visualize fig1 ELn0 * ψn1n2 * hn1 * hn2 * ERn2 edge_labels = edge_labels vertex_size = - 50 -@show R ≈ ELn0 * ψn1n2 * hn1 * hn2 * ERn2 - -# Split it up into multiple contractions -R1 = @visualize fig2 ELn0 * ψn1n2 * hn1 edge_labels = edge_labels vertex_size = 50 -R2 = @visualize fig3 R1 * hn2 * ERn2 edge_labels = edge_labels vertex_size = 50 -@show R2 ≈ ELn0 * ψn1n2 * hn1 * hn2 * ERn2 - -fig1, fig2, fig3 diff --git a/ITensorGLMakie/examples/ex_grid_layout.jl b/ITensorGLMakie/examples/ex_grid_layout.jl deleted file mode 100644 index be01952885..0000000000 --- a/ITensorGLMakie/examples/ex_grid_layout.jl +++ /dev/null @@ -1,12 +0,0 @@ -using ITensors -using ITensorGLMakie -using Graphs -using GeometryBasics -using NetworkLayout - -N = 10 -g = grid((N,)) -tn = itensornetwork(g; linkspaces=10, sitespaces=2) -@visualize fig tn siteinds_direction = Point(1, -0.5) layout = SquareGrid(; cols=1) - -fig diff --git a/ITensorGLMakie/examples/ex_itensor_graph_makie.jl b/ITensorGLMakie/examples/ex_itensor_graph_makie.jl deleted file mode 100644 index 671f161344..0000000000 --- a/ITensorGLMakie/examples/ex_itensor_graph_makie.jl +++ /dev/null @@ -1,9 +0,0 @@ -using ITensors -using ITensorGLMakie -using Graphs - -g = grid((5,)) -tn = itensornetwork(g; linkspaces=10, sitespaces=2) -@visualize fig tn - -fig diff --git a/ITensorGLMakie/examples/ex_qn_mps.jl b/ITensorGLMakie/examples/ex_qn_mps.jl deleted file mode 100644 index f4c1b1ba80..0000000000 --- a/ITensorGLMakie/examples/ex_qn_mps.jl +++ /dev/null @@ -1,13 +0,0 @@ -using ITensors -using ITensorGLMakie - -s = siteinds("S=1/2", 5; conserve_qns=true) -ψ = randomMPS(s, n -> isodd(n) ? "↑" : "↓"; linkdims=2) -orthogonalize!(ψ, 2) -ψdag = prime(linkinds, dag(ψ)) -tn = [ψ..., ψdag...] - -edge_labels = (; plevs=true, qns=true) -@visualize fig tn edge_labels = edge_labels edge_textsize = 20 - -fig diff --git a/ITensorGLMakie/examples/ex_quantum_circuit.jl b/ITensorGLMakie/examples/ex_quantum_circuit.jl deleted file mode 100644 index 87fecf9875..0000000000 --- a/ITensorGLMakie/examples/ex_quantum_circuit.jl +++ /dev/null @@ -1,32 +0,0 @@ -using ITensors -using ITensorGLMakie -using LayeredLayouts -using Graphs - -N = 10 -layers = 10 -ndelete = 0 - -s = siteinds("Qubit", N) -layer(N, start) = [("CX", i, i + 1) for i in start:2:(N - 1)] -layer(N) = append!(layer(N, 1), layer(N, 2)) -layer_N = layer(N) -gates = [] -for _ in 1:layers - append!(gates, layer_N) -end - -for _ in 1:ndelete - deleteat!(gates, rand(eachindex(gates))) -end - -U, s̃ = circuit_network(gates, s) -ψ = prod(MPS(s)) -ψ̃ = prod(MPS(s̃)) -tn = [ψ, U..., ψ̃] - -edge_labels = (; plevs=true) -layout(g) = layered_layout(solve_positions(Zarate(), g)) -@visualize fig tn arrow_show = true edge_labels = edge_labels layout = layout - -fig diff --git a/ITensorGLMakie/examples/ex_visualize_3d.jl b/ITensorGLMakie/examples/ex_visualize_3d.jl deleted file mode 100644 index a4e0bdf627..0000000000 --- a/ITensorGLMakie/examples/ex_visualize_3d.jl +++ /dev/null @@ -1,9 +0,0 @@ -using ITensors -using ITensorGLMakie -using Graphs - -tn = itensornetwork(grid((3, 3, 3))) -edge_labels = (; dims=false) -@visualize fig tn ndims = 3 edge_labels = edge_labels vertex_size = 400 - -fig diff --git a/ITensorGLMakie/examples/notest_ex_2d_circuit.jl b/ITensorGLMakie/examples/notest_ex_2d_circuit.jl deleted file mode 100644 index 562cba6c48..0000000000 --- a/ITensorGLMakie/examples/notest_ex_2d_circuit.jl +++ /dev/null @@ -1,28 +0,0 @@ -using ITensors -using ITensorGLMakie -using Graphs -using PastaQ: randomcircuit -using LayeredLayouts - -Nx, Ny = 3, 3 -N = Nx * Ny -# TODO: change to (Nx, Ny) with PastaQ v0.0.16 -gates = randomcircuit( - Nx, Ny; depth=4, twoqubitgates="CX", onequbitgates="Rn", layered=false, rotated=false -) - -s = siteinds("Qubit", N) - -U, s̃ = circuit_network(gates, s) -ψ = MPS(s) -ψ̃ = MPS(s̃) -tn = [prod(ψ), U..., prod(ψ̃)] - -edge_labels = (; plevs=true) -layout(g) = layered_layout(solve_positions(Zarate(), g)) -@visualize fig tn arrow_show = true edge_labels = edge_labels layout = layout edge_textsize = - 20 -@visualize! fig[2, 1] tn ndims = 3 arrow_show = true edge_labels = edge_labels edge_textsize = - 10 - -fig diff --git a/ITensorGLMakie/examples/notest_ex_qft_circuit.jl b/ITensorGLMakie/examples/notest_ex_qft_circuit.jl deleted file mode 100644 index a627acee60..0000000000 --- a/ITensorGLMakie/examples/notest_ex_qft_circuit.jl +++ /dev/null @@ -1,24 +0,0 @@ -using ITensors -using ITensorGLMakie -using Graphs -using PastaQ: qft -using LayeredLayouts - -N = 4 -gates = qft(N) - -s = siteinds("Qubit", N) - -U, s̃ = circuit_network(gates, s) -ψ = MPS(s) -ψ̃ = MPS(s̃) -tn = [ψ..., U..., ψ̃...] - -edge_labels = (; tags=true, plevs=true) -layout(g) = layered_layout(solve_positions(Zarate(), g)) -@visualize fig tn arrow_show = true edge_labels = edge_labels edge_textsize = 20 layout = - layout -edge_labels = (; plevs=true) -@visualize! fig[1, 2] tn ndims = 3 edge_labels = edge_labels edge_textsize = 20 - -fig diff --git a/ITensorGLMakie/src/ITensorGLMakie.jl b/ITensorGLMakie/src/ITensorGLMakie.jl deleted file mode 100644 index 22b90ca9b6..0000000000 --- a/ITensorGLMakie/src/ITensorGLMakie.jl +++ /dev/null @@ -1,8 +0,0 @@ -module ITensorGLMakie - -using Reexport -using GLMakie - -@reexport using ITensorMakie - -end # module diff --git a/ITensorGLMakie/test/Project.toml b/ITensorGLMakie/test/Project.toml deleted file mode 100644 index 8bc48ec53b..0000000000 --- a/ITensorGLMakie/test/Project.toml +++ /dev/null @@ -1,11 +0,0 @@ -[deps] -GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" -Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" -ITensorGLMakie = "3f718f31-6db8-4f43-a433-67cb5c73363e" -ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" -LayeredLayouts = "f4a74d36-062a-4d48-97cd-1356bad1de4e" -NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" -NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -ReferenceTests = "324d217c-45ce-50fc-942e-d289b448e8cf" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/ITensorGLMakie/test/references/R.png b/ITensorGLMakie/test/references/R.png deleted file mode 100644 index f5ad7660d3..0000000000 Binary files a/ITensorGLMakie/test/references/R.png and /dev/null differ diff --git a/ITensorGLMakie/test/references/R.txt b/ITensorGLMakie/test/references/R.txt deleted file mode 100644 index bf88cd6f00..0000000000 --- a/ITensorGLMakie/test/references/R.txt +++ /dev/null @@ -1,22 +0,0 @@ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ERn2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⡇⠑⠢⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀20⠀⠀⠀⠑⠢⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀20⠊⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀10⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣉hn2⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠜⠀⣀⣀⣀⣀⣀⡠⠤⠤⠤⠤2⠒⠒⠒⠒⠒⠉⠉⠉⠉⠉⠀⢀⠔⢹⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ψn1n2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀2⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠁⠀⠀⠀⠀⠉⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀10⠔⠁⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀2⊗2⊗2⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀20⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠒⢄⡀⠀⠀⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⡠⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⣑hn1⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⡠⠊⠀⠀⢀⣀⣀⣀⣀⡠⠤⠤10⠤⠒⠒⠒⠒⠒⠉⠉⠉⠉⠉⠁⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀ELn0⠉⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀20⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ \ No newline at end of file diff --git a/ITensorGLMakie/test/references/R1.png b/ITensorGLMakie/test/references/R1.png deleted file mode 100644 index 354701a82f..0000000000 Binary files a/ITensorGLMakie/test/references/R1.png and /dev/null differ diff --git a/ITensorGLMakie/test/references/R1.txt b/ITensorGLMakie/test/references/R1.txt deleted file mode 100644 index 4ac7548305..0000000000 --- a/ITensorGLMakie/test/references/R1.txt +++ /dev/null @@ -1,22 +0,0 @@ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀ELn0⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⣷⠀⠀⠉⠉⠑⠒⠒⠤⠤⢄⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠑⠒⠒⠤⠤10⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀20⠘⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠒⠒⠢⠤⠤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⠀⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠒⠒⠢⠤hn1⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠒⠉⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠁⠀⠀⠘⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠒⠉⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀20⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀2⊗10⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠2⊗2⊗2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ψn1n2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2⊗20⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ \ No newline at end of file diff --git a/ITensorGLMakie/test/references/R2.png b/ITensorGLMakie/test/references/R2.png deleted file mode 100644 index e88d9af380..0000000000 Binary files a/ITensorGLMakie/test/references/R2.png and /dev/null differ diff --git a/ITensorGLMakie/test/references/R2.txt b/ITensorGLMakie/test/references/R2.txt deleted file mode 100644 index 30dabf0db8..0000000000 --- a/ITensorGLMakie/test/references/R2.txt +++ /dev/null @@ -1,22 +0,0 @@ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀T1⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⣷⠀⠀⠉⠉⠑⠒⠒⠤⠤⢄⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠑⠒⠒⠤⠤20⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀20⊗2⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠒⠒⠢⠤⠤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⠀⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠒⠒⠢⠤T3⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠒⠉⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠁⠀⠀⠘⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠒⠉⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀2⊗10⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀20⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔10⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠀⠀⠀⠀⠀⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡆⢀⡠⠔⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀T2⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ \ No newline at end of file diff --git a/ITensorGLMakie/test/references/T.png b/ITensorGLMakie/test/references/T.png deleted file mode 100644 index 2b0604227a..0000000000 Binary files a/ITensorGLMakie/test/references/T.png and /dev/null differ diff --git a/ITensorGLMakie/test/references/grid.png b/ITensorGLMakie/test/references/grid.png deleted file mode 100644 index 2e52dbfd91..0000000000 Binary files a/ITensorGLMakie/test/references/grid.png and /dev/null differ diff --git a/ITensorGLMakie/test/references/tn.png b/ITensorGLMakie/test/references/tn.png deleted file mode 100644 index 276cc6b9df..0000000000 Binary files a/ITensorGLMakie/test/references/tn.png and /dev/null differ diff --git a/ITensorGLMakie/test/references/tn.txt b/ITensorGLMakie/test/references/tn.txt deleted file mode 100644 index 863ad1c718..0000000000 --- a/ITensorGLMakie/test/references/tn.txt +++ /dev/null @@ -1,22 +0,0 @@ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀tn₅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⡇⠑⠢⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀20⠀⠀⠀⠑⠢⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀20⠊⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀10⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣉tn₄⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠜⠀⣀⣀⣀⣀⣀⡠⠤⠤⠤⠤2⠒⠒⠒⠒⠒⠉⠉⠉⠉⠉⠀⢀⠔⢹⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀tn₂⣉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠁⠀2⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠁⠀⠀⠀⠀⠉⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀10⠔⠁⠀⠀⠀⢸⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀2⊗2⊗2⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀20⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠒⢄⡀⠀⠀⠀⠀⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⡠⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⣑tn₃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⡠⠊⠀⠀⢀⣀⣀⣀⣀⡠⠤⠤10⠤⠒⠒⠒⠒⠒⠉⠉⠉⠉⠉⠁⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀tn₁⠉⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀2⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀20⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ - ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ \ No newline at end of file diff --git a/ITensorGLMakie/test/runtests.jl b/ITensorGLMakie/test/runtests.jl deleted file mode 100644 index 61e7704fca..0000000000 --- a/ITensorGLMakie/test/runtests.jl +++ /dev/null @@ -1,14 +0,0 @@ -using ITensors -using ITensorGLMakie -using Test - -starts_and_ends_with(file, st, en) = startswith(file, st) && endswith(file, en) -starts_and_ends_with(st, en) = file -> starts_and_ends_with(file, st, en) - -test_path = joinpath(@__DIR__) -test_files = filter(starts_and_ends_with("test_", ".jl"), readdir(test_path)) -@testset "ITensorGLMakie.jl" for file in test_files - file_path = joinpath(test_path, file) - println("Running test $(file_path)") - include(file_path) -end diff --git a/ITensorGLMakie/test/test_basics.jl b/ITensorGLMakie/test/test_basics.jl deleted file mode 100644 index 36f639b895..0000000000 --- a/ITensorGLMakie/test/test_basics.jl +++ /dev/null @@ -1,60 +0,0 @@ -using ITensors -using ITensorGLMakie -using ReferenceTests -using Test - -@testset "Basic test for ITensorGLMakie" begin - extension = "png" - - N = 10 - s(n) = Index([QN("Sz", 0) => 1, QN("Sz", 1) => 1]; tags="S=1/2,Site,n=$n") - l(n) = Index([QN("Sz", 0) => 10, QN("Sz", 1) => 10]; tags="Link,l=$n") - h(n) = Index([QN("Sz", 0) => 5, QN("Sz", 1) => 5]; tags="ham,Link,l=$n") - s⃗ = [s(n) for n in 1:N] - l⃗ = [l(n) for n in 1:(N - 1)] - h⃗ = [h(n) for n in 1:(N - 1)] - - # Add some more indices between two of the tensors - x = Index([QN("Sz", 0) => 2]; tags="X") - y = Index([QN("Sz", 0) => 2]; tags="Y") - - n = 2 - ψn1n2 = randomITensor(l⃗[n - 1], s⃗[n], s⃗[n + 1], l⃗[n + 1], dag(x), dag(y)) - hn1 = randomITensor(dag(h⃗[n - 1]), s⃗[n]', dag(s⃗[n]), h⃗[n], x, y) - hn2 = randomITensor(dag(h⃗[n]), s⃗[n + 1]', dag(s⃗[n + 1]), h⃗[n + 1]) - ELn0 = randomITensor(l⃗[n - 1]', h⃗[n - 1], dag(l⃗[n - 1])) - ERn2 = randomITensor(l⃗[n + 1]', dag(h⃗[n + 1]), dag(l⃗[n + 1])) - - tn = [ELn0, ψn1n2, hn1, hn2, ERn2] - - R = @visualize figR ELn0 * ψn1n2 * hn1 * hn2 * ERn2 - R1 = @visualize figR1 ELn0 * ψn1n2 * hn1 - R2 = @visualize figR2 R1 * hn2 * ERn2 vertex_labels = ["T1", "T2", "T3"] - T = @visualize figT ELn0 - - @test R ≈ ELn0 * ψn1n2 * hn1 * hn2 * ERn2 - @test R1 ≈ ELn0 * ψn1n2 * hn1 - @test R2 ≈ ELn0 * ψn1n2 * hn1 * hn2 * ERn2 - @test T == ELn0 - - fig_tn = @visualize_noeval tn - - by = extension == "png" ? psnr_equality(0.5) : isequal - - @test_reference "references/R.$extension" figR by = by - @test_reference "references/R1.$extension" figR1 by = by - @test_reference "references/R2.$extension" figR2 by = by - @test_reference "references/tn.$extension" fig_tn by = by - @test_reference "references/T.$extension" figT by = by - - R = @visualize fig_grid ELn0 * ψn1n2 * hn1 * hn2 * ERn2 - R1 = @visualize! fig_grid[1, 2] ELn0 * ψn1n2 * hn1 - R2 = @visualize! fig_grid[2, 1] R1 * hn2 * ERn2 vertex_labels = ["T1", "T2", "T3"] - @visualize_noeval! fig_grid[2, 2] tn - - # XXX: Broken, passes locally but fails on CI with: - # Warning: test fails because PSNR -0.6602330207824707 < 1 - #@test_reference "references/grid.$extension" fig_grid by=by - - @test_throws DimensionMismatch @visualize fig R1 * hn2 * ERn2 vertex_labels = ["T1", "T2"] -end diff --git a/ITensorGLMakie/test/test_examples.jl b/ITensorGLMakie/test/test_examples.jl deleted file mode 100644 index 8335f08bdc..0000000000 --- a/ITensorGLMakie/test/test_examples.jl +++ /dev/null @@ -1,14 +0,0 @@ -using Test - -@testset "Examples" begin - examples_path = joinpath(@__DIR__, "..", "examples") - example_files = filter(starts_and_ends_with("ex_", ".jl"), readdir(examples_path)) - for file in example_files - file_path = joinpath(examples_path, file) - println("Testing file $(file_path)") - empty!(ARGS) - push!(ARGS, "false") - @test !isnothing(include(file_path)) - empty!(ARGS) - end -end