gates.CR3

class zyglrox.core.gates.CR3(wires: List[int], value: List[float] = None, conjugate=False, name=None, **kwargs)

Gate that implements a conditional rotation around an arbitrary spin axis.

\[\text{C}R_3(\theta,\phi, \gamma) = |0\rangle \langle 0| \otimes I + |1\rangle \langle 1| \otimes R_3(\theta,\phi, \gamma)\]

The Gate class performs unitary quantum gates on the tensor subspace of a wave function

Args:
nparams (int):

Number of parameters of gate.

wires (list):

List of numbers on which the gate is acting.

value (None of ndarray):

Intial value of parameterized gate in 1D numpy array. When combined with setting trainable=False, this will create a static gate that cannot be altered during any optimization.

name (str):

Name of the gate.

Keyword Arguments
trainable (bool):

Boolean that indicates whether the paramaters of this gate are trainable.

Returns (inplace):

None

build(input_shape)

Called once from __call__, when we know the shapes of inputs and dtype. Should initialize the trainable variables, and call the super’s build().

Args:
input_shape (list):

Input shapes of the incoming tensor.

call(inputs: tensorflow.python.framework.ops.Tensor, **kwargs) → tensorflow.python.framework.ops.Tensor

Gate Logic