weylchamber.perfect_entanglers module

Summary

Functions:

F_PE

Evaluate the Perfect-Entangler Functional

concurrence

Calculate the concurrence directly from the Weyl Chamber coordinates

make_PE_krotov_chi_constructor

Return a constructor for the χ's in a PE optimization.

project_to_PE

Project onto the boundary surface of the perfect entanglers

__all__: F_PE, concurrence, make_PE_krotov_chi_constructor, 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

Return type:

Tuple[float, float, float]

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
weylchamber.perfect_entanglers.F_PE(g1, g2, g3)[source]

Evaluate the Perfect-Entangler Functional

Return type:

float

Example

>>> import qutip
>>> from weylchamber.local_invariants import g1g2g3
>>> "%.1f" % F_PE(*g1g2g3(qutip.core.gates.cnot()))
'0.0'
>>> "%.1f" % F_PE(*g1g2g3(qutip.identity([2, 2])))
'2.0'
weylchamber.perfect_entanglers.concurrence(c1, c2, c3)[source]

Calculate the concurrence directly from the Weyl Chamber coordinates

Return type:

float

Example

>>> import qutip
>>> from weylchamber.coordinates import c1c2c3
>>> '%.1f' % concurrence(*c1c2c3(qutip.core.gates.swap()))
'0.0'
>>> '%.1f' % concurrence(*c1c2c3(qutip.core.gates.cnot()))
'1.0'
>>> '%.1f' % concurrence(*c1c2c3(qutip.identity([2, 2])))
'0.0'
weylchamber.perfect_entanglers.make_PE_krotov_chi_constructor(canonical_basis, unitarity_weight=0)[source]

Return a constructor for the χ’s in a PE optimization.

Return a chi_constructor that determines the boundary condition of the backwards propagation in an optimization towards a perfect entangler in Krotov’s method, based on the foward-propagtion of the Bell states. In detail, the function returns a callable function that calculates

\[\ket{\chi_{i}} = \frac{\partial F_{PE}}{\partial \bra{\phi_i}} \Bigg|_{\ket{\phi_{i}(T)}}\]

for all \(i\) with \(\ket{\phi_{0}(T)}, ..., \ket{\phi_{3}(T)}\) the forward propagated Bell states at final time \(T\), cf. Eq. (33b) in Ref. [1]. \(F_{PE}\) is the perfect-entangler functional F_PE(). For the details of the derivative see Appendix G in Ref. [2].

References:

[1] M. H. Goerz, et al., Phys. Rev. A 91, 062307 (2015)

[2] M. H. Goerz, Optimizing Robust Quantum Gates in Open Quantum Systems. PhD thesis, University of Kassel, 2015

Parameters:
  • canonical_basis (list[qutip.Qobj]) – A list of four basis states that define the canonical basis \(\ket{00}\), \(\ket{01}\), \(\ket{10}\), and \(\ket{11}\) of the logical subspace.

  • unitarity_weight (float) – A weight in [0, 1] that determines how much emphasis is placed on maintaining population in the logical subspace.

Returns:

a function chi_constructor(fw_states_T, **kwargs) that receives the result of a foward propagation of the Bell states (obtained from canonical_basis via weylchamber.gates.bell_basis()), and returns a list of statex \(\ket{\chi_{i}}\) that are the boundary condition for the backward propagation in Krotov’s method. Positional arguments beyond fw_states_T are ignored.

Return type:

callable