Deutsch’s prescription (D-CTCs)#

Functions#

dctc_violating(
input_respecting: mat | arr | QuantumState,
gate: mat | arr | QuantumGate,
systems_respecting: list[int],
systems_violating: list[int],
free_symbol: sym | str | None = None,
maximum_entropy: bool | None = None,
) mat | arr[source]#

Calculate the chronology-violating (CV) state according to the D-CTC prescription by computing fixed points of the map

(322)#\[\MapDCTCsCV_{\Unitary}[\StateCR,\StateCV] = \trace_\CR\bigl[\Unitary(\StateCR \otimes \StateCV)\Unitary^\dagger\bigr]\]

given the chronology-respecting (CR) input state input_respecting (\(\StateCR\)) and (unitary) interaction described by gate (\(\Unitary\)).

Parameters:
  • input_respecting (mat | arr | QuantumState) – The matrix representation of the chronology-respecting (CR) input state.

  • gate (mat | arr | QuantumGate) – The matrix representation of the gate describing the (unitary) interaction between the CR and CV systems.

  • systems_respecting (list[int]) – The numerical indices of the chronology-respecting (CR) subsystems.

  • systems_violating (list[int]) – The numerical indices of the chronology-violating (CV) subsystems.

  • free_symbol (sym | str) – The representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points. Defaults to "g".

  • maximum_entropy (bool) – Whether to, in the case of solution multiplicity, return the CV state that possesses the most (von Neumann) entropy, in accordance with Deutsch’s original prescription. If False, simply returns the ordinary (single or parametrized) solution. Defaults to False.

Returns:

mat | arr – The fixed-point solution(s) of the D-CTC CV map.

Note

Please note that this function in its current form is considered to be highly experimental.

dctc_respecting(
input_respecting: mat | arr | QuantumState,
input_violating: mat | arr | QuantumState,
gate: mat | arr | QuantumGate,
systems_respecting: list[int],
systems_violating: list[int],
) mat | arr[source]#

Calculate the chronology-respecting (CR) state according to the D-CTC prescription’s CR map

(323)#\[\MapDCTCsCR_{\Unitary}[\StateCR,\StateCV] = \trace_\CV\bigl[\Unitary(\StateCR \otimes \StateCV)\Unitary^\dagger\bigr]\]

given the chronology-respecting (CR) input state input_respecting (\(\StateCR\)), chronology-violating (CV) solution state input_violating (\(\StateCV\)), and (unitary) interaction described by gate (\(\Unitary\)).

Parameters:
  • input_respecting (mat | arr | QuantumState) – The matrix representation of the chronology-respecting (CR) input state.

  • input_violating (mat | arr | QuantumState) – The matrix representation of the chronology-violating (CR) solution state.

  • gate (mat | arr | QuantumGate) – The matrix representation of the gate describing the (unitary) interaction between the CR and CV systems.

  • systems_respecting (list[int]) – The numerical indices of the chronology-respecting (CR) subsystems.

  • systems_violating (list[int]) – The numerical indices of the chronology-violating (CV) subsystems.

Returns:

mat | arr – The solution(s) of the D-CTC CR map.

Class#

class DCTC(
*args,
free_symbol: sym | str | None = None,
maximum_entropy: bool | None = None,
**kwargs,
)[source]#

Bases: QuantumCTC

A subclass for creating closed timelike curves described by Deutsch’s prescription (D-CTCs) of quantum time travel.

This is built upon the QuantumCTC class, and so inherits all of its attributes, properties, and methods.

Parameters:
  • *args – Positional arguments, passed directly to the constructor __init__ of the superclass QuantumGate.

  • free_symbol (sym | str) – The representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points. Defaults to "g".

  • maximum_entropy (bool) – Whether to, in the case of solution multiplicity, return solutions that correspond to the maximally entropic CV state, in accordance with Deutsch’s original prescription. If False, simply returns the ordinary (single or parametrized) solution. Defaults to False.

  • **kwargs – Arbitrary keyword arguments, passed directly to the constructor __init__ of the superclass QuantumGate.

Examples

For usage examples, please see the superclass QuantumCTC.

Constructor argument properties#

property DCTC.free_symbol: sym | str#

The representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points.

property DCTC.maximum_entropy: bool#

Whether to, in the case of solution multiplicity, return solutions that correspond to the maximally entropic CV state, in accordance with Deutsch’s original prescription.

Methods#

DCTC.matrix(
numerical: bool | None = None,
array: bool | None = None,
) mat | arr[source]#

Compute the unprocessed matrix representation of the D-CTC chronology-respecting (CR) output state.

Parameters:
  • numerical (bool) – Whether to cast the matrix elements as floating-point values (True) (if possible) or exact values (False). Defaults to the value of self.numerical.

  • array (bool) – Whether to cast the matrix as a NumPy array (True) or SymPy matrix (False). Defaults to the value of self.array.

Returns:

mat | arr – The unprocessed matrix representation of the D-CTC CR output state.

DCTC.output(
numerical: bool | None = None,
array: bool | None = None,
substitutions: list[tuple[num | expr | str, num | expr | str]] | None = None,
simplify: bool | None = None,
conjugate: bool | None = None,
norm: bool | num | expr | str | None = None,
postprocess: bool | None = None,
free_symbol: sym | str | None = None,
maximum_entropy: bool | None = None,
) mat | arr[source]#

An alias for the output_respecting() method.

Useful for polymorphism.

Parameters:
  • numerical (bool) – Whether to cast the matrix elements as floating-point values (True) (if possible) or exact values (False). Defaults to the value of self.numerical.

  • array (bool) – Whether to cast the matrix as a NumPy array (True) or SymPy matrix (False). Defaults to the value of self.array.

  • substitutions (list[tuple[num | expr | str, num | expr | str]]) – Algebraic substitutions to be applied to the state. Defaults to the value of self.substitutions.

  • simplify (bool) – Whether to perform mathematical simplification on the state. Defaults to False.

  • conjugate (bool) – Whether to perform Hermitian conjugation on the state. Defaults to False.

  • norm (bool | num | expr | str) – The value to which the state is normalized. If True, normalizes to a value of \(1\). If False, does not normalize. Defaults to False.

  • postprocess (bool) – Whether to post-process the state (i.e., perform the circuit’s traces and postselections). Defaults to True.

  • free_symbol (str) – The string representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points. Defaults to the value of self.free_symbol.

  • maximum_entropy (bool) – Whether to, in the case of solution multiplicity, return the CR solution that corresponds to the maximally entropic CV state, in accordance with Deutsch’s original prescription. If False, simply returns the ordinary (single or parametrized) solution. Defaults to the value of self.maximum_entropy.

Returns:

mat | arr – The processed matrix representation of the D-CTC CR output state.

DCTC.output_violating(
numerical: bool | None = None,
array: bool | None = None,
substitutions: list[tuple[num | expr | str, num | expr | str]] | None = None,
simplify: bool | None = None,
conjugate: bool | None = None,
norm: bool | num | expr | str | None = None,
free_symbol: sym | str | None = None,
maximum_entropy: bool | None = None,
) mat | arr[source]#

Compute the processed matrix representation of the D-CTC chronology-violating (CV) state.

Parameters:
  • numerical (bool) – Whether to cast the matrix elements as floating-point values (True) (if possible) or exact values (False). Defaults to the value of self.numerical.

  • array (bool) – Whether to cast the matrix as a NumPy array (True) or SymPy matrix (False). Defaults to the value of self.array.

  • substitutions (list[tuple[num | expr | str, num | expr | str]]) – Algebraic substitutions to be applied to the state. Defaults to the value of self.substitutions.

  • simplify (bool) – Whether to perform mathematical simplification on the state. Defaults to False.

  • conjugate (bool) – Whether to perform Hermitian conjugation on the state. Defaults to False.

  • norm (bool | num | expr | str) – The value to which the state is normalized. If True, normalizes to a value of \(1\). If False, does not normalize. Defaults to False.

  • free_symbol (str) – The string representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points. Defaults to the value of self.free_symbol.

  • maximum_entropy (bool) – Whether to, in the case of solution multiplicity, return the CV state that possesses the most (von Neumann) entropy, in accordance with Deutsch’s original prescription. If False, simply returns the ordinary (single or parametrized) solution. Defaults to the value of self.maximum_entropy.

Returns:

mat | arr – The processed matrix representation of the D-CTC CV output state.

DCTC.output_respecting(
numerical: bool | None = None,
array: bool | None = None,
substitutions: list[tuple[num | expr | str, num | expr | str]] | None = None,
simplify: bool | None = None,
conjugate: bool | None = None,
norm: bool | num | expr | str | None = None,
postprocess: bool | None = None,
free_symbol: sym | str | None = None,
maximum_entropy: bool | None = None,
) mat | arr[source]#

Compute the matrix representation of the D-CTC chronology-respecting (CR) output state (including any post-processing, i.e., traces and postselections).

Parameters:
  • numerical (bool) – Whether to cast the matrix elements as floating-point values (True) (if possible) or exact values (False). Defaults to the value of self.numerical.

  • array (bool) – Whether to cast the matrix as a NumPy array (True) or SymPy matrix (False). Defaults to the value of self.array.

  • substitutions (list[tuple[num | expr | str, num | expr | str]]) – Algebraic substitutions to be applied to the state. Defaults to the value of self.substitutions.

  • simplify (bool) – Whether to perform mathematical simplification on the state. Defaults to False.

  • conjugate (bool) – Whether to perform Hermitian conjugation on the state. Defaults to False.

  • norm (bool | num | expr | str) – The value to which the state is normalized. If True, normalizes to a value of \(1\). If False, does not normalize. Defaults to False.

  • postprocess (bool) – Whether to post-process the state (i.e., perform the circuit’s traces and postselections). Defaults to True.

  • free_symbol (str) – The string representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points. Defaults to the value of self.free_symbol.

  • maximum_entropy (bool) – Whether to, in the case of solution multiplicity, return the CR solution that corresponds to the maximally entropic CV state, in accordance with Deutsch’s original prescription. If False, simply returns the ordinary (single or parametrized) solution. Defaults to the value of maximum_entropy.

Returns:

mat | arr – The processed matrix representation of the D-CTC CR output state.

DCTC.state_violating(
numerical: bool | None = None,
array: bool | None = None,
substitutions: list[tuple[num | expr | str, num | expr | str]] | None = None,
simplify: bool | None = None,
conjugate: bool | None = None,
norm: bool | num | expr | str | None = None,
label: str | None = None,
notation: str | None = None,
traces: list[int] | None = None,
debug: bool | None = None,
free_symbol: sym | str | None = None,
maximum_entropy: bool | None = None,
) QuantumState[source]#

Compute the D-CTC chronology-violating (CV) state as a QuantumState instance.

Parameters:
  • numerical (bool) – Whether to cast the state’s matrix elements as floating-point values (True) (if possible) or exact values (False). Defaults to the value of self.numerical.

  • array (bool) – Whether to cast the state’s matrix as a NumPy array (True) or SymPy matrix (False). Defaults to the value of self.array.

  • substitutions (list[tuple[num | expr | str, num | expr | str]]) – Algebraic substitutions to be applied to the state. Defaults to the value of self.substitutions.

  • simplify (bool) – Whether to perform mathematical simplification on the state before committing it to the matrix property. If False, does not simplify. Defaults to False.

  • conjugate (bool) – Whether to perform Hermitian conjugation on the state. If False, does not conjugate. Defaults to False.

  • norm (bool | num | expr | str) – The value to which the state is normalized. If True, normalizes to a value of \(1\). If False, does not normalize. Defaults to False.

  • label (str) – The unformatted string used to represent the state in mathematical expressions. Must have a non-zero length. Defaults to "ρ" (if form == "matrix") or "ψ" (if form == "vector").

  • notation (str) – The formatted string used to represent the state in mathematical expressions. When not None, overrides the value passed to label. Must have a non-zero length. Not intended to be set by the user in most cases. Defaults to None.

  • traces (list[int]) – A list of indices of the CV systems (relative to the entire circuit) on which to perform partial traces. Defaults to [].

  • free_symbol (str) – The string representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points. Defaults to the value of self.free_symbol.

  • maximum_entropy (bool) – Whether to, in the case of solution multiplicity, return the CV state that possesses the most (von Neumann) entropy, in accordance with Deutsch’s original prescription. If False, simply returns the ordinary (single or parametrized) solution. Defaults to the value of self.maximum_entropy.

  • debug (bool) – Whether to print the internal state (held in matrix) on change. If False, does not print. Defaults to False.

Returns:

QuantumState – The D-CTC CV output state as a QuantumState instance.

DCTC.state_respecting(
numerical: bool | None = None,
array: bool | None = None,
substitutions: list[tuple[num | expr | str, num | expr | str]] | None = None,
simplify: bool | None = None,
conjugate: bool | None = None,
norm: bool | num | expr | str | None = None,
label: str | None = None,
notation: str | None = None,
traces: list[int] | None = None,
postprocess: bool | None = None,
debug: bool | None = None,
free_symbol: sym | str | None = None,
maximum_entropy: bool | None = None,
) QuantumState[source]#

Compute the D-CTC chronology-respecting (CR) state as a QuantumState instance.

Parameters:
  • numerical (bool) – Whether to cast the state’s matrix elements as floating-point values (True) (if possible) or exact values (False). Defaults to the value of self.numerical.

  • array (bool) – Whether to cast the state’s matrix as a NumPy array (True) or SymPy matrix (False). Defaults to the value of self.array.

  • substitutions (list[tuple[num | expr | str, num | expr | str]]) – Algebraic substitutions to be applied to the state. Defaults to the value of self.substitutions.

  • simplify (bool) – Whether to perform mathematical simplification on the state before committing it to the matrix property. If False, does not simplify. Defaults to False.

  • conjugate (bool) – Whether to perform Hermitian conjugation on the state. If False, does not conjugate. Defaults to False.

  • norm (bool | num | expr | str) – The value to which the state is normalized. If True, normalizes to a value of \(1\). If False, does not normalize. Defaults to False.

  • label (str) – The unformatted string used to represent the state in mathematical expressions. Must have a non-zero length. Defaults to "ρ" (if form == "matrix") or "ψ" (if form == "vector").

  • notation (str) – The formatted string used to represent the state in mathematical expressions. When not None, overrides the value passed to label. Must have a non-zero length. Not intended to be set by the user in most cases. Defaults to None.

  • traces (list[int]) – A list of indices of the CR systems (relative to the entire circuit) on which to perform partial traces. Performed regardless of the value of postprocess. Defaults to [].

  • postprocess (bool) – Whether to post-process the state (i.e., perform the circuit’s traces and postselections). Defaults to True.

  • free_symbol (str) – The string representation of the algebraic symbol to be used as the free parameter in the case where the CV map has a multiplicity of fixed points. Defaults to the value of self.free_symbol.

  • maximum_entropy (bool) – Whether to, in the case of solution multiplicity, return the CR solution that corresponds to the maximally entropic CV state, in accordance with Deutsch’s original prescription. If False, simply returns the ordinary (single or parametrized) solution. Defaults to the value of self.maximum_entropy.

  • debug (bool) – Whether to print the internal state (held in matrix) on change. If False, does not print. Defaults to False.

Returns:

QuantumState – The D-CTC CR output state as a QuantumState instance.