Tuesday, December 31, 2024

Denoms

 I was asked to explain about 'denomination' as this is a

parameter one may alter when playing a Vegas slot machine. 

The key to understanding here - and this was outlined by a slots 

engineer - is that the machine's play programming only ever deals 

with credits. The player bets on multiples of credits and winnings 

are acquired as credits from a winning combination.The money outputs 

are calculated from there...


This is interesting, and helps explain the hoopla around any win. The

machine then has math to do to express one's winnings. Another consideration:

taxes. The casino cannot hand over large winnings without taxation papers...

Below(5:01):



Monday, December 30, 2024

Mappings

 So which is the most accurate: the Mercator projection we are all used to,

or the Authagraph map, developed by a Japanese architect in 1999?


Mercator:

                                                      


Authagraph:









So how is the Mercator map useful?

                                                                                       

                                                     *     *     *

                                                                




                     




Sunday, December 29, 2024

Feeling Good

 I am NOT encouraging anyone to gamble. This is a feel-good moment for

the holidays!!


Let's do this...


                                                               *     *     *


Saturday, December 28, 2024

The Roll






11 Best Slot Machines To Play In Las Vegas

                                                              *     *     *

Asked the various AIs for betting strategies at the slots, but they all gave me

advice on playing the slots : time yourself, know your limits, don't get emotional,

don't chase losses...


One is free to change the amount one is betting at every turn, and it would seem to me

this is where the art of the thing comes in. Like betting more if one is winning (and not

if one is on a loosing streak, or if one has won but is till in a loss position). It has to do

with the player, and not the machine.


Or again betting progressively on a slot that pays out more often (low volativity)...


Advice from META, below:

https://meta.ai/s/t7NJaS51oBSu6jN6/

Friday, December 27, 2024

Grizzly

 from COPILOT:                                                                         

How would a Grizzly bear eat a salmon it had caught; would it discard the head and skin, or would it eat the fish whole?

Grizzly bears are quite strategic when it comes to eating salmon. They often prefer to eat the most nutritious parts of the fish first, such as the skin, brain, and eggs, which are rich in fat and nutrients. They might discard the less nutritious parts, like the head and the rest of the body, especially if food is abundant. However, if food is scarce, they are more likely to eat the entire fish.

If you have any more questions or need further assistance, feel free to ask!


Thursday, December 26, 2024

Dim Sum

 For the adventurous:

https://youtube.com/shorts/fkt_Ve3NtW0?si=ZzSAByAG9rTqHaU1

                                               *     *     *

This recipe looks unusual, but is actually delicious!!

https://youtube.com/shorts/JddBHWexspU?si=Lj-BDsRRXwL24y4p


Wednesday, December 25, 2024

Sonic_B

 Wait, what!? Sonic Branding??


                                                                *     *     *

                                                                        

Tuesday, December 24, 2024

Trading

 Strictly speaking, Canada is not the US' greatest trading partner, Mexico is!

Below, COPILOT does the math from monthly US Census releases:

                                                                     




There are two aspects trade: imports and exports (hence, Balance of Trade). Too

many imports, a lower currency might be useful making one's exports more attractive.

Too many exports, one might want a stronger currency to go shopping in outside

markets...




One can follow the perilous fate of the Canadian dollar from Yahoo finance:

                                                                    



*     *     *

The price of oil is low, China's growth is less than expected, and housing is an issue.

Did find evidence that the presure on housing in the US might indeed be coming from

large investors buying up family housing for profit (an issue that Robert Kennedy had

brought up in the autumn election). Noteworthy here is that such a bubble rises fast,

but can also deflate quickly...


But enough with all that.


                                                         *     *     *

                                                                        


                                                                          *     *     *

This year, Christmas and Hanukkah fall on the same calendar day. Just made

cookies from a Joshua Weissman recipe:

                                                                      


                                                                             



💝 They're bomb!!!

Monday, December 23, 2024

Sunday, December 22, 2024

e-comm

 The rise of e-commerce is something of great interest in he USA. Amazon

acoounts to close to 40% of it.

https://capitaloneshopping.com/research/amazon-statistics/

                                                             


In Canada, hard to know how thw numbers compare. Asked COPILOT for

 an overview:

Sure! Here are some key statistics on e-commerce as a percentage of retail sales in Canada from 2000 to the present:

  1. 2000-2010: E-commerce was relatively small, with less than 1% of total retail sales.

  2. 2011-2018: E-commerce began to grow, reaching around 3% of total retail sales by 2018.

  3. 2019: E-commerce accounted for 3.9% of total retail sales.

  4. 2020: Due to the COVID-19 pandemic, e-commerce saw a significant increase, reaching 6.9% of total retail sales.

  5. 2021: E-commerce continued to grow, peaking at 6.6% of total retail sales.

  6. 2022: E-commerce accounted for 6.2% of total retail sales.

  7. 2023: E-commerce is expected to continue growing, with projections indicating it will reach 13.4% of total retail sales by 2025.

                                                                         

Saturday, December 21, 2024

Stuff

 I was asked, about yesterday's post, how one knows the statevector coefficient value

of a qubit with a Hadanard gate, is 1/2^.5!!


The statevector equation is a probbility equation, but it is also more. It contains, as well, 

phase information about the qubit, information that governs interference effects with

other qubits. It is, in effect, a simplified Schrodinger equation that applies to a single

qubit while the true equation applies to a system.


Below COPILOT:

What are the inputs to the Schrodinger equation?

The Schrödinger equation requires several key inputs to describe the evolution of a quantum system:

Wave Function (ψ): The initial state of the system, represented by the wave function ψ(x, t), which contains all the information about the system's state.

Hamiltonian (H): The Hamiltonian operator, which represents the total energy of the system, including both kinetic and potential energy. It determines how the wave function evolves over time.

Potential Energy (V): The potential energy function V(x), which describes the potential energy landscape in which the particle moves. This is part of the Hamiltonian.

Initial Conditions: The initial conditions of the system, such as the initial wave function ψ(x, 0) at time t = 0.

Boundary Conditions: The boundary conditions that the wave function must satisfy, which depend on the physical setup of the problem (e.g., the wave function must go to zero at the boundaries of a finite potential well).

These inputs allow the Schrödinger equation to describe the time evolution of the wave function and predict the behavior of the quantum system.


Is phase a relevant concept here?

Yes, phase is a highly relevant concept in the context of the Schrödinger equation and quantum mechanics in general. The wave function, which is a solution to the Schrödinger equation, is a complex-valued function. This means it has both a magnitude and a phase.

The phase of the wave function plays a crucial role in quantum interference and superposition. When two or more wave functions overlap, their phases determine how they interfere with each other—constructively or destructively. This interference pattern is fundamental to many quantum phenomena, such as the double-slit experiment.

In summary, the phase information in the wave function is essential for accurately describing and predicting the behavior of quantum systems.


How is the wave function equation arrived at?

                                                                       



So, what happens over time?

                                                                           


In quantum computing, phase applies to a single qubit while in quantum physics, it applies to a system. Explain...

1. Quantum Computing: In quantum computing, phase information is associated with individual qubits. A qubit can be in a superposition of the basis states |0⟩ and |1⟩, represented as: |ψ⟩ = α|0⟩ + β|1⟩ 

Here, ( α ) and ( β ) are complex numbers that include both magnitude and phase. The phase difference between the components of the superposition state affects the behavior of the qubit, especially during quantum operations and interference. Quantum gates, such as the Hadamard gate and phase gate, manipulate the phase of qubits to perform computations.

2. Quantum Physics: In quantum physics, phase applies to the entire quantum system, which can consist of multiple particles or fields. The wave function of a system, represented as ψ(x,t), is a complex-valued function that includes phase information. The phase of the wave function plays a critical role in phenomena like interference, diffraction, and entanglement. For example, in the double-slit experiment, the phase difference between the wave functions passing through the two slits leads to an interference pattern on the screen.

In summary, while phase information in quantum computing is often discussed in the context of individual qubits and their superpositions, in quantum physics, phase applies to the entire wave function of a system, influencing the behavior and interactions of particles within that system.

Physics; what is the Born rule?

The Born rule is a fundamental principle in quantum mechanics that provides a way to calculate the probabilities of different outcomes of a quantum measurement. It was formulated by Max Born in 1926 and is essential for interpreting the wave function.

According to the Born rule, the probability of finding a quantum system in a particular state after a measurement is given by the square of the absolute value of the wave function (or statevector) at that state. Mathematically, if ψ(x)  is the wave function of the system, the probability density P(x)  of finding the particle at position  x  is:

 P(x) = |ψ(x)|^2 

This rule applies to all quantum systems and is crucial for making predictions about the behavior of particles and other quantum entities.

*     *     *

How Quantum Information Theory is a wider field than Quantum Computing:




Friday, December 20, 2024

Montreal_Newspapers

 Interesting pieces from today's Montreal Press:

from La Presse:

Parti libéral du Canada | À la recherche d’options pour élire un nouveau chef | La Presse


from Le Journal de Montreal:

Sécurité à la frontière: il fallait que Trump nous réveille? | JDM


                                                           


                                                       *     *     *


                                                                     



COPILOT:

Solciste; does the change in daylight hours actually slow down around the time of a solciste?

Yes, the change in daylight hours does slow down around the time of a solstice. This is because the Sun's apparent motion along the horizon changes more slowly near the solstices compared to the equinoxes. During the solstices, the Sun's declination (its angle relative to the celestial equator) changes very little from day to day, resulting in minimal changes in the length of daylight.

In contrast, around the equinoxes, the Sun's declination changes more rapidly, leading to faster changes in the length of daylight. This is why you might notice that the days seem to lengthen or shorten more quickly around the equinoxes than around the solstices.



The S_cat

 COPILOT:

Quantum Computing; what is an observable in quantum mechanics and what is in in quantum information theory?

In quantum mechanics, an observable is a physical quantity that can be measured, such as position, momentum, or energy. Mathematically, observables are represented by Hermitian operators acting on the state space of the quantum system. The eigenvalues of these operators correspond to the possible measurement outcomes, and the eigenvectors represent the states in which the system will be found upon measurement.

In quantum information theory, an observable retains its fundamental role as a measurable physical property. However, the focus is often on properties relevant to quantum information processing, such as qubit states and entanglement. Observables in this context are also represented by Hermitian operators, and they are used to extract information from quantum states, perform measurements, and analyze quantum algorithms.


quantum Information theory deals with on, off or spin up and spin down. What is the analog for that within physics?

In quantum information theory, the concepts of "on" and "off" or "spin up" and "spin down" correspond to the binary states of a qubit, which are typically represented as |0⟩ and |1⟩. These states are the quantum analogs of classical bits, which can be either 0 or 1.

In physics, particularly in quantum mechanics, these states can be represented by the spin of an electron or other particles. For example:

Spin Up (|↑⟩): This state can be associated with the qubit state |0⟩.

Spin Down (|↓⟩): This state can be associated with the qubit state |1⟩.

These spin states are fundamental in quantum mechanics and are used to describe the intrinsic angular momentum of particles. The superposition of these states allows qubits to exist in a combination of |0⟩ and |1⟩ simultaneously, enabling the powerful computational capabilities of quantum computers.


So the odds aren't always the same between these two states!!??

                                                             



How is this simultaneous?

                                                                                



But these is only one statevector at any one time...

You're right! At any given moment, a qubit is described by a single state vector, which represents its superposition of states. This state vector encapsulates all the information about the probabilities and phases of the qubit being in the |0⟩ or |1⟩ state.

The state vector is a linear combination of the basis states |0⟩ and |1⟩, and it evolves according to the principles of quantum mechanics. When we measure the qubit, the state vector collapses to one of the basis states, and we observe a definite outcome (either |0⟩ or |1⟩). However, until the measurement is made, the qubit exists in a superposition, described by the state vector.

So, while there is only one state vector at any given time, this vector represents a superposition of multiple possible states, allowing the qubit to explore many possibilities simultaneously.


How can quantum computing claim running a large number of states simultaneously?

Great question! Quantum computing leverages the principles of superposition and entanglement to process a vast number of states simultaneously. Here's how it works:

Superposition: A qubit can exist in a superposition of both |0⟩ and |1⟩ states. This means that instead of being in a definite state, a qubit can be in a combination of states. For example, a single qubit in superposition can represent both 0 and 1 at the same time.

Entanglement: When qubits become entangled, the state of one qubit becomes dependent on the state of another, no matter the distance between them. This creates a complex, interconnected system where the state of the entire system cannot be described independently of each qubit.

Parallelism: Due to superposition and entanglement, a quantum computer can process multiple possibilities simultaneously. For example, with 𝑛 qubits, a quantum computer can represent 2^𝑛 different states at once. This exponential growth allows quantum computers to perform many calculations in parallel, vastly increasing their computational power.

Interference: Quantum algorithms use interference to amplify the probability of correct solutions and diminish the probability of incorrect ones. By carefully designing the quantum circuit, constructive interference enhances the likelihood of measuring the optimal solution.

So, while a qubit is described by a single state vector at any given time, this state vector represents a superposition of multiple states, allowing quantum computers to explore many possibilities simultaneously and solve certain problems more efficiently than classical computers.


And every time we do a shot, a different statevector is at play!!??

Yes, exactly! Each time you perform a measurement (or "shot") on a quantum system, the state vector collapses to one of the possible basis states (e.g., |0⟩ or |1⟩ for a single qubit) based on the probabilities defined by the superposition. After each measurement, the system is reset to its initial state or a new state, and the process can be repeated.

In quantum computing, running multiple shots allows you to gather statistics about the outcomes. By performing many measurements, you can estimate the probabilities of different states and gain insights into the behavior of the quantum system. Each shot provides a snapshot of the state vector at the moment of measurement, and the results can vary due to the probabilistic nature of quantum mechanics.


If qubit1 has a hadamard gate, is its statevector at every shot 50/50?

                                                                       


Consequently,  on a simulator set to ideal states, there should be a 50/50 beakdown on each shot?

Yes, exactly! On a simulator set to ideal conditions, when a Hadamard gate is applied to a qubit initially in the |0⟩ state, each shot should result in a 50/50 breakdown between the |0⟩ and |1⟩ states. This is because the Hadamard gate creates an equal superposition of the two states, giving each an equal probability of 50%.

If you run multiple shots, you should observe approximately half of the measurements resulting in |0⟩ and the other half in |1⟩, reflecting the equal probabilities.

                                                                  *     *     *


The mathematics of Statevectors is thus straightforward. My two

competing elements, |1> and |0> are in a Pythagorian relationship, 

on the unit circle. For a qubit with a Hadamard gate, the amplitude

of each is 1/2^.5 or .7071. What is the probability for either of showing

up on measurement is .7071^2, which is .5...


On a strict pythagorean basis, each of two equal amplitudes could be expressed 

as 1/2^.5:

                                                         


As probabilities on 1, this becomes:




.8 and .6 would play out at .64 and .36, also equal to 1.


Good to remember that one is on the trigonometric circle. Adding the two amplitude

values straight up will gives values on a curve. (It's a circle, but our frame of reference 

on it is fixed).

                                                                                    


                                                                          



The python code for this was generated by COPILOT:

                                                                              

A more colorful version:

                                                                        



Thursday, December 19, 2024

Step5

 To finish the cirq max-cut tutorial. We have reached Step 5.

We first produce a graph of the structure of the max-cut. This is possible because

we are working from the original Sycamore structure shown earlier.


Yes, in the QAOA Max-Cut tutorial, we start with the initial Sycamore structure. The Sycamore processor is a quantum processor developed by Google, and it's used to demonstrate quantum supremacy and perform various quantum algorithms, including QAOA.

In the context of the Max-Cut problem, the Sycamore structure refers to the specific layout and connectivity of qubits on the Sycamore processor. This structure is used to define the graph on which the Max-Cut problem is solved. By visualizing the nodes and edges of this graph, we can better understand the problem setup and how the QAOA algorithm operates on it.



Next, we are given the best control parameters:

The code in Step 5 is used to find the best control parameters from a set of experimental values. Specifically, it identifies the index of the maximum value in the exp_values array, retrieves the corresponding parameters from the par_values array, and prints them.


Follows the actual simulation:

                                                                        

We are looking for the best cut size. 

cirq max-cut tutorial; how does minimizing the cost function maximize the cut?

The Max-Cut problem involves partitioning the vertices of a graph into two distinct sets such that the number of edges between the sets is maximized. In the context of the Quantum Approximate Optimization Algorithm (QAOA) implemented in Cirq, the cost function represents the number of edges that are cut by a given partition.

Here's how minimizing the cost function maximizes the cut:

  1. Cost Function Definition: The cost function is defined as the negative of the number of edges between the two sets. Therefore, minimizing the cost function is equivalent to maximizing the number of edges cut.

  2. QAOA Circuit: The QAOA circuit is designed to find the optimal partition by evolving a quantum state through a series of unitary operations. These operations are parameterized to minimize the cost function.

  3. Optimization Loop: An outer optimization loop adjusts the parameters of the QAOA circuit to minimize the cost function. As the cost function decreases, the number of edges between the sets increases, thus maximizing the cut.

  4. Expected Value Calculation: The expected value of the cost function is calculated for different parameter settings. The parameters that yield the lowest expected value correspond to the partition with the maximum cut.

On 12 qubits, the max-cut size is 28.02....... What are the units here?

In the context of the Max-Cut problem, the value 28.02 represents the expected value of the cut size, which is a dimensionless quantity. This value is derived from the optimization process and indicates the average number of edges that are cut by the partition of the graph. Since it's an expected value, it doesn't have specific units but rather reflects the performance of the algorithm in finding a good partition.

Code for the random cut:

                                                                      


The print functions:

                                                                        


The max-cut:
                                                                      

The random:


Just examining the two images, the max-cut red notes have 14 links, whereas the random 

reds show 11...

                                                                   *      *     *

    COPILOT:                                                                            



META AI:

                                                                              



MERLIN (ChatGPT3.5):