Giter Club home page Giter Club logo

Comments (3)

peendebak avatar peendebak commented on August 16, 2024

#87 fixes the example, but there are still some funny things going on. The AModel object works, but I have no idea where the data is stored and how I can access this data.

This probably has to do with the ServerManager object and multiprocessing.

import matplotlib.pyplot as plt
import time, os
import numpy as np
import qcodes as qc

from toymodel import AModel, MockGates, MockSource, MockMeter

# now create this "experiment"
model = AModel()
gates = MockGates('gates', model=model)
meter = MockMeter('meter', model=model)


c0, c1, c2 = gates.chan0, gates.chan1, gates.chan2


print('c2.get: %s' % c2.get() )
print('model.gates: %s' % ( str(model._gates )) )
print('meter.amplitude: %f' % meter.amplitude.get() )
print('model._output() * model._excitation %f' % ( model._output() * model._excitation ) )
print('fine so far...')

# Now set c2
c2.set(0.5)

# model._gates is all zero!
print('c2.get: %s' % c2.get() )
print('model.gates: %s' % ( str(model._gates )) )
print('meter.amplitude: %f' % meter.amplitude.get() )
print('model._output() * model._excitation %f' % (model._output() * model._excitation ) )

print('meter.amplitude has changed, but not the model...')

model._gates[2]=10
print('c2.get: %s' % c2.get() )
print('model.gates: %s' % ( str(model._gates )) )
print('meter.amplitude: %f' % meter.amplitude.get() )
print('model._output() * model._excitation %f' % (model._output() * model._excitation ) )

print('meter.amplitude unchanged, but the model output has...')

from qcodes.

AdriaanRol avatar AdriaanRol commented on August 16, 2024

PR of @alexcjohnson pending

from qcodes.

alexcjohnson avatar alexcjohnson commented on August 16, 2024

Closed by #261 (and the whole issue is close to moot already)

from qcodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.