From 907502b15805a7edd95c39577babf4f5ed00693f Mon Sep 17 00:00:00 2001 From: GiggleLiu Date: Wed, 25 Dec 2019 01:28:11 +0800 Subject: [PATCH 1/4] fix css doc selector --- src/assets/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/main.css b/src/assets/main.css index cc643cd..630402c 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -36,5 +36,5 @@ html.theme--documenter-dark body { } #documenter .docs-sidebar ul.docs-menu { - flex-grow: 0; + flex-grow: 0 !important; } From f916d970ddcfe682e9857e87c7e9e700b6045858 Mon Sep 17 00:00:00 2001 From: Julia TagBot <50554310+JuliaTagBot@users.noreply.github.com> Date: Sat, 8 Feb 2020 20:49:06 +0700 Subject: [PATCH 2/4] Install TagBot as a GitHub Action --- .github/workflows/TagBot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/TagBot.yml diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..d77d3a0 --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,11 @@ +name: TagBot +on: + schedule: + - cron: 0 * * * * +jobs: + TagBot: + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} From 2f484f5a1b4efd1a64d7422993dd49997d8f2af6 Mon Sep 17 00:00:00 2001 From: GiggleLiu Date: Sat, 4 Apr 2020 17:12:01 -0400 Subject: [PATCH 3/4] new tutorial asciinema --- src/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.md b/src/index.md index 77e12cd..1297ebf 100644 --- a/src/index.md +++ b/src/index.md @@ -5,6 +5,8 @@ three badges on the top of each tutorial that allows you to open it in [mybinder it in [nbviewer](https://nbviewer.jupyter.org/) or download the tutorial as `.zip` file, which includes the notebook and the scripts and other related materials. +[![asciicast](https://asciinema.org/a/HaDO421J58cmKhIBbVPhJHIr7.svg)](https://asciinema.org/a/HaDO421J58cmKhIBbVPhJHIr7?speed=2) + ## Contribution If you are interesting in polishing or contributing our tutorial, you can just open a [PR in our tutorial repo](https://github.com/QuantumBFS/tutorials/compare). From d7fa48f1bddf4d16ec60413e2e0cf3823b946cd8 Mon Sep 17 00:00:00 2001 From: GiggleLiu Date: Sat, 4 Apr 2020 17:46:11 -0400 Subject: [PATCH 4/4] fix several APIchanges --- developer-guide/1.extending-register/main.jl | 2 +- quick-start/3.grover-search/main.jl | 4 ++-- quick-start/5.shor-9-code/main.jl | 1 + quick-start/6.quantum-circuit-born-machine/main.jl | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/developer-guide/1.extending-register/main.jl b/developer-guide/1.extending-register/main.jl index 99d7b59..b63962d 100644 --- a/developer-guide/1.extending-register/main.jl +++ b/developer-guide/1.extending-register/main.jl @@ -37,7 +37,7 @@ function Yao.relax!(reg::EchoReg{B}, locs; to_nactive=nqubits(reg)) where {B} return true end -function Yao.measure!(rng, ::ComputationalBasis, reg::EchoReg{B}, locs) where {B} +function Yao.measure!(::NoPostProcess, ::ComputationalBasis, reg::EchoReg{B}, locs) where {B} println("measure -> $locs") return true end diff --git a/quick-start/3.grover-search/main.jl b/quick-start/3.grover-search/main.jl index 0bd2d21..852597e 100644 --- a/quick-start/3.grover-search/main.jl +++ b/quick-start/3.grover-search/main.jl @@ -63,7 +63,7 @@ function single_try(oracle, gen::AbstractBlock{N}, nstep::Int; nbatch::Int) wher return r end reg |> checker - res = measure_remove!(reg, (N+1)) + res = measure!(RemoveMeasured(), reg, (N+1)) return res, reg end @@ -76,7 +76,7 @@ checker = control(num_bit+1,ctrl, num_bit+1=>X) # The register is batched, with batch dimension `nshot`. # [`focus!`](@ref Yao.focus!) views the first 1-N qubts as system. -# For a batched register, [`measure_remove!`](@ref Yao.measure_remove!) +# For a batched register, [`measure!`](@ref Yao.measure!) # returns a vector of bitstring as output. # #### Run diff --git a/quick-start/5.shor-9-code/main.jl b/quick-start/5.shor-9-code/main.jl index 66de158..9ed6b99 100644 --- a/quick-start/5.shor-9-code/main.jl +++ b/quick-start/5.shor-9-code/main.jl @@ -6,6 +6,7 @@ # which can be constructed by the following code using Yao +using SymEngine shor(E) = chain(9, ## encode circuit diff --git a/quick-start/6.quantum-circuit-born-machine/main.jl b/quick-start/6.quantum-circuit-born-machine/main.jl index ebfb3ff..9c708bd 100644 --- a/quick-start/6.quantum-circuit-born-machine/main.jl +++ b/quick-start/6.quantum-circuit-born-machine/main.jl @@ -199,13 +199,13 @@ end # Now let's setup the training -using Flux.Optimise +using Flux: Optimise qcbm = build_circuit(6, 10, [1=>2, 3=>4, 5=>6, 2=>3, 4=>5, 6=>1]) dispatch!(qcbm, :random) # initialize the parameters κ = RBFKernel(0.25, 0:2^6-1) pg = gaussian_pdf(1:1<<6, 1<<5-0.5, 1<<4); -opt = ADAM() +opt = Optimise.ADAM() function train(qcbm, κ, opt, target) history = Float64[]