Open stylewarning opened 5 years ago
qvm = PyQVM(2)
p = Program(H(0), CNOT(0, 1), CNOT(1, 0), CNOT(1, 0), MEASURE(0, 0), CNOT(1, 0), MEASURE(1, 1))
qvm.load(p)
qvm.run()
ValueError: PyQVM can only run run-and-measure style programs: Qubit 0's last operation is a gate
There are QVM and QVMConnection objects. Why? When is one preferred over the other? Why does QVM.run() say it returns bitstrings when actually it returns a QVM object.
Why doesn't PyQVM use Wavefunction to back its wavefunction amplitudes?
Some work on improving pyqvm here: https://github.com/rigetti/pyquil/pull/874/files
Some notes from @joshcombes about connections with forest.benchmarking
:
Point 6: There are some visualization routines implemented at https://github.com/rigetti/forest-benchmarking/blob/master/forest/benchmarking/plotting/ . Could be that other visualization routines belong here too.
Point 7: There are some things along these lines: https://github.com/rigetti/forest-benchmarking/blob/superoperator-cleanup/forest/benchmarking/superoperator_conversion.py .
Point 10: Also some related things: https://github.com/rigetti/forest-benchmarking/blob/master/forest/benchmarking/random_operators.py . It would be nice if whatever was envisioned for 10 at least made contact with this.
Point 12: have u considered PyQVM
Re: Point 6 & Point 7: Plot the Pauli Transfer Matrix representation for processes, using @joshcombes's code @ecpeterson pointed to. States should be plotted in a similar manner using The Real Density Matrix™️ representation (Pauli basis representation of the density matrix put into a matrix format). That is not in forest.benchmarking
yet, but should be easy to add.
Re: Point 11: Batch mode for QPUs too, please @stylewarning . Let's make this happen.
Point 6: I just noticed there is also plot_pauli_transfer_matrix
in https://github.com/rigetti/forest-benchmarking/blob/master/forest/benchmarking/tomography.py . I'm not saying either are great but we should probably make one great :) We should not forget the grove code too.
The one in forest-benchmarking is, I think, superior to mine.
Re: Point 11: Batch mode for QPUs too, please @stylewarning . Let's make this happen.
@marcusps What does batch mode mean for a QPU if you can send it jobs as fast as it can process them with no competition?
There are still advantages to this (as evidenced by internal usage):
For example in Python you can do something like this:
results = send_jobs_to_qpu_and_get_iterator_back(jobs)
for result in results:
# local processing and execution will both be happening here
process_result(result)
This is a general list of issues that can be broken out into smaller issues, but I wanted to get them down.
Props to @ecpeterson for writing these. I'm just the messenger. In general, these center around how easy (or not easy) it is to use the QVM with pyQuil.
ctypes
casting and Erik does numpy buffers and pyQuil doesstruct.unpack
.QVM <: QAM
vsWavefunctionSimulator
split? There’s also aReferenceDensitySimulator
that doesn’t belong to this hierarchy.forest.benchmarking
process tomography code and extract from it data suitable for feeding into a tomograph plotter? Like there are standard methods for generating the data, but it would be nice to also have a standard munger to get it into the right form.forest.benchmarking
code to my local QVM, and this was very slow: 5-10m for a 1% inaccurate picture of a 2Q operator. He thinks the bulk of the slowdown was in the communications layer; it would be worth profiling this and improving these repeated-call scenarios.