Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
pauli_exponent.py
Go to the documentation of this file.
1 '''
2 Copyright 2020 Peter Rakyta, Ph.D.
3 
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 '''
16 
17 from qiskit import QuantumCircuit
18 import numpy as np
19 
20 
23 def pauli_exponent( alpha=0.6217*np.pi ):
24  # creating Qiskit quantum circuit
25  qc_orig = QuantumCircuit(5)
26  qc_orig.h(1)
27  qc_orig.cx(1,2)
28 
29  qc_orig.rx(np.pi/2,0)
30  qc_orig.rx(np.pi/2,1)
31  qc_orig.cx(2,4)
32  qc_orig.cx(0,1)
33 
34  qc_orig.rx(np.pi/2,0)
35  qc_orig.h(2)
36  qc_orig.cx(0,2)
37 
38 
39  qc_orig.rx(np.pi/2,0)
40  qc_orig.h(3)
41  qc_orig.rz(alpha,4)
42  qc_orig.cx(0,3)
43 
44  qc_orig.h(0)
45  qc_orig.rz(-alpha,1)
46  qc_orig.cx(2,4)
47 
48  qc_orig.cx(2,1)
49  qc_orig.rz(-alpha,4)
50  qc_orig.cx(3,1)
51 
52  qc_orig.rz(alpha,1)
53  qc_orig.cx(0,1)
54  qc_orig.cx(3,1)
55  qc_orig.cx(4,1)
56 
57  qc_orig.rz(-alpha,1)
58  qc_orig.cx(2,1)
59 
60  qc_orig.rz(alpha,1)
61  qc_orig.cx(3,1)
62  qc_orig.cx(4,1)
63 
64  qc_orig.rz(alpha,1)
65  qc_orig.cx(2,4)
66  qc_orig.cx(0,1)
67 
68  qc_orig.h(0)
69  qc_orig.cx(3,1)
70  qc_orig.cx(0,3)
71 
72  qc_orig.rx(-np.pi/2,0)
73  qc_orig.h(3)
74  qc_orig.cx(0,2)
75 
76  qc_orig.rx(-np.pi/2,0)
77  qc_orig.h(2)
78  qc_orig.cx(0,1)
79 
80  qc_orig.rx(-np.pi/2,0)
81  qc_orig.rx(-np.pi/2,1)
82  qc_orig.cx(2,4)
83  qc_orig.cx(1,2)
84  qc_orig.h(1)
85 
86  return qc_orig
def pauli_exponent(alpha=0.6217 *np.pi)
???????????