4 Created on Tue Jun 30 15:44:26 2020 5 Copyright 2020 Peter Rakyta, Ph.D. 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 11 http://www.apache.org/licenses/LICENSE-2.0 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 19 You should have received a copy of the GNU General Public License 20 along with this program. If not, see http://www.gnu.org/licenses/. 22 @author: Peter Rakyta, Ph.D. 31 from .qgd_CROT_Wrapper
import qgd_CROT_Wrapper
48 def __init__( self, qbit_num, target_qbit, control_qbit, subtype_in):
50 self.subtype = subtype_in
52 super().
__init__(qbit_num, target_qbit, control_qbit, subtype_in)
59 def apply_to( self, parameters_mtx, unitary_mtx):
62 super().
apply_to( parameters_mtx, unitary_mtx )
112 parameters_gate = np.reshape( parameters_gate, (parameters_gate.size,) )
114 return parameters_gate
def __init__(self, qbit_num, target_qbit, control_qbit, subtype_in)
Constructor of the class.
def set_Target_Qbit(self, target_qbit_in)
def apply_to(self, parameters_mtx, unitary_mtx)
def Extract_Parameters(self, parameters_circuit)
def get_Parameter_Start_Index(self)
def set_Control_Qbit(self, control_qbit_in)
def get_Parameter_Num(self)
A QGD Python interface class for the qgd_CROT.
def get_Control_Qbit(self)
def get_Target_Qbit(self)