piel.integration.sax_thewalrus
#
Module Contents#
Functions#
|
The permanent of a unitary is used to determine the state probability of combinatorial Gaussian boson samping systems. |
|
The permanent of a unitary is used to determine the state probability of combinatorial Gaussian boson samping systems. |
- unitary_permanent(unitary_matrix: jax.numpy.ndarray) tuple [source]#
The permanent of a unitary is used to determine the state probability of combinatorial Gaussian boson samping systems.
thewalrus
Ryser’s algorithm permananet implementation is described here: https://the-walrus.readthedocs.io/en/latest/gallery/permanent_tutorial.htmlNote that this function needs to be as optimised as possible, so we need to minimise our computational complexity of our operation.
# TODO implement validation # TODO maybe implement subroutine if computation is taking forever. # TODO why two outputs? Understand this properly later.
- Parameters:
unitary_permanent (np.ndarray) – The unitary matrix.
- Returns:
The circuit permanent and the time it took to compute it.
- Return type:
tuple
- sax_circuit_permanent(sax_input: sax.SType) tuple [source]#
The permanent of a unitary is used to determine the state probability of combinatorial Gaussian boson samping systems.
thewalrus
Ryser’s algorithm permananet implementation is described here: https://the-walrus.readthedocs.io/en/latest/gallery/permanent_tutorial.html# TODO maybe implement subroutine if computation is taking forever.
- Parameters:
sax_input (sax.SType) – The sax S-parameter dictionary.
- Returns:
The circuit permanent and the time it took to compute it.
- Return type:
tuple