qml.ops.op_math¶
This module contains classes and functions for Operator arithmetic.
Constructor Functions¶
|
Create the adjoint of an Operator or a function that applies the adjoint of the provided function. |
|
Create a method that applies a controlled version of the provided op. |
|
Quantum-compatible if-else conditionals — condition quantum operations on parameters such as the results of mid-circuit qubit measurements. |
|
Take the exponential of an Operator times a coefficient. |
|
Construct an operator which is the sum of the given operators. |
|
Raise an Operator to a power. |
|
Construct an operator which represents the generalized product of the operators provided. |
|
Construct an operator which is the scalar product of the given scalar and operator provided. |
Symbolic Classes¶
|
The Adjoint of an operator. |
|
A base class for operators that are composed of other operators. |
|
A Conditional Operation. |
|
Symbolic operator denoting a controlled operator. |
|
Operation-specific methods and properties for the |
|
Create an exponential operator that defines a generator, of the form \(e^{-ix\hat{G}}\) |
|
A symbolic operator representing the exponential of a operator. |
|
Operator representing a linear combination of operators. |
|
Symbolic operator denoting an operator raised to a power. |
|
Symbolic operator representing the product of operators. |
|
Symbolic operator representing the sum of operators. |
|
Arithmetic operator representing the scalar product of an operator with the given scalar. |
|
Developer-facing base class for single-operator symbolic operators. |
|
Developer-facing base class for single-operator symbolic operators that contain a scalar coefficient. |
Controlled Operator Classes¶
|
Apply an arbitrary fixed unitary to |
|
The controlled-Y operator |
|
The controlled-Z operator |
|
The controlled-Hadamard operator |
|
CCZ (controlled-controlled-Z) gate. |
|
The controlled-swap operator |
|
The controlled-NOT operator |
|
Toffoli (controlled-controlled-X) gate. |
|
Apply a Pauli X gate controlled on an arbitrary computational basis state. |
|
The controlled-RX operator |
|
The controlled-RY operator |
|
The controlled-RZ operator |
|
The controlled-Rot operator |
|
A qubit controlled phase shift. |
Decompositions¶
|
Decompose a one-qubit unitary \(U\) in terms of elementary operations. |
|
Decompose a two-qubit unitary \(U\) in terms of elementary operations. |
|
Approximate an arbitrary single-qubit gate in the Clifford+T basis using the Solovay-Kitaev algorithm. |
Control Decompositions¶
|
Decompose the controlled version of a target single-qubit operation |
|
Decompose the controlled version of a target single-qubit operation |