Skip to content

gecrooks/qf-diamond-norm

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

QuantumFlow Diamond Norm

Gavin E. Crooks (2020)

Build Status Documentation Status

Source

Calculation of the diamond norm between two completely positive trace-preserving (CPTP) superoperators, using the QuantumFlow package

The calculation uses the simplified semidefinite program of Watrous arXiv:0901.4709 [J. Watrous, Theory of Computing 5, 11, pp. 217-238 (2009)]

Kudos: Based on MatLab code written by Marcus P. da Silva

Installation

Note: Diamond norm requires that the "cvxpy" package (and dependencies) be fully installed. Installing cvxpy via pip does not correctly install all the necessary packages.

$ conda install -c conda-forge cvxpy
$ git clone https://github.com/gecrooks/qf_diamond_norm.git
$ cd qf_diamond_norm
$ pip install -e .

Example

    > import quantumflow as qf
    > from qf_diamond_norm import diamond_norm
    > chan0 = qf.random_channel([0, 1, 2]) # 3-qubit channel
    > chan1 = qf.random_channel([0, 1, 2])
    > dn = diamond_norm(chan0, chan1)
    > print(dn)

About

The diamond norm between two completely positive trace-preserving (CPTP) superoperators

Topics

Resources

License

Stars

Watchers

Forks