Skip to content

Commit

Permalink
Merge pull request #14 from ChitambarLab/v0.2.0
Browse files Browse the repository at this point in the history
V0.2.0
  • Loading branch information
bdoolittle committed Apr 24, 2021
2 parents 412c019 + b92c828 commit 35ecdce
Show file tree
Hide file tree
Showing 72 changed files with 4,913 additions and 3,545 deletions.
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CITATION.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ @gmail.com>
title = {QBase.jl},
howpublished = {\url{https://github.com/ChitambarLab/QBase.jl}},
url = {https://github.com/chitambarlab/QBase.jl},
version = {v0.1.3},
version = {v0.2.0},
year = {2020},
month = {August}
}
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "QBase"
uuid = "e52e8ede-12bf-4731-8af7-b01f6064cb11"
authors = ["Brian Doolittle <brian.d.doolittle@gmail.com> and contributors"]
version = "0.1.3"
version = "0.2.0"

[deps]
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
*A base library for quantum information.*

[![Latest](https://img.shields.io/badge/docs-latest-blue.svg)](https://ChitambarLab.github.io/QBase.jl/dev)
[![Build Status](https://travis-ci.com/ChitambarLab/QBase.jl.svg?branch=master)](https://travis-ci.com/ChitambarLab/QBase.jl)
[![Test Status](https://github.com/ChitambarLab/QBase.jl/actions/workflows/run_tests.yml/badge.svg?branch=main)](https://github.com/ChitambarLab/QBase.jl/actions/workflows/run_tests.yml)
[![Coverage](https://codecov.io/gh/ChitambarLab/QBase.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/chitambarlab/QBase.jl)
[![Coverage Status](https://coveralls.io/repos/github/ChitambarLab/QBase.jl/badge.svg?branch=master)](https://coveralls.io/github/ChitambarLab/QBase.jl?branch=master)

## Features:
1. Types and constructors for representing quantum states and operators.
Expand Down
20 changes: 10 additions & 10 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ makedocs(;
),
pages=[
"Home" => "index.md",
"User Guide" => "user_guide.md",
"Exports" => "exports.md",
"Modules" => [
"States" => "submodules/States.md",
"Unitaries" => "submodules/Unitaries.md",
"Observables" => "submodules/Observables.md",
"Channels" => "submodules/Channels.md",
"Information" => "submodules/Information.md",
"QMath" => "submodules/QMath.md",
],
"Tutorial" => "tutorial.md",
"Bras and Kets" => "brakets.md",
"Operators" => "operators.md",
"States" => "states.md",
"Evolution" => "evolution.md",
"Measurements" => "measurements.md",
"Probabilities" => "probabilities.md",
"Information Theory" => "information_theory.md",
"Math Utilities" => "math_utilities.md",
],
)

deploydocs(;
repo="github.com/ChitambarLab/QBase.jl",
devbranch = "main",
)
60 changes: 60 additions & 0 deletions docs/src/brakets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
```@meta
CurrentModule = QBase
```
# Bras and Kets

In bra-ket notation, vectors on a complex-valued Hilbert space are used to represent
quantum states and operations.
A column vector ``|\psi\rangle`` is referred to as a **ket** whereas a row vector
``\langle \psi|`` is referred to as a **bra**.
Bras and kets are dual to each other via the adjoint operation.
That is, ``\langle\psi| = |\psi\rangle^{\dagger}`` and ``|\psi\rangle = \langle\psi|^{\dagger}``.

Quantum systems behave probabilistically under observation, hence quantum mechanics
is used to construct probability distributions which describe the behavior of quantum
systems.
For this reason, bras and kets must be normalized such that ``\langle\psi|\psi\rangle = 1`` holds true.
Here ``\langle \cdot | \cdot \rangle`` denotes the inner product (dot product) between bra and ket.
These constraints are checked with the following method.

```@docs
is_braket
```

## Bra-Ket Types

```@docs
Ket
Bra
```

## Bra-Ket Algebra

```@docs
*(ket :: Ket{<:Number}, bra :: Bra{<:Number})
adjoint(ket :: Ket{<:Number})
kron(kets :: Vararg{Ket{<:Number}}; atol=ATOL)
```

## Ket Constructors

QBase.jl provides a catalog for constructing various `Ket`s.
To construct similar `Bra`s you must manually convert the `Ket` to a `Bra` using
either [`adjoint(::Ket)`](@ref) or [`Bra(::Ket)`](@ref).

### Ket Singlets
```@docs
bloch_qubit_ket
```

### Ket Ensembles
```@docs
computational_basis_kets
bell_kets
generalized_bell_kets
mirror_symmetric_qubit_kets
planar_symmetric_qubit_kets
trine_qubit_kets
sic_qubit_kets
bb84_qubit_kets
```
43 changes: 43 additions & 0 deletions docs/src/evolution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
```@meta
CurrentModule = QBase
```
# Evolution

```@docs
evolve
*(U :: Unitary, ket :: Ket)
```

## Unitaries

```@docs
Unitary
is_unitary
```

### Unitary Operations

```@docs
*(unitaries :: Vararg{Unitary}; atol=ATOL :: Float64)
kron(unitaries :: Vararg{Unitary}; atol=ATOL :: Float64)
adjoint(U :: Unitary)
```

### Unitary Constructors

```@docs
σI
σx
σy
σz
qubit_rotation
random_unitary
```

## Channels

```@docs
replacer_channel
depolarizing_channel
erasure_channel
```
12 changes: 0 additions & 12 deletions docs/src/exports.md

This file was deleted.

43 changes: 34 additions & 9 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,44 @@
```@meta
CurrentModule = QBase
```

# QBase.jl

*A base library for quantum information.*

!!! note "Alpha Version"
Breaking changes will be made in future commits.

## Features:
1. Types and constructors for representing quantum states and operators.
2. Methods for evolving quantum systems and performing quantum measurements.
3. Methods for computing information-theoretic quantities.
4. Mathematics utilities to support quantum calculations.
Your thoughts and opinions are valued and will help improve this software. To
provide feedback or make feature requests, please contact [brian.d.doolittle@gmail.com](mailto:brian.d.doolittle@gmail.com).


## Features
1. Base quantum types with a flexible tolerance for numerical error.
2. Constructors for quantum state, measurement, and evolution operators.
3. Methods for evolving and measuring quantum systems.
4. Methods for calculating information-theoretic quantities.
5. Mathematics utilities that support quantum mechanics.

## Base Quantum Types

QBase.jl provides a general framework for representing finite quantum
systems and their dynamics.
Quantum mechanics is simply an application of linear algebra where particular
constraints are applied to the vectors and matrices involved in the representation
of quantum systems.
There are three core data structures used to represent quantum systems and their behavior:
1. **[Bras and Kets](@ref):** Row and column vectors defined on a complex-valued Hilbert space.
2. **[Operators](@ref):** Matrices defined on a complex-valued Hilbert space.
3. **[Probabilities](@ref):** Real-valued vectors and matrices describing the probabilities of events.

Details regarding the definitions and constraints for each of these data structure
are provided in subsequent pages of this documentation.

Ideally, the constraints on quantum objects should be met exactly, however, numerical
errors are inherent to the computations involved.
Therefore, each type has an absolute tolerance parameter `atol` which specifies how
much error is allowed before the quantum object is deemed invalid.
By default, the `atol=1e-7` and is stored in the constant `QBase.ATOL`.
This tolerance is sufficient for most tasks, however, it can easily be relaxed or
tightened as needed.

## Citing

Expand All @@ -33,6 +58,6 @@ Urbana-Champaign. Funding was provided by NSF Award 1914440.
## Contents

```@contents
Pages = ["user_guide.md", "exports.md", "submodules/States.md", "submodules/Unitaries.md", "submodules/Observables.md", "submodules/Channels.md", "submodules/Information.md", "submodules/QMath.md"]
Pages = ["base_types.md", "states.md", "evolution.md", "measurement.md", "informmation.md", "math_utilities.md", "examples.md"]
Depth = 1
```
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
```@meta
CurrentModule = QBase.Information
```
# Information

```@docs
Information
CurrentModule = QBase
```
# Information Theory

## Entropy
```@docs
Expand All @@ -18,7 +14,6 @@ conditional_entropy
## Information
```@docs
holevo_bound
holevo_information
mutual_information
```

Expand Down
35 changes: 20 additions & 15 deletions docs/src/submodules/QMath.md → docs/src/math_utilities.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,45 @@
```@meta
CurrentModule = QMath
CurrentModule = QBase
```
# Math Utilities

# QMath
## Matrices

```@docs
QMath
partial_trace
n_product_id
computational_basis_vectors
```

## Matrices
## Validation Methods

```@docs
computational_basis_vectors
partial_trace
commutes
is_hermitian
is_positive_semidefinite
is_square
is_orthonormal_basis
is_complete
commutes
```

## Combinatorics

### Set Partitions
```@docs
stirling2
stirling2_partitions
stirling2_matrices
```

### Permutations
```@docs
permutation_matrices
n_choose_k_matrices
base_n_val
```

## Probability
### Combinations
```@docs
n_choose_k_matrices
```

```@docs
is_probability_distribution
is_conditional_distribution
Marginals
Conditionals
base_n_val
```
23 changes: 12 additions & 11 deletions docs/src/submodules/Observables.md → docs/src/measurements.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
```@meta
CurrentModule = QBase.Observables
CurrentModule = QBase
```
# Observables
# Measurements

```@docs
Observables
measure
Measurement
```

## Types
## Positive Operator-Valued Measures (POVM)

```@docs
AbstractPOVM
is_povm
is_povm_element
POVM
QubitPOVM
POVMel
```

## Constructors
### POVM Constructors

```@docs
mirror_symmetric_qubit_3povm
asymmetric_qubit_3povm
trine_qubit_povm
sic_qubit_povm
sqrt_povm
planar_symmetric_qubit_povm
sqrt_povm
naimark_dilation
```

## Quantum Measurement
## Projector-Valued Measures (PVM)

```@docs
kraus_operators
naimark_dilation
PVM
```
Loading

2 comments on commit 35ecdce

@bdoolittle
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/35227

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 35ecdce295876e4dc4ad4714f108e31a3da1340e
git push origin v0.2.0

Please sign in to comment.