Comments (1)
(CCing @kilimanjaro @notmgsk)
I think this is an item worth implementing soon, especially given @kilimanjaro's work to allow for-effect computations, and my work on custom allocators. My inclination is to have something like the following:
- Remove the current persistent/shared memory CLI options.
- Add an option like
--allow-persistence
that enables APIs to allow persistent connections. - Add a global database
**persistent-qvms**
which maps afixnum
token to a(qvm lock metadata)
triplet. There should be a wrapper macro(with-persistent-qvm (qvm token) &body body)
that bindsqvm
to the persistent qvm named bytoken
, but first gated by acquiring and releasing the lock. It would be something like
(QVM TOKEN METADATA) := lookup TOKEN
with LOCK held:
if QVM was marked for deletion: error
bind QVM to variable:
execute body
- Add an endpoint
MAKE-PERSISTENT-QVM
to create a new persistent QVM, which includes the kind of QVM, what kind of allocation it has, etc. This gives you back some kind of token, and it internally adds to a global database**persistent-qvms**
. - Add an endpoint
PERSISTENT-QVM-INFO
to describe a QVM named by a token. - Add an endpoint
DELETE-PERSISTENT-QVM
to delete a QVM. I don't expect in general that this is called often, but seems reasonable. - Ensure all of the QVMs are released on exit.
- Define which API methods can use the token as input. A quick hack would be to bind a special variable
*persistent-token*
and havemake-appropriate-qvm
do the lookup. But I'd rather not make qvm-app more hacky.
The biggest challenge is going to make sure we don't spaghettify the code more. There's an outstanding issue #40 which generically touches on this. Maybe we can do this surgery carefully, cleaning up previous mistakes.
(I think one way to start this is to get rid of passing around this extraneous noise model information all over the place. But maybe that's too hard for now. Perhaps we do away with Kraus operators in Quil files, but that's for another issue.)
from qvm.
Related Issues (20)
- Possible a logical issue of qvm HOT 1
- qvm server crashes if version check is not disabled
- generic function re-definition
- Write an RX-based Rabi experiment as a test
- MAKE-EA removed from SBCL, breaking intrinsics
- Port 5000 busy on Mac HOT 2
- YASON variable unbound
- app-ng tests seem broken, at least locally
- use SB-SIMD in intrinsics
- delete app-ng HOT 1
- Build fails: System "cl-quil/frontend" not found HOT 1
- Fails to find libexpokit.so in /usr/local/lib
- bump QVM heap limit when compiling
- Compiling on ARM64 requires removal of AVX2 mention HOT 6
- MADPI is not a nice acronym, replace with "FEYNMAN" or so
- update copyright, author, etc. information
- Memory is not reset between trials
- Circular dependency causes build to fail HOT 2
- Clarification on QVM capabilities
- Bump version to 1.18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qvm.