Skip to content

Commit 11c93f9

Browse files
F4dg experiment
1 parent 0b43fa9 commit 11c93f9

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

python/quantum-pecos/src/pecos/slr/gen_codes/gen_qir.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ def _create_qgate_call(self, gate: qgate_base.QGate) -> None:
747747
# necessary mappings of parameters and qargs to the decomposed gates from
748748
# the 'source' gate
749749
if qgate_meta.decomposer:
750-
self._builder.comment(f"; Decomposing gate: {gate.sym}")
750+
self._builder.comment(f"Decomposing gate: {gate.sym}")
751751
decomposed_gates = qgate_meta.decomposer(gate)
752752
for decomposed_gate in decomposed_gates:
753753
self._create_qgate_call(decomposed_gate)
@@ -769,10 +769,7 @@ def _create_qgate_call(self, gate: qgate_base.QGate) -> None:
769769
new_gate.qargs = [qubit]
770770
self._create_qgate_call(new_gate)
771771
return
772-
elif (
773-
isinstance(gate.qargs, tuple)
774-
and all(isinstance(e, tuple) for e in gate.qargs)
775-
):
772+
elif isinstance(gate.qargs, tuple) and all(isinstance(e, tuple) for e in gate.qargs):
776773
for pair in gate.qargs:
777774
new_gate = gate.copy()
778775
new_gate.qargs = pair
@@ -1163,7 +1160,6 @@ def get_bc(self) -> bytes:
11631160
bc = binding.parse_assembly(self.get_output()).as_bitcode()
11641161
binding.shutdown()
11651162
return bc
1166-
11671163

11681164

11691165
def _fix_internal_consts(llvm_ir: str) -> str:

python/quantum-pecos/src/pecos/slr/gen_codes/qir_gate_mapping.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def __init__(self, gate: QG):
111111
F4dg = QG.decompose(
112112
lambda f4dg: [
113113
q.SXdg(f4dg.qargs[0]),
114-
q.SZdg(f4dg.qargs[0]),
114+
#q.SZdg(f4dg.qargs[0]),
115+
q.Rz[-np.pi / 2](f4dg.qargs[0]),
115116
],
116117
)
117118

0 commit comments

Comments
 (0)