Gates
The Qiskit QRyd Provider extends Qiskit with two-qubit gates that are specific to the Rydberg platform.
- class qiskit_qryd_provider.PCZGate(label=None)[source]
Implements the phase-shifted controlled-Z gate (PCZ).
The PCZ gate is the controlled-Z gate up to single-qubit phase gates. It can be realized by the Rydberg platform in multiple ways [1, 2, 3].
Unitary matrix representation:
\[\begin{split}PCZ = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & e^{i\theta} & 0 & 0 \\ 0 & 0 & e^{i\theta} & 0 \\ 0 & 0 & 0 & e^{i(2\theta-\pi)} \end{pmatrix}\end{split}\]The phase shift \(\theta\) has the default value 2.13, as calculated for experimentally realistic parameters [2]. It can be modified before using the
QRydProvider
via:from qiskit_qryd_provider import PCZGate PCZGate.set_theta(1.234) assert PCZGate.get_theta() == 1.234
- classmethod get_theta()[source]
Get the phase shift of the gate.
- Return type:
- Returns:
Angle of the phase shift.
- classmethod set_theta(theta)[source]
Set the phase shift of the gate.
Note that after setting the phase shift to a new value, an updated decomposition of the PCZ gate is stored to Qiskit’s SessionEquivalenceLibrary.
- to_kraus()[source]
Return the Kraus representation of the gate.
- Raises:
NotImplementedError – If the Kraus representation is not set.
- Return type:
- Returns:
An instruction encapsulating the Kraus representation.
- class qiskit_qryd_provider.PCPGate(lam, label=None)[source]
Implements the phase-shifted controlled-phase gate (PCP).
This class implements an idealized version of a controlled-phase gate as it can potentially be realized by the Rydberg platform. Similarly to the
PCZGate
, the gate is hereby only realized up to single-qubit phase gates. The phase shift \(\theta\) depends on the phase \(\lambda\) of the gate.Unitary matrix representation:
\[\begin{split}PCP = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & e^{i\theta(\lambda)} & 0 & 0 \\ 0 & 0 & e^{i\theta(\lambda)} & 0 \\ 0 & 0 & 0 & e^{i(2\theta(\lambda)+\lambda)} \end{pmatrix}\end{split}\]Note that the \(\lambda\)-dependence that is implemented in this class is only accurate for \(\lambda \leq \pi\).
from qiskit_qryd_provider import PCPGate import numpy as np assert np.round(PCPGate.get_theta(np.pi), 2) == 2.13
- to_kraus()[source]
Return the Kraus representation of the gate.
- Raises:
NotImplementedError – If the Kraus representation is not set.
- Return type:
- Returns:
An instruction encapsulating the Kraus representation.