Sunday, August 4, 2024

Necessary

 

source Andi Sama

Copilot:

Yes, the outer product (also known as the projection operator) is essential for calculating probabilities in quantum measurements. Let me explain how it works:

  1. State Vectors and Measurement:

    • In quantum mechanics, the state of a quantum system is represented by a state vector (usually denoted as |ψ⟩).
    • When we perform a measurement on a quantum system, we want to know the probability of obtaining a particular outcome (e.g., measuring a specific state).
  2. Projection Operators:

    • The outer product allows us to define projection operators that project a state onto a specific subspace.
    • Given a state vector |ψ⟩, the projection operator onto this state is |ψ⟩⟨ψ| (the outer product of |ψ⟩ with its complex conjugate).
    • The resulting matrix is Hermitian (self-adjoint) and represents the probability of measuring |ψ⟩.
  3. Probability of Measurement:

    • Suppose we have an observable (such as an operator corresponding to a physical quantity like spin or energy).
    • The probability of measuring a specific eigenstate |ϕ⟩ (which is an eigenvector of the observable) is given by:

      P(|ϕ⟩) = |⟨ϕ|ψ⟩|^2 = |ψ⟩⟨ϕ| |ϕ⟩⟨ψ| = |ψ⟩⟨ψ| |ϕ⟩⟨ϕ|

    • Here, |⟨ϕ|ψ⟩|^2 represents the squared magnitude of the inner product between |ϕ⟩ and |ψ⟩.
    • The projection operator |ψ⟩⟨ψ| projects the state |ϕ⟩ onto the subspace spanned by |ψ⟩.
  4. Generalization to Multiple Qubits:

    • For a multi-qubit system, the outer product extends to tensor products of individual qubits’ projection operators.
    • The joint probability of measuring a specific outcome for each qubit is obtained by multiplying the relevant projection operators.

In summary, the outer product is crucial for calculating probabilities in quantum measurements. It allows us to express quantum states and their relationships, making it a fundamental tool in quantum computing and quantum information theory. If you have any more questions or need further clarification, feel free to ask! 😊🔬

                                                                          *     *     *

Decided to use two vectors from Andi Sama and see if I could output probabilities{

                                                                         



Got help with the decomposition:


                                                                  


Gemini:

You are absolutely right! You can't directly get the probabilities for 00, 01, 10, and 11 from the outer product alone. Here's why:

  • Outer Product vs. Combined State: The outer product (|\Psi\rangle \langle \Phi|) describes the interaction between the two states, but it doesn't directly give you the probabilities of the combined system's states.
  • Tensor Product: To find the probabilities of 00, 01, 10, and 11, you need to work with the combined state of the two systems. This is achieved by taking the tensor product of the individual states: (|\Psi\rangle \otimes |\Phi\rangle).

Here's how to do it:

  1. Tensor Product:

    • (|\Psi\rangle \otimes |\Phi\rangle = (-\frac{4}{5}i|0\rangle + \frac{3}{5}|1\rangle) \otimes (\frac{1}{2}|0\rangle + \frac{\sqrt{3}}{2}|1\rangle))
    • Expand the tensor product: (|\Psi\rangle \otimes |\Phi\rangle = -\frac{2}{5}i|00\rangle -\frac{2\sqrt{3}}{5}i|01\rangle + \frac{3}{10}|10\rangle + \frac{3\sqrt{3}}{10}|11\rangle)
  2. Probabilities:

    • P(00): (|-\frac{2}{5}i|^2 = \frac{4}{25})
    • P(01): (|-\frac{2\sqrt{3}}{5}i|^2 = \frac{12}{25})
    • P(10): (| \frac{3}{10} |^2 = \frac{9}{100})
    • P(11): (| \frac{3\sqrt{3}}{10} |^2 = \frac{27}{100})

In Summary:

The outer product is a valuable tool for understanding the interaction between quantum states, but it doesn't directly provide the probabilities of the combined system's states. You need to work with the tensor product of the individual states to calculate those probabilities.

                                                                               






Sent by Copilot:

Yes, the outer product (also known as the projection operator) is essential for calculating probabilities in quantum measurements. Let me explain how it works:

  1. State Vectors and Measurement:

    • In quantum mechanics, the state of a quantum system is represented by a state vector (usually denoted as |ψ⟩).
    • When we perform a measurement on a quantum system, we want to know the probability of obtaining a particular outcome (e.g., measuring a specific state).
  2. Projection Operators:

    • The outer product allows us to define projection operators that project a state onto a specific subspace.
    • Given a state vector |ψ⟩, the projection operator onto this state is |ψ⟩⟨ψ| (the outer product of |ψ⟩ with its complex conjugate).
    • The resulting matrix is Hermitian (self-adjoint) and represents the probability of measuring |ψ⟩.
  3. Probability of Measurement:

    • Suppose we have an observable (such as an operator corresponding to a physical quantity like spin or energy).
    • The probability of measuring a specific eigenstate |ϕ⟩ (which is an eigenvector of the observable) is given by:

      P(ϕ)=ϕψ2=ψϕϕψ=ψψϕϕ

    • Here, |⟨ϕ|ψ⟩|^2 represents the squared magnitude of the inner product between |ϕ⟩ and |ψ⟩.
    • The projection operator |ψ⟩⟨ψ| projects the state |ϕ⟩ onto the subspace spanned by |ψ⟩.
  4. Generalization to Multiple Qubits:

    • For a multi-qubit system, the outer product extends to tensor products of individual qubits’ projection operators.
    • The joint probability of measuring a specific outcome for each qubit is obtained by multiplying the relevant projection operators.

In summary, the outer product is crucial for calculating probabilities in quantum measurements. It allows us to express quantum states and their relationships, making it a fundamental tool in quantum computing and quantum information theory. If you have any more questions or need further clarification, feel free to ask! 😊🔬

Saturday, August 3, 2024

QuantumInfo_Lesson3

 Back to IBM learning; silly me, I gave up on lesson3 just when the explanation

of inner product was about to get simple. One can appreciate the whole thing from

a simple diagram in 2-d which represents a qubit. We are not on the Bloch sphere at all...


                                                          


The notion of Euclidian Norm, however, does come from Born's rule in Quantum

Mechanics. Below, Copilot:

In quantum mechanics, the Euclidean norm plays a crucial role in representing quantum states. Let's delve into this! 😊

1. **Quantum States and Hilbert Space:**
   - Quantum states are represented by vectors in a Hilbert space. This space can be finite- or infinite-dimensional and is defined over complex numbers.
   - A quantum state is essentially a **ray** in this Hilbert space. Rays represent equivalence classes of vectors pointing in the same direction.
   - While these states are not necessarily normalized (i.e., unit vectors), it's more convenient to work with normalized states.

2. **Born's Rule and Probability:**
   - Born's rule connects quantum states to probabilities. It states that the probability of finding a quantum system in state |x⟩ after measurement is given by |ψ(x)|².
   - To ensure that the sum (or integral) of probabilities over all possible states equals 1, we normalize the states.
   - The normalization involves taking the square root of the sum or integral: √∑x |ψ(x)|² = 1 or √∫|ψ(x)|² dx = 1.
   - Remarkably, this normalization corresponds to the **Euclidean norm** (also known as the L²-norm).

3. **Why the Euclidean Norm?**
   - The Euclidean norm (2-norm) emerges naturally due to Born's rule, which is a fundamental postulate of quantum mechanics.
   - Other norms (such as p-norms with p > 2) wouldn't be as useful because they wouldn't satisfy the necessary homogeneity property.
   - In summary, the Euclidean norm's special status arises from its connection to Born's rule and the probabilistic interpretation of .
(2) Quantum states are unit vectors... with respect to which norm?. https://quantumcomputing.stackexchange.com/questions/2729/quantum-states-are-unit-vectors-with-respect-to-which-norm.
(3) L^2-Norm -- from Wolfram MathWorld. httquantum states.

For more mathematical details, you can explore the concept of norms in vector spaces [here](https://ai.stanford.edu/~gwthomas/notes/norms-inner-products.pdf) ². If you have any further questions, feel free to ask! 🌟

Source: Conversation with Copilot, 8/3/2024
(1) Norms and Inner Products - Stanford University. https://ai.stanford.edu/~gwthomas/notes/norms-inner-products.pdfps://mathworld.wolfram.com/L2-Norm.html.



Time for Breakfast

 Men who cook are such a joy!! Breakfast at 4:20:


Friday, August 2, 2024

Inner and Outer

 Been looking through the blogs of Andi Sama on Mediuem from 2021. Found interesting 

information and a very nice intro to the math. Below:

Implementation is based on the superconducting qubit in the Josephson junction device, in which a current flows continuously without any voltage applied. It is achieved by having two superconducting materials separated by a thin insulating barrier operating at an extremely low temperature close to absolute zero, at 15 mK (milliKelvin). 

                                            *     *    *

In this NISQ-era (Noisy Intermediate Scale Quantum), a qubit is not perfect (noisy). The quantum state can only be maintained (useful to do quantum computation) in the range of just tenths of microseconds before experiencing the decaying process called decoherence.

Take a look at the following illustration. The decoherence time (T1) of a 15-qubits IBM Quantum computer on the Cloud “ibmq_16_melbourne” is 54.27 microseconds. The quantum computer is online and operational when accessed on May 18, 2021.

(... turns out a microsecond is one millionth of a second!!)

                                                *     *     *

A ket |Ψ> is a column vector, with values α and β . a bra <Ψ|is a row vector with values α*and β*. α* and β* are the complex conjugate of α and β. Complex conjugate means that we change the sign of the imaginary part of α and β from plus to minus, or vice versa. Then, we do a transpose operation following the complex conjugate operation — thus, completing the entire complex conjugate transpose operation.

(... Finally!!)

                                            *     *     *

*     *     *
The 0uter product is no different than that of the individual qubits.

*     *     *
The outer product yields four equally probable outcomes for the system.


https://www.perplexity.ai/search/quantum-computing-with-qiskit-tv0zskdSTtCi_ylvigBChA

Thursday, August 1, 2024

Helpful

 Feeling more hopeful about tomorrow's work on IBMLearn3.


Asked Copilot for the difference between the dotproduct and a projection:

In quantum computing, the concepts of inner product and projection are fundamental but serve different purposes:


### Inner Product

- **Definition**: The inner product (or dot product) of two vectors is a scalar value that measures the "overlap" between them. In the context of quantum mechanics, it is often used to determine the probability amplitude.

- **Notation**: If you have two quantum states, represented as kets \(|\psi\rangle\) and \(|\phi\rangle\), their inner product is written as \(\langle\psi|\phi\rangle\).

- **Purpose**: It helps in calculating probabilities and understanding the relationship between different quantum states. For example, the probability of transitioning from state \(|\psi\rangle\) to state \(|\phi\rangle\) is given by the modulus squared of the inner product \(|\langle\psi|\phi\rangle|^2\)¹.


### Projection

- **Definition**: A projection operator projects a quantum state onto a subspace. It is used to extract the component of a state that lies in a particular direction or subspace.

- **Notation**: If \(|\phi\rangle\) is a quantum state, the projection operator \(P\) onto this state is given by \(P = |\phi\rangle\langle\phi|\).

- **Purpose**: Projections are used to filter out specific components of a quantum state. For instance, if you apply the projection operator \(P\) to a state \(|\psi\rangle\), you get \(P|\psi\rangle = |\phi\rangle\langle\phi|\psi\rangle\), which is the component of \(|\psi\rangle\) in the direction of \(|\phi\rangle\)².


In summary, the inner product measures the overlap between two states, while a projection operator extracts the component of a state in a specific direction.

                                                                  *     *     *


Reference to a helpful site for beginners:

Qubit, An Intuition #2 — Inner Product, Outer Product, and Tensor Product in Bra-ket Notation | by Andi Sama | Medium

Anti-Correlated

 Below, the view of how parsing needs to work in Qiskit. Time flows from left to right

on  a circuit diagram, but consideration from bottom to top.

                                                                

Sideways view:
The slot is empty, so the identity matrix is entered. Because we are working from

bottom to top, the tensor product is calculated with the identity matrix first.

The CNOT column:
From the bottom, the CNOT arrangement comes first:

Applied to Ket 1:
                                                                                 

This yields Bell state 4:


*     *     *

A useful overview of Bell States. Watch the vid!!


I checked for the anti-correlated qubits...

                                                                                





*     *     *

One builds circuits the logical way for onself. It is in execution that things get

'mirrored' for the situation. 👧