quiche.simulation#

Logic for the QuEST simulation backend of QUICHE.

Routines#

Objects to construct and lazily evaluate QuEST simulations.

class SimulationRoutine#

Sequence of callables acting on a Qureg for QuEST simulations.

evaluate(qureg)#

Execute the simulation.

Return type:

list

append(other)#

Add another simulation function to the routine.

extend(other)#

Add another simulation routine to this routine.

Phase estimation#

Wrappers for phase estimation methods in the QuEST backend.

getPhaseKitaevQDRIFT(qureg, hamiltonian, ancilla_index, reps, time, num_bits, seed)#

Execute Kitaev phase estimation with QDRIFT.

Return type:

float

getPhaseKitaevTrotter(qureg, hamiltonian, ancilla_index, order, reps, time, num_bits)#

Execute Kitaev phase estimation with Trotterisation.

Return type:

float

getPhaseTextbookQDRIFT(qureg, hamiltonian, ancillas, reps, time, seed)#

Execute Textbook phase estimation with QDRIFT.

Return type:

float

getPhaseTextbookTrotter(qureg, hamiltonian, ancillas, order, reps, time)#

Execute Textbook phase estimation with Trotterisation.

Return type:

float

getPhaseTextbookQubitised(qureg, hamiltonian, qpe_ancillas, qubitisation_ancillas)#

Execute Textbook phase estimation with Qubitisation.

Return type:

float

State preparation#

State preparation methods for the simulation backend.

initHartreeFockStateBK(qureg, num_electrons, num_qubits)#

Initialise a Qureg to the HF state in the Bravyi-Kitaev mapping.

initHartreeFockStateJW(qureg, num_electrons)#

Initialise a Qureg to the HF state in the Jordan-Wigner mapping.

initHartreeFockStateParity(qureg, num_electrons, num_qubits)#

Initialise a Qureg to the HF state in the parity mapping.