quiche.core#
Core data structures for quantum primites, routines and errors.
Pauli operators#
Quantum primitives and data structures.
- class Pauli(*values)#
Single-qubit Pauli operators.
- class PauliWord(*, terms, qubits)#
Multi-qubit tensor products of Pauli operators.
- model_config = {'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- check_nonzero_lengths()#
Validate number of terms and number of qubits is nonzero.
- Return type:
- to_str(length=None, *, big_endian)#
Get the string representation of a PauliWord for a given register size.
Endianness must be explicitly set with the
big_endianarg:Big endian: |psi> = |q_0, q_1, q_2, ..., q_n> Little endian: |psi> = |q_n, ..., q_2, q_1, q_0>
- Return type:
- to_cirq(length)#
Get dense cirq representation of a PauliWord.
- Return type:
DensePauliString
- class PauliSum(*, coefficients, terms, identity_coefficient=0.0)#
Linear combinations of multi-qubit Pauli operators.
- model_config = {'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- check_for_zero_coefficients()#
Validate linear combination has no zero coefficient terms.
- Return type:
- without_identity()#
Get a copy of the PauliSum with the identity coefficient zeroed.
- Return type:
- split_identity()#
Get the identity coefficient and the remaining terms separately.
- to_quest()#
Get the QuEST representation of a PauliSum.
Will raise if called outside of a QuESTEnv.
- Return type:
Electronic systems#
Structures for specifying electronic systems.
- class ElectronicHamiltonian(electrons, mapping, paulis)#
Class encompassing a physical electronic Hamiltonian.
- class SecondQuantisedHamiltonian(*, one_body, two_body, electrons, core_energy=0.0)#
Class encompassing a second quantisation electronic Hamiltonian.
One body integrals are indexed h[p, q] and two body integrals are in chemist notation, h[p, q, r, s] = (pq|rs), over spatial orbitals.
- model_config = {'arbitrary_types_allowed': True, 'frozen': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod as_immutable_array(value)#
Coerce the integrals to an immutable real float array.
- to_qubit_hamiltonian(mapping)#
Get the qubit Hamiltonian after applying fermion-to-qubit mapping.
- Return type:
Algorithms#
Structures for specifying quantum algorithms and routines.
- class PhaseEstimation(*values)#
Quantum algorithm to perform phase estimation.
- class Simulation(*values)#
Hamiltonian simulation algorithm for phase estimation algorithms.
- class Mapping(*values)#
Fermion-to-Qubit mappings.
Errors#
Structures for specifying calculation error sources.
- class Errors(estimation, simulation, rotations, state_prep, overlap)#
Error budget tracker for approximate quantum methods.