Skip to content
qiskit hackathon project. State preparation via Quantum compression
Jupyter Notebook Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
experiment_results
notebooks
test
.gitignore
README.md
State Preparation via Quantum Compression With applications to VQE.pdf
__init__.py
compress.py
multideterminant_prep.py
requirements.txt

README.md

VQompress

Methods for state preparation via Quantum compression

Usage:

See the compress.py's main block for an example of a multi-process experimental run (across a grid of parameters), or notebooks/Test compress for a full Jupyter notebook example.

cross_validate_qnn_depth(target_circuit, n_shots, n_iters, n_layers, run=0):

inputs:
target_circuit: QuantumCircuit object encoding your state preparation

n_shots: integer number of samples used when evaluating training circuit on one set of parameters

n_iter:  integer number of SPSA optimization steps (number of parameter updates)

n_layers: the number of layers in the learned quantum circuit. One layer has 
          a tiling of single qubit rotations followed by a tiling of two qubit 
          entangling operations. 
n_runs: number of simulations to run in parrallel
returns:
 xr.Dataset object encoding the parameters and fidelities for various QNN circuit depths

def build_compression_model(registers, model_parameters):

inputs:
registers: QuantumRegisters to be used in compressed circuit

model_parameters: ndarray of parameters for learned model (obtained from cross_validate_qnn_depth)
returns
compressed_circuit: QuantumCircuit object
You can’t perform that action at this time.