Replies: 6 comments
-
Hi @hansheum 👋
Hum... I would say that the more specific each thread, the better! Else it is going to be rather long (not necessarily bad) and have multiple parallel conversations (yes, necessarily bad).
Super! You need to advertise these here.
Ah, yes. Good call. Initially, when I created the "Video" channel, I was thinking of Art Film, Multimedia or Music video, but eventually some Documentary films too. Recordings of event presentations are also good to share and keep track of on the database, yes.
Great challenge to begin with! And btw, that's pretty impressive patch for having only worked on it for 1 week. For the record, you can easily share patches from Max by selecting all your objects (
Just add a With that, me or anyone else can just copy that code and, in Max, I shall transcribe these into the FAQs ;) In this case, however, since you want to show the state of the patch at a certain moment, the screenshots are very helpful. Thanks.
Ok. First things first, you don't really need to keep growing the circuit like that. In this scenario, all you really need are those new set of gates and not the previous ones. You can reinitialize the On another note, I'm happy to see you using OSC-Qasm (in headless mode 😎 ). But I am curious to know: why did you decide to use osc_qasm's default simulator instead of retrieving counts with The QAC Toolkit's built-in simulator?
Yeah, I can't really see what the patch chords are doing from the screenshot... 😆
It does seem to be a matter of message ordering. But I can't know for sure with this info. Good news is that The QAC Toolkit comes with a couple examples that show this programmatic generation and execution of quantum circuits - which btw, is exactly the reason why you would want to have such tools in an environment like Max! 😉 |
Beta Was this translation helpful? Give feedback.
-
here is a simplified example
guess what tune this is 😄 |
Beta Was this translation helpful? Give feedback.
-
Thank you for the detailed reply!
Makes sense, updated the title now.
I'll remember that for the future! Not sure where I should post/submit this one? In any case, here is the presentation: https://www.youtube.com/watch?v=JqBZ8o8hWdA
Well ... I am notoriously bad at getting started with stuff in time, so I actually did this in 1 day (including learning how to operate Max), namely the day before the event 😅
Cool! In that case, here is my patch in its current version:
Yeah I was considering doing that, I was just unsure whether there was a different way to reinitialize a circuit other than creating a new one with the same name.
Oh yes, very happy with the performance of this thing!
I have been using a combination of bondos and triggers, but that's good to know—I am still learning Max best practices here (and will be for a while I imagine). I'll try to improve the flow going forward.
Simply because that was the example I was following along with, and I wanted to see that the connection to the quantum hardware was working when I set it up, for possible use in the demo (I ended up skipping that part) ... and honestly I didn't have time to figure out how to switch to the built-in simulator 😄
Yeah sorry about that, the bottom screenshot in the original post should be better for this (the chord was just triggering the message containing the second set of gates 1 second after the first one, instead of having to be triggered manually). But now you can run the code and try for yourself!
The curious thing is that it works fine when clicking manually, in the same order as the automatic triggers, regardless of for instance increased delays between each triggering to make time for processing. I'd be curious if you encounter the same error in your test run.
Cool, I'll have a look!
Oh wow, bunch of Max objects I haven't seen before here. I'm sure I'll learn a bit dissecting this! ... And I think a comment in your patch may have spoiled the answer to your riddle 😄 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi, Back from ISQCMC Berlin :) Back to this thread.
Cool, I enjoyed the drawings. Please go ahead and make a simple post under the Video category. You could title it: [Talk] Why Quantum Music? [Hyfer 2023 festival] (2023-09-22)
I see. It receives the request for a state vector and qasm code before it actually gets a chance to build the circuit. This has to do with max threading, certain max objects run on a different thread, which is a rather complicated subject, and I would not like to go there. So I'll try to keep it simple. Can you please confirm: in Max go to options menu > audio status. Is Alternatively, if you want to keep overdrive enabled: add a |
Beta Was this translation helpful? Give feedback.
-
Very nice, I hope it was a success! Hopefully next time around I will be able to attend as well, maybe to show off this little vision I'm building. Will the symposium be uploaded to youtube? I would love to watch it.
Ok, I'll do that!
Yep, that fixed it. Mysteriously, disabling and immediately re-enabling I don't care too much about this problem any more, as the project has evolved to use midi from Ableton for triggering samplings, which seems to work a lot better (and more closely matches the initial vision anyway). But it's nice to know that we found the root of the issue—which makes it up to you as the developer if this counts as a bug worth tracking or not. (Maybe it just warrants a note somewhere with the fix?) |
Beta Was this translation helpful? Give feedback.
-
Hi OCH, and thank you for the invitation to the forum! I'll explain the issue I mentioned in the email below. I gave this thread a rather generic title in case we want to collect such discussions in one place – but feel free to change it if you have other plans.
For context, I started playing around with the toolkit only a week ago, after being aware of Quantum Music and its community for the last couple of months. A group from my university were doing a popular science event on Art & Mathematics, and I decided months ago that talking about Quantum Music, and showcasing a brief demo, would make for a good entry. Although the demo ended up way more simplistic than I had hoped, mostly due to my lack of experience in Max, I would call the event a success; I might share an iPhone video of my showcase in a different thread.
On to the issue that I am currently struggling with. I am trying to build a simple program that translates a measured state into a note. The first part of this works perfectly: if I prepare a state and measure it (via the qasm simulator) the note is correctly translated. See screenshot (and apologies if its a mess, I am sure there are simpler ways to do this and that I am reinventing a lot of wheels, but that's half the fun isn't it). After initializing, the patch plays a simple C:
Then I add a bunch of gates (top right message), and measure. Again, this works fine – in this example, an E is sampled and starts playing:
I next want to add a bunch of additional gates and measure again. This works as it should if I manually click the boxes containing the code one after the other, as can be verified by the qasm code (here a C one octave higher was sampled and is playing):
What I want though, is for the second set of gates to be added, and the second state measured and the corresponding note played, a set time interval after the first, e.g. 1000ms. But when I set this up (note the added patch cord on the right in the screenshot below), the measurement gates fail to be added to the qasm code, which appears to make the second sampling happen according to the first statevector rather than the updated one. In this screenshot I have re-initialized and pressed the button labelled "Start":
Now we got the result 0100 E, which should not be possible according to the updated statevector.
I don't know whether this is a problem with my understanding of the MSP objects I use, or the QAC toolkit, or a bug. Any clue?
EDIT: Here's a cleaner version of the patch, with details like the translation from measurement to notes and the flow of triggering och.microqiskit tucked away in encapsulations. Should make it a bit more readable. It works equivalently, and in particular the above issue remains.
Beta Was this translation helpful? Give feedback.
All reactions