Skip to content

Commit

Permalink
Updating z with init for graph qubit
Browse files Browse the repository at this point in the history
  • Loading branch information
fieldofnodes committed Mar 22, 2024
1 parent 6f6b676 commit 25a2cb7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pytket-mbqc-py/pytket_mbqc_py/graph_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,22 @@ def add_output_vertex(self) -> int:
self.output_vertices.append(index)
return index

def get_plus_state(self,t_multiple: int = 0) -> Qubit:
def get_plus_state(self,z_multiple: int = 0) -> Qubit:
qubit = super().get_qubit()
index = self._add_vertex(qubit=qubit)


self.Reset(qubit=qubit)
self.H(qubit=qubit)
[self.T(qubit=qubit) for _ in range(t_multiple)]
[self.Z(qubit=qubit) for _ in range(z_multiple)]

self.add_c_setreg(value=index, arg=self.index_reg)
self.add_wasm_to_reg(
"update_z_correction",
self.wfh,
[self.qubit_init_t_mult_reg[self.vertex_qubit[index]], t_multiple],
[],)
[self.qubit_init_t_mult_reg[self.vertex_qubit[index]], z_multiple],
[],
)
return qubit

def add_graph_vertex(self,t_multiple: int = 0) -> int:
Expand Down

0 comments on commit 25a2cb7

Please sign in to comment.