LogicalQ.Library.Gates
Attributes
Classes
A parametric 2-qubit \(Z \otimes Z\) interaction (rotation about ZZ). |
Functions
|
|
|
|
|
Module Contents
- LogicalQ.Library.Gates.UGate
- class LogicalQ.Library.Gates.ZZGate(label=None)
Bases:
qiskit.circuit.library.RZZGateA parametric 2-qubit \(Z \otimes Z\) interaction (rotation about ZZ).
This gate is symmetric, and is maximally entangling at \(\theta = \pi/2\).
Can be applied to a
QuantumCircuitwith therzz()method.Circuit Symbol:
q_0: ───■──── │zz(θ) q_1: ───■────Matrix Representation:
\[ \begin{align}\begin{aligned}\newcommand{\rotationangle}{\frac{\theta}{2}}\\\begin{split}R_{ZZ}(\theta) = \exp\left(-i \rotationangle Z{\otimes}Z\right) = \begin{pmatrix} e^{-i \rotationangle} & 0 & 0 & 0 \\ 0 & e^{i \rotationangle} & 0 & 0 \\ 0 & 0 & e^{i \rotationangle} & 0 \\ 0 & 0 & 0 & e^{-i \rotationangle} \end{pmatrix}\end{split}\end{aligned}\end{align} \]This is a direct sum of RZ rotations, so this gate is equivalent to a uniformly controlled (multiplexed) RZ gate:
\[\begin{split}R_{ZZ}(\theta) = \begin{pmatrix} RZ(\theta) & 0 \\ 0 & RZ(-\theta) \end{pmatrix}\end{split}\]Examples:
\[R_{ZZ}(\theta = 0) = I\]\[R_{ZZ}(\theta = 2\pi) = -I\]\[R_{ZZ}(\theta = \pi) = - i Z \otimes Z\]\[\begin{split}R_{ZZ}\left(\theta = \frac{\pi}{2}\right) = \frac{1}{\sqrt{2}} \begin{pmatrix} 1-i & 0 & 0 & 0 \\ 0 & 1+i & 0 & 0 \\ 0 & 0 & 1+i & 0 \\ 0 & 0 & 0 & 1-i \end{pmatrix}\end{split}\]- _standard_gate = None
- name = 'zz'
Return the name.
- __eq__(other)
Two instructions are the same if they have the same name, same dimensions, and same params.
- Parameters:
other (instruction) – other instruction
- Returns:
are self and other equal.
- Return type:
bool
- LogicalQ.Library.Gates.zzgate
- LogicalQ.Library.Gates.ZZGate_def
- LogicalQ.Library.Gates.gates
- LogicalQ.Library.Gates.string_to_gate_class(_gate_string)
- LogicalQ.Library.Gates.clifford_gates
- LogicalQ.Library.Gates.clifford_gates_1q
- LogicalQ.Library.Gates.pauli_gates
- LogicalQ.Library.Gates.gates_1q
- LogicalQ.Library.Gates.gates_2q
- LogicalQ.Library.Gates.gate_sets
- LogicalQ.Library.Gates.string_to_gate_set(_gate_set_string)
- LogicalQ.Library.Gates.get_num_params(gate_class)