gates.ZZ¶
-
class
zyglrox.core.gates.
ZZ
(wires: List[int], value: List[float] = None, conjugate=False, name=None, **kwargs)¶ Gate that implements a conditional rotation Ising ZZ spin interaction.
\[\text{ZZ}(\theta) = \exp(-i\theta\sigma^z \otimes \sigma_z/2) = \cos(\theta/2) \: I + i \sin(-\theta/2) \sigma^z \otimes \sigma_z\]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