Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Z.h
Go to the documentation of this file.
1 #ifndef Z_H
2 #define Z_H
3 
4 #include "U3.h"
5 #include "matrix.h"
6 #include "matrix_real.h"
7 #include "matrix_real_float.h"
8 #include "matrix_float.h"
9 #include <math.h>
10 
11 class Z : public U3 {
12 public:
13  using Gate::apply_to;
15  using Gate::get_matrix;
16 
17  Z();
18  Z(int qbit_num_in, int target_qbit_in);
19  ~Z() override;
20  virtual Z* clone() override;
21  virtual Matrix gate_kernel(const Matrix_real& parameters) override;
22  virtual Matrix_float gate_kernel(const Matrix_real_float& parameters) override;
23  virtual Matrix inverse_gate_kernel(const Matrix_real& parameters) override;
24  virtual Matrix_float inverse_gate_kernel(const Matrix_real_float& parameters) override;
25  virtual void gate_kernel_to(const Matrix_real& parameters, Matrix& output) override;
26  virtual void gate_kernel_to(const Matrix_real_float& parameters, Matrix_float& output) override;
27  virtual void inverse_gate_kernel_to(const Matrix_real& parameters, Matrix& output) override;
28  virtual void inverse_gate_kernel_to(const Matrix_real_float& parameters, Matrix_float& output) override;
29 };
30 
31 #endif //Z_H
Copyright (C) Miklos Maroti, 2021 SPDX-License-Identifier: Apache-2.0.
Definition: U3.h:19
Header file of single-precision complex array storage with automatic and thread safe reference counti...
Class to store single-precision real arrays and properties.
Z()
Definition: Z.cpp:4
virtual Matrix get_matrix()
Retrieve the gate matrix for zero-parameter gates (no parameters).
Definition: Gate.cpp:283
virtual Matrix inverse_gate_kernel(const Matrix_real &parameters) override
Definition: Z.cpp:31
virtual Matrix gate_kernel(const Matrix_real &parameters) override
Compute the gate kernel matrix from precomputed trigonometric values.
Definition: Z.cpp:23
virtual void gate_kernel_to(const Matrix_real &parameters, Matrix &output) override
Definition: Z.cpp:39
virtual Z * clone() override
Call to create a clone of the present class.
Definition: Z.cpp:15
Definition: Z.h:11
~Z() override
Definition: Z.cpp:13
virtual void apply_from_right(Matrix &input)
Call to apply the gate on the input array/matrix by input*Gate.
Definition: Gate.cpp:919
Header file of complex array storage array with automatic and thread safe reference counting...
virtual void inverse_gate_kernel_to(const Matrix_real &parameters, Matrix &output) override
Definition: Z.cpp:47
Double-precision complex matrix (float64).
Definition: matrix.h:38
Single-precision complex matrix (float32).
Definition: matrix_float.h:41
virtual void apply_to(Matrix &input, int parallel)
Call to apply the gate on the input array/matrix.
Definition: Gate.cpp:433
Class to store data of complex arrays and its properties.
Definition: matrix_real.h:41