photonic_circuit_solver.supplementalfuncs

Adding test and utility functions built by Tarek Razzaz. Almost all functions require additional optional packages beyond just NumPy

Functions

Rx(target, theta)

Apply an RZ gate via SymPy (requires SymPy)

Ry(target, theta)

Apply an RZ gate via SymPy (requires SymPy)

Rz(target, theta)

Apply an RZ gate via SymPy (requires SymPy)

apply(state[, operation, dp])

Simplifies an expression describing a SymPy statevector

dephase(state)

Removes the global phase from a SymPy statevector by dividing by the phase of the first component (Requires SymPy)

tensor(state1, state2)

Computes the tensor product of two SymPy statevectors (not fully tested) (requires SymPy)

Classes

Graph(edges)

This is a class that encodes graphs, and contains a few convenient functions (most useful methods require optional packages)