View source on GitHub |
Plots the interaction coefficients of many two-qubit operations.
cirq.scatter_plot_normalized_kak_interaction_coefficients(
interactions: Iterable[Union[np.ndarray, 'cirq.SupportsUnitary', 'KakDecomposition']],
*,
include_frame: bool = True,
ax: Optional[mplot3d.axes3d.Axes3D] = None,
**kwargs
)
Plots | |
---|---|
A point for the (x, y, z) normalized interaction coefficients of
each interaction from the given interactions. The (x, y, z) coordinates
are normalized so that the maximum value is at 1 instead of at pi/4.
If
The wireframe includes lines along the surface of the space at z=0. The space is a prism with the identity at the origin, a crease along y=z=0 leading to the CZ/CNOT at x=1 and a vertical triangular face that contains the iswap at x=y=1,z=0 and the swap at x=y=z=1:
(x=0,y=0,z=0) I---------------CZ (x=1,y=0,z=0) |
Args | |
---|---|
interactions
|
An iterable of two qubit unitary interactions. Each
interaction can be specified as a raw 4x4 unitary matrix, or an
object with a 4x4 unitary matrix according to cirq.unitary (
(e.g. cirq.CZ or a cirq.KakDecomposition or a cirq.Circuit
over two qubits).
|
include_frame
|
Determines whether or not to draw the kak space
wireframe. Defaults to True .
|
ax
|
A matplotlib 3d axes object to plot into. If not specified, a new figure is created, plotted, and shown. |
**kwargs
|
Arguments forwarded into the call to scatter that plots the
points. Working arguments include color c='blue' , scale s=2 ,
labelling label="theta=pi/4" , etc. For reference see the
matplotlib.pyplot.scatter documentation:
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.scatter.html
|
Returns | |
---|---|
The matplotlib 3d axes object that was plotted into. |
Examples | |
---|---|
|