Commit f92d629e authored by Guillaume Sagnol's avatar Guillaume Sagnol

Merge branch 'master_github'

parents 2aca3bd5 675c5acc
......@@ -19,7 +19,7 @@ see more about PICOS in the :ref:`introduction <intro>`.
The latest version can be downloaded :ref:`here <download>`,
and can be installed by following :ref:`these instructions <requirements>`.
Alternatively, you can clone the latest development version from **github**:
``$ git clone https://github.com/gsagnol/picos.git``. If you whish to collaborate on PICOS,
``$ git clone https://github.com/gsagnol/picos.git``. If you wish to collaborate on PICOS,
please make a pull request on `github <http://github.com/gsagnol/picos>`_.
This documentation contains a :ref:`tutorial <tuto>` and some :ref:`examples <examples>`,
......@@ -32,6 +32,8 @@ on every function of PICOS.
**News**
* TODOC for next release: partial_trace, add in summary
* 15 Apr. 15: **Picos** :ref:`1.1.0 <download>` **Released**
* PICOS is now compatible with **python 3+** (and remains compatible with python 2.6+). Many thanks to `Sergio Callegari <http://www.unibo.it/faculty/sergio.callegari>`_ for this compatibility layer ! If you plan to work with PICOS and python3, think to install the most recent version of your solver (Mosek, Cplex, Gurobi, or Cvxopt). SCIP is not supported in python3+ at this point (but remains supported with python 2.x).
......
......@@ -7,4 +7,4 @@
===============
.. automodule:: picos.tools
:members: available_solvers, ball, detrootn, diag, diag_vect, eval_dict, flow_Constraint, geomean, import_cbf, lambda_max, lambda_min, lowtri, lse, new_param, norm, partial_transpose, _retrieve_matrix, simplex, sum, sum_k_largest, sum_k_largest_lambda, sum_k_smallest, sum_k_smallest_lambda, trace, tracepow, truncated_simplex
\ No newline at end of file
:members: available_solvers, ball, detrootn, diag, diag_vect, eval_dict, flow_Constraint, geomean, import_cbf, lambda_max, lambda_min, lowtri, lse, new_param, norm, partial_trace, partial_transpose, _retrieve_matrix, simplex, sum, sum_k_largest, sum_k_largest_lambda, sum_k_smallest, sum_k_smallest_lambda, trace, tracepow, truncated_simplex
\ No newline at end of file
......@@ -28,7 +28,7 @@
from .problem import *
from .expression import *
from .constraint import *
from .tools import sum,lse,new_param,diag,diag_vect,geomean,norm,tracepow,trace,detrootn,QuadAsSocpError,NotAppropriateSolverError,NonConvexError,flow_Constraint,ball,simplex,truncated_simplex,partial_transpose,import_cbf,sum_k_largest,sum_k_largest_lambda,lambda_max,sum_k_smallest,sum_k_smallest_lambda,lambda_min
from .tools import sum,lse,new_param,diag,diag_vect,geomean,norm,tracepow,trace,detrootn,QuadAsSocpError,NotAppropriateSolverError,NonConvexError,flow_Constraint,ball,simplex,truncated_simplex,partial_trace,partial_transpose,import_cbf,sum_k_largest,sum_k_largest_lambda,lambda_max,sum_k_smallest,sum_k_smallest_lambda,lambda_min
__all__=['tools','constraint','expression','problem']
......
......@@ -547,15 +547,13 @@ def partial_transpose(exp,dim = None):
"""
return exp.partial_transpose(dim)
def partial_transpose(X,k=1,dim = None):
r"""Partial trace of an Affine Expression,
with respect to the ``k``th subsystem for a tensor product of dimensions ``dim``.
def partial_trace(X,k=1,dim = None):
r"""Partial trace of an Affine Expression, with respect to the ``k`` th subsystem for a tensor product of dimensions ``dim``.
If ``X`` is matrix
:class:`AffinExp <picos.AffinExp>`
that can be written as :math:`X = A_0 \otimes \cdots \otimes A_{n-1}`
for some *square matrices* :math:`A_0,\ldots,A[n-1]`
of respective size ``dim[0]``, ..., ``dim[n-1]``,
for some **square matrices** :math:`A_0,\ldots,A_{n-1}`
of respective size ``dim[0] x dim[0]``, ... , ``dim[n-1] x dim[n-1]``,
this function returns the matrix
:math:`Y = \operatorname{trace}(A_k)\quad A_0 \otimes \cdots A_{k-1} \otimes A_{k+1} \otimes \cdots \otimes A_{n-1}`.
......@@ -564,7 +562,7 @@ def partial_transpose(X,k=1,dim = None):
with blocks of size :math:`n \times n`.
**Example:**
#TODO !!!
>>> import picos as pic
>>> import cvxopt as cvx
>>> P = pic.Problem()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment