openfermioncirq.QuarticFermionicSimulationGate

class openfermioncirq.QuarticFermionicSimulationGate(weights: Tuple[complex, complex, complex] = (1, 1, 1), absorb_exponent: bool = True, *, exponent: Union[sympy.core.symbol.Symbol, float, None] = None, rads: Optional[float] = None, degs: Optional[float] = None, duration: Optional[float] = None)[source]

Rotates Hamming-weight 2 states into their bitwise complements.

With weights \((w_0, w_1, w_2)\) and exponent \(t\), this gate’s matrix is defined as

\[e^{-i t H},\]

where

\[H = \left(w_0 \left| 1001 \right\rangle\left\langle 0110 \right| + \text{h.c.}\right) + \left(w_1 \left| 1010 \right\rangle\left\langle 0101 \right| + \text{h.c.}\right) + \left(w_2 \left| 1100 \right\rangle\left\langle 0011 \right| + \text{h.c.}\right)\]

This corresponds to the Jordan-Wigner transform of

\[H = -\left(w_0 a^{\dagger}_i a^{\dagger}_{i+3} a_{i+1} a_{i+2} + \text{h.c.}\right) - \left(w_1 a^{\dagger}_i a^{\dagger}_{i+2} a_{i+1} a_{i+3} + \text{h.c.}\right) - \left(w_2 a^{\dagger}_i a^{\dagger}_{i+1} a_{i+2} a_{i+3} + \text{h.c.}\right),\]

where \(a_i\), …, \(a_{i+3}\) are the annihilation operators for the fermionic modes \(i\), …, \((i+3)\), respectively mapped to the four qubits on which this gate acts.

Parameters:weights – The weights of the terms in the Hamiltonian.
__init__(weights: Tuple[complex, complex, complex] = (1, 1, 1), absorb_exponent: bool = True, *, exponent: Union[sympy.core.symbol.Symbol, float, None] = None, rads: Optional[float] = None, degs: Optional[float] = None, duration: Optional[float] = None) → None[source]

Initialize the gate.

At most one of exponent, rads, degs, or duration may be specified. If more are specified, the result is considered ambiguous and an error is thrown. If no argument is given, the default value of one half-turn is used.

Parameters:
  • weights – The weights of the terms in the Hamiltonian.
  • absorb_exponent – Whether to absorb the given exponent into the weights. If true, the exponent of the returned gate is 1.
  • exponent – The exponent angle, in half-turns.
  • rads – The exponent angle, in radians.
  • degs – The exponent angle, in degrees.
  • duration – The exponent as a duration of time.

Methods

__init__(weights, complex, complex] = (1, 1, …) Initialize the gate.
absorb_exponent_into_weights()
controlled(num_controls, control_values, …) Returns a controlled version of this gate.
num_qubits() The number of qubits this gate acts on.
on(*qubits) Returns an application of this gate to the given qubits.
validate_args(qubits) Checks if this gate can be applied to the given qubits.
wrap_in_linear_combination(coefficient, …)

Attributes

exponent
global_shift