Quantum Bayesian Networks

January 11, 2019

Qubiter now has Placeholders for gate angles

Filed under: Uncategorized — rrtucci @ 5:38 am

placeholder

The word “Placeholder” is used in Qubiter (we are in good company, Tensorflow uses this word in the same way) to mean a variable for which we delay/postpone assigning a numerical value (evaluating it) until a later time. In the case of Qubiter, it is useful to define gates with placeholders standing for angles. One can postpone evaluating those placeholders until one is ready to call the circuit simulator, and then pass the values of the placeholders as an argument to the simulator’s constructor. Placeholders of this type can be useful, for example, with quantum neural nets (QNNs): in some QNN algorithms, the circuit gate structure is fixed but the angles of the gates are varied many times, gradually, trying to lower a cost function each time.

This brief blog post is to announce that Qubiter now has such placeholders. Hurray! Placeholders is a nice feature that Google’s qc simulator Cirq and Rigetti’s qc simulator PyQuil, already have (they call them parametric or symbolic gates), so it has been irking me for some time that Qubiter didn’t have them too. Got to keep up with the Joneses and the Kardashians, you know.

Qubiter implements placeholders via a class called PlaceholderManager. You can already read an example of placeholder usage in the main() method at the end of that class. I also intend to write a Jupyter notebook, probably this weekend, illustrating their use.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: