Skip to content

Commit

Permalink
pseudo code for what is to be done
Browse files Browse the repository at this point in the history
  • Loading branch information
marekgluza authored Jul 17, 2024
1 parent da648a0 commit c6da8c5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/boostvqe/models/dbi/double_bracket_evolution_oracles.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,35 @@ def circuit(self, t):
return circuit


##############################################
#pseudocode follows
@dataclass
class HamiltonianSimulation_EvolutionOracle(EvolutionOracle):
steps: int = None
order: int = None
delta: float = 0.5

@classmethod
def from_symbolic_hamiltonian(cls, h):

hamiltonian = h
...
return cls(
h=hamiltonian,
evolution_oracle_type=EvolutionOracleType.hamiltonian_simulation,
**kwargs,
)

def circuit(self, t_duration, steps=None, order=None):
c=self.h.circuit(dt)
for g in c.queue:
if g is two qubit
new_gate_list_add(two_qubit_decomposition(g)
c_recompiled_into_CNOT = ...collect...decompositions here

return reduce(__add__,c_recompiled_dt) #cf XXZ compiling


@dataclass
class XXZ_EvolutionOracle(EvolutionOracle):
steps: int = None
Expand Down

0 comments on commit c6da8c5

Please sign in to comment.