Skip to content

Commit e93d27c

Browse files
authored
v0.7.0
## New Features - `VectorPauliSum` propagation which is natively multi-threaded in propagation. - An experimental `PauliPropagationCUDA` extension that allows PauliRotation gates to execute on the GPU. - Schrödinger picture propagation for some gates, including `PauliRotation`, `CliffordGate`, and `PauliNoise`. - ImaginaryPauliRotation gates in the Schrödinger picture. ## Design changes - Large chunks of the propagation code was migrated into PauliPropagation.PropagationBase in preparation for moving it into its own PropagationBase.jl repo. - Introduced `AbstractTermSum` and `AbstractPauliSum` as abstract types with uniting behavior. Useful defaults available for Dict and Vector storage. - Introduced propagation caches and the abstract type `AbstractPropagationCache`. These wrap evolving `AbstractTermSum` objects with optional additional objects necessary for efficient propagation. ## Breaking Changes Breaking changes do not affect high-level users. Only users defining custom gates and propagation subroutines. - The argument order and argument types of `applymergetruncate!()` and `applytoall!()` was changed for to receive propagation caches and the optional parameter as last argument. - `applyandadd!()` was removed. - Merging functions `mergeandempty!()` and below and truncation functions `checktruncationsonall!()` and below where simplified and reworked into `merge!()` and `truncate!()`.
2 parents 5b7df58 + 8fdca9f commit e93d27c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+6068
-4015
lines changed

Project.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
name = "PauliPropagation"
22
uuid = "293282d5-3c99-4fb6-92d0-fd3280a19750"
33
authors = ["Manuel S. Rudolph"]
4-
version = "0.6.0"
4+
version = "0.7.0"
55

66
[deps]
7+
AcceleratedKernels = "6a4ca0a5-0e36-4168-a932-d9be78d558f1"
78
BitIntegers = "c3b6d118-76ef-56ca-8cc7-ebb389d030a1"
89
Bits = "1654ce90-6ed3-553a-957f-9452c3a40996"
910
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
1011
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1112
PlotGraphviz = "78a92bc3-407c-4e2f-aae5-75bb47a6fe36"
13+
ProfileCanvas = "efd6af41-a80b-495e-886c-e51b0c7d77a3"
1214
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1315
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1416
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1517
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
1618

19+
[weakdeps]
20+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
21+
22+
[extensions]
23+
PauliPropagationCUDA = "CUDA"
24+
1725
[compat]
26+
AcceleratedKernels = "0.4.3"
1827
BitIntegers = "0.3"
1928
Bits = "0.2"
29+
CUDA = "5.9.6"
2030
JSON = "0.21.4"
2131
PlotGraphviz = "0.6.3"
32+
ProfileCanvas = "0.1.6"
2233
StatsBase = "0.34"
2334
Test = "1.10"
2435
UUIDs = "1.10"

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ makedocs(
5656
# these 'lower-level' files also exist, and will
5757
# be grouped under an 'API' section in the navbar
5858
"API" => [
59+
"api/PauliDataTypes.md",
5960
"api/PauliAlgebra.md",
6061
"api/Gates.md",
6162
"api/Circuits.md",
@@ -96,7 +97,7 @@ deploydocs(
9697
# - changes to the dev branch should update the /dev/ sub-domain; this seems
9798
# gratuitous since specified above and since irrelevant to Github releases,
9899
# but it is present in the deploydocs() doc without elaboration. Grr!
99-
versions = ["stable" => "v^", "v#.#.#", "dev" => "dev"]
100+
versions=["stable" => "v^", "v#.#.#", "dev" => "dev"]
100101
)
101102

102103

docs/src/api/Gates.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ Pages = ["src/Gates/paulirotations.jl"]
1616
Order = [:type, :function, :constant]
1717
```
1818

19+
## Imaginary Pauli Rotations
20+
21+
```@autodocs
22+
Modules = [PauliPropagation]
23+
Pages = ["src/Gates/imaginarytime.jl"]
24+
Order = [:type, :function, :constant]
25+
```
26+
1927
## Noise Channels
2028

2129
```@autodocs

docs/src/api/PauliAlgebra.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Pauli Algebra
22

3-
## Data types
4-
5-
```@autodocs
6-
Modules = [PauliPropagation]
7-
Pages = ["src/PauliAlgebra/datatypes.jl"]
8-
```
9-
103
## Pauli operations
114

125
```@autodocs

docs/src/api/PauliDataTypes.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Data types
2+
3+
## PauliString
4+
```@autodocs
5+
Modules = [PauliPropagation]
6+
Pages = ["src/PauliDataTypes/paulistring.jl"]
7+
```
8+
9+
## PauliSum
10+
```@autodocs
11+
Modules = [PauliPropagation]
12+
Pages = ["src/PauliDataTypes/paulisum.jl"]
13+
```
14+
15+
## VectorPauliSum
16+
```@autodocs
17+
Modules = [PauliPropagation]
18+
Pages = ["src/PauliDataTypes/vectorpaulisum.jl"]
19+
```
20+
21+
## Conversions
22+
```@autodocs
23+
Modules = [PauliPropagation]
24+
Pages = ["src/PauliDataTypes/conversions.jl"]
25+
```
26+
27+
## AbstractPauliSum
28+
```@autodocs
29+
Modules = [PauliPropagation]
30+
Pages = ["src/PauliDataTypes/abstractpaulisum.jl"]
31+
```

docs/src/api/Propagation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ Pages = ["src/Propagation/generics.jl"]
1313
Modules = [PauliPropagation]
1414
Pages = ["src/Propagation/specializations.jl"]
1515
```
16+
17+
## Vector Specializations
18+
19+
```@autodocs
20+
Modules = [PauliPropagation]
21+
Pages = ["src/Propagation/vectorspecializations.jl"]
22+
```

examples/1-basic-example.ipynb

Lines changed: 441 additions & 449 deletions
Large diffs are not rendered by default.

examples/5-custom-gates.ipynb

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@
984984
"id": "e5b69738-c385-4851-afeb-348859c9e8fa",
985985
"metadata": {},
986986
"source": [
987-
"This is exactly what we expect, and we could even verify those results with some of the noise channels that we have."
987+
"This is exactly what we expect, and we could even verify those results with some damping operations we have. Note that **they are not valid quantum channels**!"
988988
]
989989
},
990990
{
@@ -1033,9 +1033,9 @@
10331033
}
10341034
],
10351035
"source": [
1036-
"gx = PauliXNoise(1)\n",
1037-
"gy = PauliYNoise(1)\n",
1038-
"gz = PauliZNoise(1)\n",
1036+
"gx = PauliPropagation.PauliXDamping(1)\n",
1037+
"gy = PauliPropagation.PauliYDamping(1)\n",
1038+
"gz = PauliPropagation.PauliZDamping(1)\n",
10391039
"\n",
10401040
"circuit = Gate[gx, gy, gz]\n",
10411041
"\n",
@@ -1101,26 +1101,22 @@
11011101
]
11021102
},
11031103
{
1104-
"ename": "LoadError",
1105-
"evalue": "MethodError: \u001b[0mCannot `convert` an object of type \u001b[92mVector{Float64}\u001b[39m\u001b[0m to an object of type \u001b[91mFloat64\u001b[39m\nThe function `convert` exists, but no method is defined for this combination of argument types.\n\n\u001b[0mClosest candidates are:\n\u001b[0m convert(::Type{T}, \u001b[91m::T\u001b[39m) where T<:Number\n\u001b[0m\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m\u001b[4mnumber.jl:6\u001b[24m\u001b[39m\n\u001b[0m convert(::Type{T}, \u001b[91m::T\u001b[39m) where T\n\u001b[0m\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m\u001b[4mBase.jl:126\u001b[24m\u001b[39m\n\u001b[0m convert(::Type{T}, \u001b[91m::Number\u001b[39m) where T<:Number\n\u001b[0m\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m\u001b[4mnumber.jl:7\u001b[24m\u001b[39m\n\u001b[0m ...\n",
1106-
"output_type": "error",
1107-
"traceback": [
1108-
"MethodError: \u001b[0mCannot `convert` an object of type \u001b[92mVector{Float64}\u001b[39m\u001b[0m to an object of type \u001b[91mFloat64\u001b[39m\nThe function `convert` exists, but no method is defined for this combination of argument types.\n\n\u001b[0mClosest candidates are:\n\u001b[0m convert(::Type{T}, \u001b[91m::T\u001b[39m) where T<:Number\n\u001b[0m\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m\u001b[4mnumber.jl:6\u001b[24m\u001b[39m\n\u001b[0m convert(::Type{T}, \u001b[91m::T\u001b[39m) where T\n\u001b[0m\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m\u001b[4mBase.jl:126\u001b[24m\u001b[39m\n\u001b[0m convert(::Type{T}, \u001b[91m::Number\u001b[39m) where T<:Number\n\u001b[0m\u001b[90m @\u001b[39m \u001b[90mBase\u001b[39m \u001b[90m\u001b[4mnumber.jl:7\u001b[24m\u001b[39m\n\u001b[0m ...\n",
1109-
"",
1110-
"Stacktrace:",
1111-
" [1] setindex!(A::Vector{Float64}, x::Vector{Float64}, i::Int64)",
1112-
" @ Base ./array.jl:987",
1113-
" [2] top-level scope",
1114-
" @ In[31]:5"
1115-
]
1104+
"data": {
1105+
"text/plain": [
1106+
"Vector{Float64}\u001b[90m (alias for \u001b[39m\u001b[90mArray{Float64, 1}\u001b[39m\u001b[90m)\u001b[39m"
1107+
]
1108+
},
1109+
"execution_count": 31,
1110+
"metadata": {},
1111+
"output_type": "execute_result"
11161112
}
11171113
],
11181114
"source": [
11191115
"thetas = randn(nparams)\n",
11201116
"@show typeof(thetas)\n",
11211117
"\n",
11221118
"# this doesn't work because thetas is already strictly typed to Float64 entries\n",
1123-
"thetas[2] = pvec"
1119+
"# thetas[2] = pvec"
11241120
]
11251121
},
11261122
{

examples/7-custom-pathproperties.ipynb

Lines changed: 219 additions & 220 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)