View source on GitHub |
Modules
gates
module: Gates useful for simulating fermions.
lcu_util
module: Utility methods for LCU circuits.
low_rank
module: This module provides tools for simulating rank deficient operators.
primitives
module: Building blocks of algorithms for quantum simulation.
slater_determinants
module: This module contains functions for compiling circuits to prepare Slater determinants and fermionic Gaussian states.
trotter
module
trotter_exp_to_qgates
module: Module to perform Trotter-Suzuki decompositions to output as circuits.
unitary_cc
module: Module to create and manipulate unitary coupled cluster operators.
vpe_circuits
module: Circuit generation functions for verified phase estimation (2010.02538)
Classes
class AsymmetricSplitOperatorTrotterStep
: A method for performing a Trotter step.
class ControlledAsymmetricSplitOperatorTrotterStep
: A method for performing a Trotter step.
class ControlledSymmetricSplitOperatorTrotterStep
: A method for performing a Trotter step.
class CubicFermionicSimulationGate
: w0|110⟩⟨101| + w1|110⟩⟨011| + w2|101⟩⟨011|
+ h.c. interaction.
class DoubleExcitationGate
: Evolve under -|0011⟩⟨1100|
+ h.c. for some time.
class FSwapPowGate
: The FSWAP gate, possibly raised to a power.
class InteractionOperatorFermionicGate
: The Jordan-Wigner transform of \(\exp(-i H)\) for a fermionic Hamiltonian \(H\), where \(H\) is an interaction operator.
class LinearSwapNetworkTrotterAlgorithm
: A Trotter algorithm using the "fermionic simulation gate".
class LowRankTrotterAlgorithm
: A Trotter algorithm using the low rank decomposition strategy.
class ParityPreservingFermionicGate
: The Jordan-Wigner transform of \(\exp(-i H)\) for a fermionic Hamiltonian \(H\).
class QuadraticFermionicSimulationGate
: (w0 |10⟩⟨01| + h.c.) + w1 |11⟩⟨11|
interaction.
class QuarticFermionicSimulationGate
: Rotates Hamming-weight 2 states into their bitwise complements.
class SplitOperatorTrotterAlgorithm
: A Trotter algorithm using a split-operator approach.
class SplitOperatorTrotterStep
: A method for performing a Trotter step.
class SymmetricSplitOperatorTrotterStep
: A method for performing a Trotter step.
class TrotterAlgorithm
: An algorithm for performing a Trotter step.
class TrotterStep
: A method for performing a Trotter step.
Functions
CRxxyy(...)
: Controlled version of openfermion.Rxxyy
CRyxxy(...)
: Controlled version of openfermion.Ryxxy
DoubleExcitation(...)
: Evolve under -|0011⟩⟨1100|
+ h.c. for some time.
FSWAP(...)
: The FSWAP gate, possibly raised to a power.
Rxxyy(...)
: Returns a gate with the matrix exp(-i rads (X⊗X + Y⊗Y) / 2).
Ryxxy(...)
: Returns a gate with the matrix exp(-i rads (Y⊗X - X⊗Y) / 2).
Rzz(...)
: Returns a gate with the matrix exp(-i Z⊗Z rads).
bit_mask_of_modes_acted_on_by_fermionic_terms(...)
: Create a mask of which modes of the system are acted on by which terms.
bogoliubov_transform(...)
: Perform a Bogoliubov transformation.
diagonal_coulomb_potential_and_kinetic_terms_as_arrays(...)
: Give the potential and kinetic terms of a diagonal Coulomb Hamiltonian as arrays.
error_bound(...)
: Numerically upper bound the error in the ground state energy for the second order Trotter-Suzuki expansion.
error_operator(...)
: Determine the difference between the exact generator of unitary evolution and the approximate generator given by Trotter-Suzuki to the given order.
fermionic_simulation_gates_from_interaction_operator(...)
: Given \(H = \sum_{I \subset [n]} H_I\), returns gates \(\left\{G_I\right\} = \left\{e^{i H_I\right\}\).
fermionic_swap_trotter_error_operator_diagonal_two_body(...)
: Compute the fermionic swap network Trotter error of a diagonal two-body Hamiltonian.
ffft(...)
: Performs fast fermionic Fourier transform.
gaussian_state_preparation_circuit(...)
: Obtain the description of a circuit which prepares a fermionic Gaussian state.
get_chemist_two_body_coefficients(...)
: Convert two-body operator coefficients to low rank tensor.
jw_get_gaussian_state(...)
: Compute an eigenvalue and eigenstate of a quadratic Hamiltonian.
jw_slater_determinant(...)
: Obtain a Slater determinant.
lambda_norm(...)
: Computes the lambda norm relevant to LCU algorithms.
low_depth_second_order_trotter_error_bound(...)
: Numerically upper bound the error in the ground state energy for the second-order Trotter-Suzuki expansion.
low_depth_second_order_trotter_error_operator(...)
: Determine the difference between the exact generator of unitary evolution and the approximate generator given by the second-order Trotter-Suzuki expansion.
low_rank_two_body_decomposition(...)
: Convert two-body operator into sum of squared one-body operators.
optimal_givens_decomposition(...)
: Implement a circuit that provides the unitary that is generated by single-particle fermion generators
pauli_exp_to_qasm(...)
: Exponentiate a list of QubitOperators to a QASM string generator.
prepare_gaussian_state(...)
: Prepare a fermionic Gaussian state from a computational basis state.
prepare_one_body_squared_evolution(...)
: Get Givens angles and DiagonalHamiltonian to simulate squared one-body.
prepare_slater_determinant(...)
: Prepare a Slater determinant from a computational basis state.
preprocess_lcu_coefficients_for_reversible_sampling(...)
: Prepares data used to perform efficient reversible roulette selection.
rot11(...)
: Phases the |11> state of two qubits by e^{i rads}.
rot111(...)
: Phases the |111> state of three qubits by e^{i rads}.
simulate_trotter(...)
: Simulate Hamiltonian evolution using a Trotter-Suzuki product formula.
simulation_ordered_grouped_hubbard_terms_with_info(...)
: Give terms from the Fermi-Hubbard Hamiltonian in simulated order.
simulation_ordered_grouped_low_depth_terms_with_info(...)
: Give terms from the dual basis Hamiltonian in simulated order.
slater_determinant_preparation_circuit(...)
: Obtain the description of a circuit which prepares a Slater determinant.
split_operator_trotter_error_operator_diagonal_two_body(...)
: Compute the split-operator Trotter error of a diagonal two-body Hamiltonian.
stagger_with_info(...)
: Give terms simulated in a single stagger of a Trotter step.
state_swap_eigen_component(...)
: The +/- eigen-component of the operation that swaps states x and y.
sum_of_interaction_operator_gate_generators(...)
: The interaction operator that is the sum of the generators of the specified fermionic simulation gates.
swap_network(...)
: Apply operations to pairs of qubits or modes using a swap network.
trotter_operator_grouping(...)
: Trotter-decomposes operators into groups without exponentiating.
trotter_steps_required(...)
: Determine the number of Trotter steps for accurate simulation.
trotterize_exp_qubop_to_qasm(...)
: Trotterize a Qubit hamiltonian and write it to QASM format.
uccsd_convert_amplitude_format(...)
: Re-format single_amplitudes and double_amplitudes from ndarrays to lists.
uccsd_generator(...)
: Create a fermionic operator that is the generator of uccsd.
uccsd_singlet_generator(...)
: Create a singlet UCCSD generator for a system with n_electrons
uccsd_singlet_get_packed_amplitudes(...)
: Convert amplitudes for use with singlet UCCSD
uccsd_singlet_paramsize(...)
: Determine number of independent amplitudes for singlet UCCSD
vpe_circuits_single_timestep(...)
: Prepares the circuits to perform VPE at a fixed time
vpe_single_circuit(...)
: Combines the different parts that make up a VPE circuit
Other Members | |
---|---|
LINEAR_SWAP_NETWORK |
Instance of openfermion.circuits.LinearSwapNetworkTrotterAlgorithm
|
LOW_RANK |
Instance of openfermion.circuits.LowRankTrotterAlgorithm
|
SPLIT_OPERATOR |
Instance of openfermion.circuits.SplitOperatorTrotterAlgorithm
|
standard_vpe_rotation_set |
[[0.25, cirq.Ry(rads=1.5707963267948966), cirq.Ry(rads=-1.5707963267948966)],
[-0.25, cirq.Ry(rads=1.5707963267948966), cirq.Ry(rads=1.5707963267948966)],
[(-0-0.25j),
cirq.Ry(rads=1.5707963267948966),
cirq.Rx(rads=-1.5707963267948966)],
[0.25j, cirq.Ry(rads=1.5707963267948966), cirq.Rx(rads=1.5707963267948966)],
[0.25, cirq.Rx(rads=1.5707963267948966), cirq.Rx(rads=-1.5707963267948966)],
[-0.25, cirq.Rx(rads=1.5707963267948966), cirq.Rx(rads=1.5707963267948966)],
[0.25j, cirq.Rx(rads=1.5707963267948966), cirq.Ry(rads=-1.5707963267948966)],
[(-0-0.25j),
cirq.Rx(rads=1.5707963267948966),
cirq.Ry(rads=1.5707963267948966)]]
|