quantify_scheduler.operations.gate_library
Standard gateset for use with the quantify_scheduler.
Module Contents
Classes
A single qubit rotation around an axis in the equator of the Bloch sphere. 

A single qubit rotation of 180 degrees around the Xaxis. 

A single qubit rotation of 90 degrees around the Xaxis. 

A single qubit rotation of 180 degrees around the Yaxis. 

A single qubit rotation of 90 degrees around the Yaxis. 

ConditionalNOT gate, a common entangling gate. 

Conditionalphase gate, a common entangling gate. 

Reset a qubit to the \(0\rangle\) state. 

A projective measurement in the Zbasis. 
 class Rxy(theta: float, phi: float, qubit: str, data: Optional[dict] = None)[source]
Bases:
quantify_scheduler.operations.operation.Operation
A single qubit rotation around an axis in the equator of the Bloch sphere.
This operation can be represented by the following unitary as defined in https://doi.org/10.1109/TQE.2020.2965810:
\[\begin{split}\mathsf {R}_{xy} \left(\theta, \varphi\right) = \begin{bmatrix} \textrm {cos}(\theta /2) & ie^{i\varphi }\textrm {sin}(\theta /2) \\ ie^{i\varphi }\textrm {sin}(\theta /2) & \textrm {cos}(\theta /2) \end{bmatrix}\end{split}\]
 class X(qubit: str, data: Optional[dict] = None)[source]
Bases:
Rxy
A single qubit rotation of 180 degrees around the Xaxis.
This operation can be represented by the following unitary:
\[\begin{split}X = \sigma_x = \begin{bmatrix} 0 & 1 \\ 1 & 0 \\ \end{bmatrix}\end{split}\]
 class X90(qubit: str, data: Optional[dict] = None)[source]
Bases:
Rxy
A single qubit rotation of 90 degrees around the Xaxis.
 class Y(qubit: str, data: Optional[dict] = None)[source]
Bases:
Rxy
A single qubit rotation of 180 degrees around the Yaxis.
\[\begin{split}\mathsf Y = \sigma_y = \begin{bmatrix} 0 & i \\ i & 0 \end{bmatrix}\end{split}\]
 class Y90(qubit: str, data: Optional[dict] = None)[source]
Bases:
Rxy
A single qubit rotation of 90 degrees around the Yaxis.
 class CNOT(qC: str, qT: str, data: Optional[dict] = None)[source]
Bases:
quantify_scheduler.operations.operation.Operation
ConditionalNOT gate, a common entangling gate.
Performs an X gate on the target qubit qT conditional on the state of the control qubit qC.
This operation can be represented by the following unitary:
\[\begin{split}\mathrm{CNOT} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ \end{bmatrix}\end{split}\]
 class CZ(qC: str, qT: str, data: Optional[dict] = None)[source]
Bases:
quantify_scheduler.operations.operation.Operation
Conditionalphase gate, a common entangling gate.
Performs a Z gate on the target qubit qT conditional on the state of the control qubit qC.
This operation can be represented by the following unitary:
\[\begin{split}\mathrm{CZ} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}\end{split}\]
 class Reset(*qubits: str, data: Optional[dict] = None)[source]
Bases:
quantify_scheduler.operations.operation.Operation
Reset a qubit to the \(0\rangle\) state.
The Reset gate is an idle operation that is used to initialize one or more qubits.
Note
Strictly speaking this is not a gate as it can not be described by a unitary.
Examples
The operation can be used in several ways:
from quantify_scheduler.operations.gate_library import Reset reset_1 = Reset("q0") reset_2 = Reset("q1", "q2") reset_3 = Reset(*[f"q{i}" for i in range(3, 6)])
 class Measure(*qubits: str, acq_channel: Union[Tuple[int, Ellipsis], int] = None, acq_index: Union[Tuple[int, Ellipsis], int] = None, acq_protocol: Literal[SSBIntegrationComplex, Trace, None] = None, bin_mode: quantify_scheduler.enums.BinMode = None, data: Optional[dict] = None)[source]
Bases:
quantify_scheduler.operations.operation.Operation
A projective measurement in the Zbasis.
Note
Strictly speaking this is not a gate as it can not be described by a unitary.