HopEvolutionSynthesis

class HopEvolutionSynthesis(*, atol=1e-12)

Bases: HighLevelSynthesisPlugin

A high-level synthesis plugin for the evolution under a hop between two qubits.

A PauliEvolutionGate whose operator is a hop (see match_hop()), such as the image of a fermionic hop under Jordan-Wigner, is synthesized exactly around a single XXPlusYYGate. A hop between adjacent modes becomes that gate alone, and a hop across other modes adds the two CZGate and the CXGate ladder that account for its Z-string. The generic synthesis of the same operator costs more two-qubit gates, and a target whose only two-qubit gate is the XXPlusYYGate cannot be reached by it for an adjacent hop at all.

Any other gate is declined (the plugin returns None), so that the next method of the HLSConfig is tried.

Note

The synthesis of a matched gate does not apply: the result is exact, whereas a product formula approximates the evolution of a hop with a complex amplitude (its \(XX + YY\) and \(XY - YX\) parts do not commute). A matched gate therefore differs from the generic synthesis by that Trotter error, and is the more accurate of the two.

Register it ahead of the default method:

HLSConfig(PauliEvolution=[HopEvolutionSynthesis(), "default"])

The generate_preset_jw_pass_manager() does so unconditionally, and merges the entry into any hls_config passed to it. That mirrors how the preset has always lowered an orbital rotation: it emits an XXPlusYYGate for each Givens factor, and the configuration cannot turn that off. A factor between modes that are adjacent in the OrbitalRotation but not on the register, because its wires are permuted or not contiguous, is a hop across the modes in between and is synthesized exactly, too.

Initializing this plugin can be done with the arguments listed below.

Parameters:

atol (float) – the absolute tolerance on the coefficients of the operator, within which it is still considered a hop.

Attributes

atol

The absolute coefficient tolerance with which an operator is recognized as a hop.

Methods

run(high_level_object, coupling_map=None, target=None, qubits=None, **options)

Runs this plugin.

Parameters:
  • high_level_object – the operation to synthesize.

  • coupling_map – unused.

  • target – unused.

  • qubits – unused.

  • options – unused.

Returns:

The circuit of match_hop() if high_level_object is a PauliEvolutionGate of a hop with a fixed evolution time, and None otherwise.