Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
RYY.h
Go to the documentation of this file.
1 /*
2 Created on Fri Jun 26 14:13:26 2020
3 Copyright 2020 Peter Rakyta, Ph.D.
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 
17 @author: Peter Rakyta, Ph.D.
18 */
23 #ifndef RYY_H
24 #define RYY_H
25 
26 #include "Gate.h"
27 #include "matrix.h"
28 #include "matrix_real.h"
29 #define _USE_MATH_DEFINES
30 #include <math.h>
34 class RYY: public Gate {
35 
36 
37 public:
38 
42 RYY();
43 
49 RYY(int qbit_num_in, const std::vector<int>& target_qbits_in);
50 
54 ~RYY();
55 
57 Matrix gate_kernel(const Matrix_real& precomputed_sincos) override;
58 Matrix_float gate_kernel(const Matrix_real_float& precomputed_sincos) override;
59 Matrix inverse_gate_kernel(const Matrix_real& precomputed_sincos) override;
60 Matrix_float inverse_gate_kernel(const Matrix_real_float& precomputed_sincos) override;
61 Matrix derivative_kernel(const Matrix_real& precomputed_sincos, int param_idx) override;
62 Matrix_float derivative_kernel(const Matrix_real_float& precomputed_sincos, int param_idx) override;
63 void gate_kernel_to(const Matrix_real& precomputed_sincos, Matrix& output) override;
64 void gate_kernel_to(const Matrix_real_float& precomputed_sincos, Matrix_float& output) override;
65 void inverse_gate_kernel_to(const Matrix_real& precomputed_sincos, Matrix& output) override;
66 void inverse_gate_kernel_to(const Matrix_real_float& precomputed_sincos, Matrix_float& output) override;
67 void derivative_kernel_to(const Matrix_real& precomputed_sincos, int param_idx, Matrix& output) override;
68 void derivative_kernel_to(const Matrix_real_float& precomputed_sincos, int param_idx, Matrix_float& output) override;
69 
74 RYY* clone() override;
75 
76 
82 std::vector<double> get_parameter_multipliers() const override;
83 
84 };
85 #endif //RYY
void inverse_gate_kernel_to(const Matrix_real &precomputed_sincos, Matrix &output) override
Definition: RYY.cpp:134
RYY()
Nullary constructor of the class.
Definition: RYY.cpp:30
Header file for a class for the representation of general gate operations.
Class to store single-precision real arrays and properties.
Matrix inverse_gate_kernel(const Matrix_real &precomputed_sincos) override
Definition: RYY.cpp:96
A class representing a RYY gate.
Definition: RYY.h:34
void derivative_kernel_to(const Matrix_real &precomputed_sincos, int param_idx, Matrix &output) override
Definition: RYY.cpp:148
std::vector< double > get_parameter_multipliers() const override
Call to extract parameters from the parameter array corresponding to the circuit, in which the gate i...
Definition: RYY.cpp:187
void gate_kernel_to(const Matrix_real &precomputed_sincos, Matrix &output) override
Definition: RYY.cpp:120
Header file of complex array storage array with automatic and thread safe reference counting...
Matrix gate_kernel(const Matrix_real &precomputed_sincos) override
Build and return the 4x4 RYY unitary for the given parameter.
Definition: RYY.cpp:84
Matrix derivative_kernel(const Matrix_real &precomputed_sincos, int param_idx) override
Definition: RYY.cpp:108
Double-precision complex matrix (float64).
Definition: matrix.h:38
~RYY()
Destructor of the class.
Definition: RYY.cpp:80
Single-precision complex matrix (float32).
Definition: matrix_float.h:41
RYY * clone() override
Call to create a clone of the present class.
Definition: RYY.cpp:175
Base class for the representation of general gate operations.
Definition: Gate.h:86
Class to store data of complex arrays and its properties.
Definition: matrix_real.h:41