weylchamber.perfect_entanglers module

Summary

Functions:

F_PE Evaluate the Perfect-Entangler Functional
concurrence Calculate the concurrence directly from the Weyl Chamber coordinates
project_to_PE Project onto the boundary surface of the perfect entanglers

__all__: F_PE, concurrence, project_to_PE

Reference

weylchamber.perfect_entanglers.project_to_PE(c1, c2, c3, check_weyl=True)[source]

Project onto the boundary surface of the perfect entanglers

Return new tuple (c1’, c2’, c3’) obtained by projecting the given input point (c1, c2, c3) onto the closest boundary of the perfect entanglers polyhedron. If the input point already is a perfect entangler, it will be returned unchanged

Example

>>> from weylchamber.visualize import WeylChamber
>>> print("%.2f, %.2f, %.2f" % tuple(project_to_PE(*WeylChamber.A3)))
0.50, 0.25, 0.25
>>> print("%.3f, %.3f, %.3f" % tuple(project_to_PE(0.5, 0.5, 0.25)))
0.500, 0.375, 0.125
>>> print("%.3f, %.3f, %.3f" % tuple(project_to_PE(0.25, 0, 0)))
0.375, 0.125, 0.000
>>> print("%.3f, %.3f, %.3f" % tuple(project_to_PE(0.75, 0, 0)))
0.625, 0.125, 0.000
>>> print("%.3f, %.3f, %.3f" % tuple(project_to_PE(0.3125, 0.0625, 0.01)))
0.375, 0.125, 0.010
>>> print("%.1f, %.1f, %.1f" % tuple(project_to_PE(0.5, 0, 0)))
0.5, 0.0, 0.0
>>> print("%.1f, %.1f, %.1f" % tuple(project_to_PE(0.5, 0.2, 0.2)))
0.5, 0.2, 0.2
>>> try:
...     project_to_PE(1.0, 0.5, 0)
... except ValueError as e:
...     print(e)
(1, 0.5, 0) is not in the Weyl chamber
Return type:Tuple[float, float, float]
weylchamber.perfect_entanglers.concurrence(c1, c2, c3)[source]

Calculate the concurrence directly from the Weyl Chamber coordinates

Example

>>> import qutip
>>> from weylchamber.coordinates import c1c2c3
>>> '%.1f' % concurrence(*c1c2c3(qutip.gates.swap()))
'0.0'
>>> '%.1f' % concurrence(*c1c2c3(qutip.gates.cnot()))
'1.0'
>>> '%.1f' % concurrence(*c1c2c3(qutip.gates.identity([2, 2])))
'0.0'
Return type:float
weylchamber.perfect_entanglers.F_PE(g1, g2, g3)[source]

Evaluate the Perfect-Entangler Functional

Example

>>> import qutip
>>> from weylchamber.local_invariants import g1g2g3
>>> "%.1f" % F_PE(*g1g2g3(qutip.gates.cnot()))
'0.0'
>>> "%.1f" % F_PE(*g1g2g3(qutip.gates.identity([2, 2])))
'2.0'
Return type:float