![]() |
OpenFermion
For more information, examples, or tutorials visit our website:
www.openfermion.org
Modules
chem
module
circuits
module
config
module
contextuality
module: tests for whether operators are contextual contextuality
functionals
module
hamiltonians
module
linalg
module
measurements
module
ops
module: This module should contain objects that describe the algebra of various
testing
module
third_party
module
transforms
module
utils
module
Classes
class AsymmetricSplitOperatorTrotterStep
: A method for performing a Trotter step.
class BinaryCode
: The BinaryCode class provides a representation of an encoding-decoding
class BinaryCodeError
: Common base class for all non-exit exceptions.
class BinaryPolynomial
: The BinaryPolynomial class provides an analytic representation
class BinaryPolynomialError
: Common base class for all non-exit exceptions.
class BosonOperator
: BosonOperator stores a sum of products of bosonic ladder operators.
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 DOCIHamiltonian
: Class for storing DOCI hamiltonians which are defined to be
class Davidson
: Davidson algorithm to get the n states with smallest eigenvalues.
class DavidsonError
: Exceptions.
class DavidsonOptions
: Davidson algorithm iteration options.
class DiagonalCoulombHamiltonian
: Class for storing Hamiltonians of the form
class DoubleExcitationGate
: Evolve under -|0011⟩⟨1100|
+ h.c. for some time.
class EqualsTester
: Tests equality against user-provided disjoint equivalence groups.
class FSwapPowGate
: The FSWAP gate, possibly raised to a power.
class FenwickNode
: Fenwick Tree node.
class FenwickTree
: Recursive implementation of the Fenwick tree.
class FermiHubbardModel
: A general, parameterized Fermi-Hubbard model.
class FermionOperator
: FermionOperator stores a sum of products of fermionic ladder operators.
class Grid
: A multi-dimension grid of points with an assigned length scale.
class HartreeFockFunctional
: Implementation of the objective function code for Restricted Hartree-Fock
class HubbardLattice
: Base class for a Hubbard model lattice.
class HubbardSquareLattice
: A square lattice for a Hubbard model.
class InteractionOperator
: Class for storing 'interaction operators' which are defined to be
class InteractionOperatorError
: Common base class for all non-exit exceptions.
class InteractionOperatorFermionicGate
: The Jordan-Wigner transform of \(\exp(-i H)\) for a fermionic
class InteractionRDM
: Class for storing 1- and 2-body reduced density matrices.
class InteractionRDMError
: Common base class for all non-exit exceptions.
class IsingOperator
: The IsingOperator class provides an analytic representation of an
class LinearQubitOperator
: A LinearOperator implied from a QubitOperator.
class LinearQubitOperatorOptions
: Options for LinearQubitOperator.
class LinearSwapNetworkTrotterAlgorithm
: A Trotter algorithm using the "fermionic simulation gate".
class LowRankTrotterAlgorithm
: A Trotter algorithm using the low rank decomposition strategy.
class MajoranaOperator
: A linear combination of products of Majorana operators.
class MolecularData
: Class for storing molecule data from a fixed basis set at a fixed
class OperatorSpecificationError
: Common base class for all non-exit exceptions.
class OperatorUtilsError
: Common base class for all non-exit exceptions.
class ParallelLinearQubitOperator
: A LinearOperator from a QubitOperator with multiple processors.
class ParityPreservingFermionicGate
: The Jordan-Wigner transform of \(\exp(-i H)\) for a fermionic
class PhaseFitEstimator
: A VPE estimator that works by fitting a set of known frequencies.
class PolynomialTensor
: Class for storing tensor representations of operators that correspond
class PolynomialTensorError
: Common base class for all non-exit exceptions.
class QuadOperator
: QuadOperator stores a sum of products of canonical quadrature operators.
class QuadraticFermionicSimulationGate
: (w0 |10⟩⟨01| + h.c.) + w1 |11⟩⟨11|
interaction.
class QuadraticHamiltonian
: Class for storing Hamiltonians that are quadratic in the fermionic
class QuadraticHamiltonianError
: Common base class for all non-exit exceptions.
class QuarticFermionicSimulationGate
: Rotates Hamming-weight 2 states into their bitwise complements.
class QubitDavidson
: Davidson algorithm applied to a QubitOperator.
class QubitOperator
: A sum of terms acting on qubits, e.g., 0.5 * 'X0 X5' + 0.3 * 'Z1 Z2'.
class SparseDavidson
: Davidson algorithm for a sparse matrix.
class Spin
: An enumeration.
class SpinPairs
: The spin orbitals corresponding to a pair of spatial orbitals.
class SplitOperatorTrotterAlgorithm
: A Trotter algorithm using a split-operator approach.
class SplitOperatorTrotterStep
: A method for performing a Trotter step.
class StabilizerError
: Stabilizer error class.
class SymbolicOperator
: Base class for FermionOperator and QubitOperator.
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).
amplitude_damping_channel(...)
: Apply an amplitude damping channel
anticommutator(...)
: Compute the anticommutator of two operators.
antisymmetric_canonical_form(...)
: Compute the canonical form of an antisymmetric matrix.
append_random_vectors(...)
: Appends exactly col orthonormal random vectors for vectors.
apply_constraints(...)
: Function to use linear programming to apply constraints.
assert_equivalent_repr(...)
: Checks that eval(repr(v)) == v.
assert_implements_consistent_protocols(...)
: Checks that a value is internally consistent and has a good repr.
bch_expand(...)
: Compute log[e^{x_1} ... e^{x_N}] using the BCH formula.
binary_code_transform(...)
: Transforms a Hamiltonian written in fermionic basis into a Hamiltonian
binary_partition_iterator(...)
: Generator for a list of 2-partitions of N qubits
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.
bose_hubbard(...)
: Return symbolic representation of a Bose-Hubbard Hamiltonian.
boson_ladder_sparse(...)
: Make a matrix representation of a singular bosonic ladder operator
boson_operator_sparse(...)
: Initialize a Scipy sparse matrix in the Fock space
bravyi_kitaev(...)
: Apply the Bravyi-Kitaev transform.
bravyi_kitaev_code(...)
: The Bravyi-Kitaev transform as binary code. The implementation
bravyi_kitaev_fast(...)
: Find the Pauli-representation of InteractionOperator for Bravyi-Kitaev
bravyi_kitaev_fast_edge_matrix(...)
: Use InteractionOperator to construct edge matrix required for the algorithm
bravyi_kitaev_fast_interaction_op(...)
: Transform from InteractionOperator to QubitOperator for Bravyi-Kitaev fast
bravyi_kitaev_tree(...)
: Apply the "tree" Bravyi-Kitaev transform.
check_commuting_stabilizers(...)
: Auxiliary function checking that stabilizers commute.
check_no_sympy(...)
: Checks whether a SymbolicOperator contains any
check_stabilizer_linearity(...)
: Auxiliary function checking that stabilizers are linearly independent.
checksum_code(...)
: Checksum code for either even or odd Hamming weight. The Hamming weight
chemist_ordered(...)
: Puts a two-body fermion operator in chemist ordering.
commutator(...)
: Compute the commutator of two operators.
constraint_matrix(...)
: Function to generate matrix of constraints.
count_qubits(...)
: Compute the minimum number of qubits on which operator acts.
dephasing_channel(...)
: Apply a dephasing channel
depolarizing_channel(...)
: Apply a depolarizing channel
diagonal_coulomb_potential_and_kinetic_terms_as_arrays(...)
: Give the potential and kinetic terms of a diagonal Coulomb Hamiltonian
double_commutator(...)
: Return the double commutator [op1, [op2, op3]].
double_decoding(...)
: Concatenates two decodings
double_givens_rotate(...)
: Apply a double Givens rotation.
down_index(...)
: Function to return down-orbital index given a spatial orbital index.
dual_basis_external_potential(...)
: Return the external potential in the dual basis of arXiv:1706.00023.
dual_basis_jellium_model(...)
: Return jellium Hamiltonian in the dual basis of arXiv:1706.00023
dual_basis_kinetic(...)
: Return the kinetic operator in the dual basis of arXiv:1706.00023.
dual_basis_potential(...)
: Return the potential operator in the dual basis of arXiv:1706.00023
eigenspectrum(...)
: Compute the eigenspectrum of an operator.
erpa_eom_hamiltonian(...)
: Evaluate sum{a,b,c,d}h{a, b, d, c}
error_bound(...)
: Numerically upper bound the error in the ground state energy
error_operator(...)
: Determine the difference between the exact generator of unitary
expectation(...)
: Compute the expectation value of an operator with a state.
expectation_computational_basis_state(...)
: Compute expectation value of operator with a state.
expectation_db_operator_with_pw_basis_state(...)
: Compute expectation value of a dual basis operator with a plane
expectation_one_body_db_operator_computational_basis_state(...)
: Compute expectation value of a 1-body dual-basis operator with a
expectation_three_body_db_operator_computational_basis_state(...)
: Compute expectation value of a 3-body dual-basis operator with a
expectation_two_body_db_operator_computational_basis_state(...)
: Compute expectation value of a 2-body dual-basis operator with a
fermi_hubbard(...)
: Return symbolic representation of a Fermi-Hubbard Hamiltonian.
fermionic_gaussian_decomposition(...)
: Decompose a matrix into a sequence of Givens rotations and
fermionic_simulation_gates_from_interaction_operator(...)
: Given \(H = \sum_{I \subset [n]} H_I\), returns gates
fermionic_swap_trotter_error_operator_diagonal_two_body(...)
: Compute the fermionic swap network Trotter error of a diagonal
ffft(...)
: Performs fast fermionic Fourier transform.
fit_known_frequencies(...)
: Fits a set of known exponential components to a dataset
fix_single_term(...)
: Auxiliary function for term reductions.
fixed_trace_positive_projection(...)
: Perform the positive projection with fixed trace
fourier_transform(...)
: Apply Fourier transform to change hamiltonian in plane wave basis.
freeze_orbitals(...)
: Fix some orbitals to be occupied and others unoccupied.
gaussian_state_preparation_circuit(...)
: Obtain the description of a circuit which prepares a fermionic Gaussian
general_basis_change(...)
: Change the basis of an general interaction tensor.
generate_linear_qubit_operator(...)
: Generates a LinearOperator from a QubitOperator.
generate_parity_permutations(...)
: Generates the permutations and sign of a sequence by constructing a tree
generate_random_vectors(...)
: Generates orthonormal random vectors with col columns.
geometry_from_file(...)
: Function to create molecular geometry from text file.
geometry_from_pubchem(...)
: Function to extract geometry using the molecule's name from the PubChem
get_boson_operator(...)
: Convert to BosonOperator.
get_chemist_two_body_coefficients(...)
: Convert two-body operator coefficients to low rank tensor.
get_diagonal_coulomb_hamiltonian(...)
: Convert a FermionOperator to a DiagonalCoulombHamiltonian.
get_fermion_operator(...)
: Convert to FermionOperator.
get_file_path(...)
: Compute file_path for the file that stores operator.
get_gap(...)
: Compute gap between lowest eigenvalue and first excited state.
get_ground_state(...)
: Compute lowest eigenvalue and eigenstate.
get_interaction_operator(...)
: Convert a 2-body fermionic operator to InteractionOperator.
get_interaction_rdm(...)
: Build an InteractionRDM from measured qubit operators.
get_linear_qubit_operator_diagonal(...)
: Return a linear operator's diagonal elements.
get_majorana_operator(...)
: Convert to MajoranaOperator.
get_matrix_of_eigs(...)
: Transform the eigenvalues into a matrix corresponding
get_molecular_data(...)
: Output a MolecularData object generated from an InteractionOperator
get_number_preserving_sparse_operator(...)
: Initialize a Scipy sparse matrix in a specific symmetry sector.
get_one_norm_int(...)
: Returns the 1-Norm of a RHF or ROHF Hamiltonian described in
get_one_norm_int_woconst(...)
: Returns 1-norm, emitting the constant term in the qubit Hamiltonian.
get_one_norm_mol(...)
: Returns the 1-Norm of a RHF or ROHF Hamiltonian described in
get_one_norm_mol_woconst(...)
: Returns 1-norm, emitting the constant term in the qubit Hamiltonian.
get_phase_function(...)
: Generates an estimate of the phase function g(t) from circuit output
get_quad_operator(...)
: Convert to QuadOperator.
get_quadratic_hamiltonian(...)
: Convert a quadratic fermionic operator to QuadraticHamiltonian.
get_sparse_operator(...)
: Map an operator to a sparse matrix.
givens_decomposition(...)
: Decompose a matrix into a sequence of Givens rotations.
givens_decomposition_square(...)
: Decompose a square matrix into a sequence of Givens rotations.
givens_matrix_elements(...)
: Compute the matrix elements of the Givens rotation that zeroes out one
givens_rotate(...)
: Apply a Givens rotation to coordinates i and j of an operator.
group_into_tensor_product_basis_sets(...)
: Split an operator (instance of QubitOperator) into sub-operator
haar_random_vector(...)
: Generate an n dimensional Haar randomd vector.
hartree_fock_state_jellium(...)
: Give the Hartree-Fock state of jellium.
heaviside(...)
: Heaviside function Theta(x - bias)
hermitian_conjugated(...)
: Return Hermitian conjugate of operator.
higham_polynomial(...)
: Calculate the higham_polynomial
higham_root(...)
: Find the root of f(sigma) = sum{j}Theta(l{i} - sigma)(l_{i} - sigma) = T
hypercube_grid_with_given_wigner_seitz_radius_and_filling(...)
: Return a Grid with the same number of orbitals along each dimension
inner_product(...)
: Compute inner product of two states.
interleaved_code(...)
: Linear code that reorders orbitals from even-odd to up-then-down.
inverse_fourier_transform(...)
: Apply inverse Fourier transform to change hamiltonian in
is_hermitian(...)
: Test if operator is Hermitian.
is_identity(...)
: Check whether QubitOperator of FermionOperator is identity.
jellium_model(...)
: Return jellium Hamiltonian as FermionOperator class.
jordan_wigner(...)
: Apply the Jordan-Wigner transform to a FermionOperator,
jordan_wigner_code(...)
: The Jordan-Wigner transform as binary code.
jordan_wigner_dual_basis_hamiltonian(...)
: Return the dual basis Hamiltonian as QubitOperator.
jordan_wigner_dual_basis_jellium(...)
: Return the jellium Hamiltonian as QubitOperator in the dual basis.
jordan_wigner_ladder_sparse(...)
: Make a matrix representation of a fermion ladder operator.
jordan_wigner_one_body(...)
: Map the term a^\dagger_p a_q + h.c. to QubitOperator.
jordan_wigner_sparse(...)
: Initialize a Scipy sparse matrix from a FermionOperator.
jordan_wigner_two_body(...)
: Map the term a^\dagger_p a^\dagger_q a_r a_s + h.c. to QubitOperator.
jw_configuration_state(...)
: Function to produce a basis state in the occupation number basis.
jw_get_gaussian_state(...)
: Compute an eigenvalue and eigenstate of a quadratic Hamiltonian.
jw_get_ground_state_at_particle_number(...)
: Compute ground energy and state at a specified particle number.
jw_hartree_fock_state(...)
: Function to produce Hartree-Fock state in JW representation.
jw_number_indices(...)
: Return the indices for n_electrons in n_qubits under JW encoding
jw_number_restrict_operator(...)
: Restrict a Jordan-Wigner encoded operator to a given particle number
jw_number_restrict_state(...)
: Restrict a Jordan-Wigner encoded state to a given particle number
jw_slater_determinant(...)
: Obtain a Slater determinant.
jw_sparse_givens_rotation(...)
: Return the matrix (acting on a full wavefunction) that performs a
jw_sparse_particle_hole_transformation_last_mode(...)
: Return the matrix (acting on a full wavefunction) that performs a
jw_sz_indices(...)
: Return the indices of basis vectors with fixed Sz under JW encoding.
jw_sz_restrict_operator(...)
: Restrict a Jordan-Wigner encoded operator to a given Sz value
jw_sz_restrict_state(...)
: Restrict a Jordan-Wigner encoded state to a given Sz value
kronecker_operators(...)
: Return the Kronecker product of multiple sparse.csc_matrix operators.
lambda_norm(...)
: Computes the lambda norm relevant to LCU algorithms.
linearize_decoder(...)
: Outputs linear decoding function from input matrix
linearize_term(...)
: Function to return integer index of term indices.
load_molecular_hamiltonian(...)
: Attempt to load a molecular Hamiltonian with the given properties.
load_operator(...)
: Load FermionOperator or QubitOperator from file.
low_depth_second_order_trotter_error_bound(...)
: Numerically upper bound the error in the ground state energy
low_depth_second_order_trotter_error_operator(...)
: Determine the difference between the exact generator of unitary
low_rank_two_body_decomposition(...)
: Convert two-body operator into sum of squared one-body operators.
majorana_operator(...)
: Initialize a Majorana operator.
make_atom(...)
: Prepare a molecular data instance for a single element.
make_atomic_lattice(...)
: Function to create atomic lattice with n_atoms.
make_atomic_ring(...)
: Function to create atomic rings with n_atoms.
make_reduced_hamiltonian(...)
: Construct the reduced Hamiltonian.
map_one_hole_dm_to_one_pdm(...)
: Convert a 1-hole-RDM to a 1-RDM
map_one_pdm_to_one_hole_dm(...)
: Convert a 1-RDM to a 1-hole-RDM
map_particle_hole_dm_to_one_pdm(...)
: Map the particle-hole-RDM to the 1-RDM
map_particle_hole_dm_to_two_pdm(...)
: Map the 2-RDM to the particle-hole-RDM
map_two_hole_dm_to_one_hole_dm(...)
: Map from 2-hole-RDM to 1-hole-RDM
map_two_hole_dm_to_two_pdm(...)
: Map from the 2-hole-RDM to the 2-RDM
map_two_pdm_to_one_pdm(...)
: Contract a 2-RDM to a 1-RDM
map_two_pdm_to_particle_hole_dm(...)
: Map the 2-RDM to the particle-hole-RDM
map_two_pdm_to_two_hole_dm(...)
: Map from the 2-RDM to the 2-hole-RDM
mccoy(...)
: Implement the McCoy formula on two operators of the
mean_field_dwave(...)
: Return symbolic representation of a BCS mean-field d-wave Hamiltonian.
module_importable(...)
: Without importing it, returns whether python module is importable.
name_molecule(...)
: Function to name molecules.
normal_ordered(...)
: Compute and return the normal ordered form of a FermionOperator,
normal_ordered_ladder_term(...)
: Return a normal ordered FermionOperator or BosonOperator corresponding
normal_ordered_quad_term(...)
: Return a normal ordered QuadOperator corresponding to single term.
number_difference_operator(...)
number_operator(...)
: Return a fermionic or bosonic number operator.
one_body_fermion_constraints(...)
: Generates one-body positivity constraints on fermionic RDMs.
operator_to_vector(...)
: Function to map operator to vector.
optimal_givens_decomposition(...)
: Implement a circuit that provides the unitary that is generated by
orthonormalize(...)
: Orthonormalize vectors, so that they're all normalized and orthogoal.
pair_between(...)
: Pairs between two fragments of a larger list
pair_within(...)
: Generates pairings of labels that contain each pair at least once.
pair_within_simultaneously(...)
: Generates simultaneous pairings between four-element combinations
pair_within_simultaneously_binned(...)
: Generates symmetry-respecting pairings between four-elements in a list
pair_within_simultaneously_symmetric(...)
: Generates symmetry-respecting pairings between four-elements in a list
parity_code(...)
: The parity transform (arXiv:1208.5986) as binary code. This code is
partition_iterator(...)
: Generator for a list of k-partitions of N qubits such that
pauli_exp_to_qasm(...)
: Exponentiate a list of QubitOperators to a QASM string generator.
pauli_string_iterator(...)
: Generates a set of Pauli strings such that each word
plane_wave_external_potential(...)
: Return the external potential operator in plane wave basis.
plane_wave_hamiltonian(...)
: Returns Hamiltonian as FermionOperator class.
plane_wave_kinetic(...)
: Return the kinetic energy operator in the plane wave basis.
plane_wave_potential(...)
: Return the e-e potential operator in the plane wave basis.
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.
project_onto_sector(...)
: Remove qubit by projecting onto sector.
projection_error(...)
: Calculate the error from the project_onto_sector function.
prony(...)
: Estimates amplitudes and phases of a sparse signal using Prony's method.
prune_unused_indices(...)
: Remove indices that do not appear in any terms.
qubit_operator_sparse(...)
: Initialize a Scipy sparse matrix from a QubitOperator.
qubit_operator_to_pauli_sum(...)
: Convert QubitOperator to a sum of PauliString.
random_antisymmetric_matrix(...)
: Generate a random n x n antisymmetric matrix.
random_diagonal_coulomb_hamiltonian(...)
: Generate a random instance of DiagonalCoulombHamiltonian.
random_hermitian_matrix(...)
: Generate a random n x n Hermitian matrix.
random_interaction_operator(...)
: Generate a random instance of InteractionOperator.
random_interaction_operator_term(...)
: Generates a random interaction operator with non-zero coefficients only
random_quadratic_hamiltonian(...)
: Generate a random instance of QuadraticHamiltonian.
random_unitary_matrix(...)
: Obtain a random n x n unitary matrix.
reduce_number_of_terms(...)
: Reduce the number of Pauli strings of operator using stabilizers.
reorder(...)
: Changes the ladder operator order of the Hamiltonian based on the
reverse_jordan_wigner(...)
: Transforms a QubitOperator into a FermionOperator using the
rhf_func_generator(...)
: Generate the energy, gradient, and unitary functions
rhf_minimization(...)
: Perform Hartree-Fock energy minimization
rhf_params_to_matrix(...)
: For restricted Hartree-Fock we have nocc * nvirt parameters. These are
rot11(...)
: Phases the |11> state of two qubits by e^{i rads}.
rot111(...)
: Phases the |111> state of three qubits by e^{i rads}.
rotate_qubit_by_pauli(...)
: Rotate qubit operator by exponential of Pauli.
s_plus_operator(...)
: Return the s+ operator.
s_squared_operator(...)
: Return the s^{2} operator.
save_operator(...)
: Save FermionOperator or QubitOperator to file.
shift_decoder(...)
: Shifts the indices of a decoder by a constant.
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.
single_quad_op_sparse(...)
: Make a matrix representation of a singular quadrature
singlet_erpa(...)
: Generate the singlet ERPA equations
slater_determinant_preparation_circuit(...)
: Obtain the description of a circuit which prepares a Slater determinant.
sparse_eigenspectrum(...)
: Perform a dense diagonalization.
split_operator_trotter_error_operator_diagonal_two_body(...)
: Compute the split-operator Trotter error of a diagonal two-body
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
swap_columns(...)
: Swap columns i and j of matrix M.
swap_network(...)
: Apply operations to pairs of qubits or modes using a swap network.
swap_rows(...)
: Swap rows i and j of matrix M.
sx_operator(...)
: Return the sx operator.
sy_operator(...)
: Return the sy operator.
symmetric_ordering(...)
: Apply the symmetric ordering to a BosonOperator or QuadOperator.
symmetry_conserving_bravyi_kitaev(...)
: Returns the qubit Hamiltonian for the fermionic Hamiltonian
sz_operator(...)
: Return the sz operator.
taper_off_qubits(...)
: Remove qubits from given operator.
trivially_commutes_dual_basis(...)
: Determine whether the given terms trivially commute.
trivially_double_commutes_dual_basis(...)
: Check if the double commutator [term_a, [term_b, term_c]] is zero.
trivially_double_commutes_dual_basis_using_term_info(...)
: Return whether [op_a, [op_b, op_a_prime]] is trivially zero.
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.
two_body_fermion_constraints(...)
: Generates two-body positivity constraints on fermionic RDMs.
uccsd_convert_amplitude_format(...)
: Re-format single_amplitudes and double_amplitudes from ndarrays
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
unlinearize_term(...)
: Function to return integer index of term indices.
up_index(...)
: Function to return up-orbital index given a spatial orbital index.
up_then_down(...)
: up then down reordering, given the operator has the default even-odd
valdemoro_reconstruction(...)
: Build a 3-RDM by cumulant expansion and setting 3rd cumulant to zero
validate_trotterized_evolution(...)
: Checks whether a circuit implements Trotterized evolution
variance(...)
: Compute variance of operator with a state.
vector_to_operator(...)
: Function to map vector to operator.
verstraete_cirac_2d_square(...)
: Apply the Verstraete-Cirac transform on a 2-d square lattice.
vertical_edges_snake(...)
: Obtain the vertical edges in the 2-d snake ordering.
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
wedge(...)
: Implement the wedge product between left_tensor and right_tensor
weight_one_binary_addressing_code(...)
: Weight-1 binary addressing code (arXiv:1712.07067). This highly
weight_one_segment_code(...)
: Weight-1 segment code (arXiv:1712.07067). Outputs a 3-mode, 2-qubit
weight_two_segment_code(...)
: Weight-2 segment code (arXiv:1712.07067). Outputs a 5-mode, 4-qubit
weyl_polynomial_quantization(...)
: Apply the Weyl quantization to a phase space polynomial.
wigner_seitz_length_scale(...)
: Function to give length_scale associated with Wigner-Seitz radius.
wrapped_kronecker(...)
: Return the Kronecker product of two sparse.csc_matrix operators.
Other Members | |
---|---|
LINEAR_SWAP_NETWORK |
Instance of openfermion.circuits.LinearSwapNetworkTrotterAlgorithm
|
LOW_RANK |
Instance of openfermion.circuits.LowRankTrotterAlgorithm
|
SPLIT_OPERATOR |
Instance of openfermion.circuits.SplitOperatorTrotterAlgorithm
|
version |
'1.5.1'
|
periodic_hash_table |
|
periodic_polarization |
[-1,
1,
0,
1,
0,
1,
2,
3,
2,
1,
0,
1,
0,
1,
2,
3,
2,
1,
0,
1,
0,
1,
2,
3,
6,
5,
4,
3,
2,
1,
0,
1,
2,
3,
2,
1,
0,
1,
0,
1,
2,
5,
6,
5,
8,
9,
0,
1,
0,
1,
2,
3,
2,
1,
0]
|
periodic_table |
['?',
'H',
'He',
'Li',
'Be',
'B',
'C',
'N',
'O',
'F',
'Ne',
'Na',
'Mg',
'Al',
'Si',
'P',
'S',
'Cl',
'Ar',
'K',
'Ca',
'Sc',
'Ti',
'V',
'Cr',
'Mn',
'Fe',
'Co',
'Ni',
'Cu',
'Zn',
'Ga',
'Ge',
'As',
'Se',
'Br',
'Kr',
'Rb',
'Sr',
'Y',
'Zr',
'Nb',
'Mo',
'Tc',
'Ru',
'Rh',
'Pd',
'Ag',
'Cd',
'In',
'Sn',
'Sb',
'Te',
'I',
'Xe',
'Cs',
'Ba',
'La',
'Ce',
'Pr',
'Nd',
'Pm',
'Sm',
'Eu',
'Gd',
'Tb',
'Dy',
'Ho',
'Er',
'Tm',
'Yb',
'Lu',
'Hf',
'Ta',
'W',
'Re',
'Os',
'Ir',
'Pt',
'Au',
'Hg',
'Tl',
'Pb',
'Bi',
'Po',
'At',
'Rn',
'Fr',
'Ra',
'Ac',
'Th',
'Pa',
'U',
'Np',
'Pu',
'Am',
'Cm',
'Bk',
'Cf',
'Es',
'Fm',
'Md',
'No',
'Lr']
|
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)]]
|