TruthArchive.ai - Tweets Saved By @ComancheTippie

Saved - October 21, 2023 at 3:51 AM
reSee.it AI Summary
Title: Exploring the Boundless Potential of Quantum Simulations Introduction: Quantum simulations have emerged as a powerful tool for unraveling the intricate dynamics and possibilities within quantum systems. In this article, we delve into a comprehensive exploration of various experiments conducted using Qiskit, shedding light on the behavior of quantum systems, time-dependent potentials, interference patterns, and more. By leveraging the capabilities of quantum computing, we gain valuable insights into the complex realm of quantum mechanics and its wide-ranging applications. Quantum Simulations Unveiled: Our quantum simulations encompass a diverse range of experiments, each offering unique perspectives on the behavior and potential of quantum systems. Let's embark on this captivating journey through the quantum realm. 1. Quantum Teleportation: Through the utilization of Qiskit, we delve into the fascinating realm of quantum teleportation. By harnessing the principles of entanglement and superposition, we demonstrate the ability to transmit quantum information instantaneously, transcending the limitations of classical communication. 2. Grover's Search Algorithm: Exploring the power of quantum algorithms, we delve into Grover's search algorithm. By harnessing quantum parallelism and interference, we showcase the remarkable speedup achieved in searching unsorted databases, paving the way for revolutionary advancements in information retrieval. 3. Quantum Suicide: Intriguing experiments involving quantum suicide offer insights into the peculiar nature of quantum systems. By examining the implications of quantum superposition and measurement, we explore the boundaries of reality and the enigmatic concept of observer-dependent outcomes. 4. Prisoner's Dilemma: Through quantum simulations, we delve into the realm of game theory, specifically the renowned Prisoner's Dilemma. By leveraging the principles of entanglement and quantum strategies, we unravel the potential for quantum-enhanced decision-making and cooperative behavior. 5. Error Correction Codes: The vulnerability of quantum systems to noise and errors necessitates the development of robust error correction codes. By simulating various error correction techniques, we gain a deeper understanding of their effectiveness in preserving the integrity of quantum information. 6. Variational Quantum Eigensolver: The Variational Quantum Eigensolver (VQE) algorithm serves as a powerful tool for approximating the ground state energy landscape of quantum systems. Through quantum simulations, we explore the capabilities of VQE in resolving cosmological phase transitions, unraveling the mysteries of the quantum world. 7. Quantum Machine Learning: The fusion of quantum computing and machine learning holds immense promise. By simulating quantum machine learning algorithms, we uncover the potential for quantum-enhanced pattern recognition, optimization, and data analysis, revolutionizing the field of artificial intelligence. 8. Black Hole Representation: Quantum simulations enable us to delve into the enigmatic realm of black holes. By employing quantum circuits, we explore the representation of black holes and gain insights into their behavior, shedding light on the profound mysteries of these cosmic entities. 9. Quantum Signatures: Through abstract experiments, we delve into the realm of quantum signatures. By harnessing the principles of quantum mechanics, we explore the potential for secure communication, digital signatures, and cryptographic protocols, paving the way for enhanced data security. 10. Gravitational Wave Detection: Quantum simulations offer a unique perspective on the detection of gravitational waves. By leveraging the principles of quantum mechanics, we explore the potential for enhanced sensitivity and accuracy in detecting these cosmic ripples, opening new avenues for astrophysical research. Conclusion: In conclusion, our comprehensive exploration of quantum simulations using Qiskit has provided invaluable insights into the complex dynamics and possibilities within quantum systems. From quantum teleportation to gravitational wave detection, these experiments have unraveled the potential of quantum computing in various fields, paving the way for groundbreaking advancements in science, technology, and beyond. As we continue to push the boundaries of quantum mechanics, the future holds immense promise for harnessing the power of quantum simulations to unlock the mysteries of the universe.

@ComancheTippie - Tippie 🦅

I’m halfway through my software engineering degree and I’m just realizing that I can do quantum experiments with my MacBook Pro/python. So astonished with Qiskit. This is a measurement of 1000 entanglement states in a second. https://t.co/dxAusEqFdX

@ComancheTippie - Tippie 🦅

This script first puts a qubit into a superposition of states using a Hadamard gate. It then applies another Hadamard gate to the same qubit. The superposition interferes with itself, causing the qubit to return to its initial state. The measurement at the end should mostly give you the '0' state, reflecting that the qubit has returned to its initial state due to the interference effect.

@ComancheTippie - Tippie 🦅

This will simulate quantum teleportation of the state of Q0 (which we set to '|1>' using the X gate) to Q2, using Q1 as the intermediary.

@ComancheTippie - Tippie 🦅

Grover's search algorithm has two main parts: the oracle and the Grover diffusion operator. The oracle encodes the solution into the quantum state, and the Grover diffusion operator amplifies the probability of finding the solution. For this example, we are looking for the state |11⟩, so we choose a phase oracle that flips the phase of this state. For the Grover diffusion operator, we use a sequence of gates that flips the amplitude of the state |11⟩ around the mean amplitude.

@ComancheTippie - Tippie 🦅

In this simple model, the "observer" in the Quantum Suicide experiment "survives" if the qubit measurement results in '0', and "dies" if the qubit measurement results in '1'. Because the qubit was placed into a superposition of states, there is a 50% probability of each outcome. https://t.co/50DuwGQLsy

@ComancheTippie - Tippie 🦅

Prisoners Dilemma. In this case, the counts correspond to the outcomes of the game. The states |00> and |01> can be interpreted as both players cooperating and player A cooperating while player B defects, respectively. The states |10> and |11> can be interpreted as player A defecting while player B cooperates and both players defecting, respectively.

@ComancheTippie - Tippie 🦅

This is a second observer to the first observer, so we don't decohere the first state. https://t.co/tBrxo3j1D1

@ComancheTippie - Tippie 🦅

In this experiment, the qubit starts in a superposition (represented by the Bloch vector pointing along the equator of the Bloch sphere). Then, decoherence is introduced, which causes the state to collapse into either |0⟩ or |1⟩, depending on whether a bit-flip error occurred or not. The histogram plot shows the distribution of outcomes over many shots. The "world splitting" would correspond to these different outcomes, with each "world" observing a definite state of the qubit, either |0⟩ or |1⟩. The exact outcome that a particular "world" observes would depend on whether a bit-flip error occurred in that "world" or not.

@ComancheTippie - Tippie 🦅

Non-locality with three players. The measurements of Alice, Bob, and Charlie are always such that X XOR Y XOR Z = A AND B AND C, despite them not being able to communicate after receiving their input bits. The interesting point about this version is that it involves three-party entanglement, which is a richer and more complex form of quantum correlation than the two-party entanglement in the previous example.

@ComancheTippie - Tippie 🦅

Bit flip error correction using the simplest error correction code - the three-qubit bit flip code. In the bit flip code, we encode a logical 0 as 000 and a logical 1 as 111 using three physical qubits. If a bit flip error happens in one of the qubits, we can still determine the original logical value by majority vote.

@ComancheTippie - Tippie 🦅

Implementing the Variational Quantum Eigensolver (VQE) for a simple problem, finding the ground state energy of a 2-qubit Hamiltonian. A visualization the convergence of the algorithm by plotting the energy value at each iteration of the optimization routine. https://t.co/cz3B9c9g62

@ComancheTippie - Tippie 🦅

This implements a quantum machine learning algorithm, in particular the HHL algorithm, which is a quantum algorithm for solving linear systems of equations. This example is a 2x2 system. https://t.co/S9eJAOBJ4V

@ComancheTippie - Tippie 🦅

An abstract Digital Black Hole. This attempts to abstractly represent the journey of information through a black hole. It initializes information as a qubit state, simulates falling into a black hole by entangling it with another qubit, represents Hawking radiation by a random transformation, and finally attempts to retrieve the original information through quantum operations. The random transformation simulates the unpredictable nature of Hawking radiation, and the retrieval part attempts to reconstruct the original information state. This one's pretty cool.

@ComancheTippie - Tippie 🦅

Two abstract Black Holes. A symbolic representation of information interacting with two black holes. Qubits 0, 1, and 2 play a central role in the process, with qubits 1 and 2 representing black holes. The Hawking radiation is simulated by random rotations, and a simplified retrieval process attempts to reconstruct the original information. Like just before this, we represent information as qubits in a superposition state. Entangle the information qubits with two additional qubits, representing the first black hole. Apply random transformations to simulate the emission of Hawking radiation from the first black hole. Entangle the qubits again with two more qubits, representing the second black hole. Apply random transformations to simulate the emission of Hawking radiation from the second black hole. Attempt to retrieve the original information using reverse operations.

@ComancheTippie - Tippie 🦅

This describes a journey where information represented by qubit 0 interacts with five black holes, represented by pairs of qubits (qubits 1, 2, 3, 4, ...). The interaction with each black hole is modeled as entanglement followed by a random rotation simulating Hawking radiation. The retrieval process is simplified, and unlikely to recover the original state due to the complexity and randomness involved in the circuit. As the number of abstract black holes increases, the complexity grows, and the code becomes more of an artistic or philosophical exploration rather than something tied to physical reality.

@ComancheTippie - Tippie 🦅

This one is cool. The Shannon entropy of a system is a measure of the uncertainty or randomness associated with a set of probabilities. Here the entropy provides a measure of how information is spread across the states. This initializes the first two qubits in a superposition, applies a controlled-not (CNOT) operation to entangle them with the next two qubits, and then applies random unitary transformations to the last two qubits. The measurement outcomes are over 4 qubits, so there are 2^4=16 possible outcomes. If the system were completely random, with each of the 16 outcomes equally likely, the entropy would be: S = - ∑ 16 i = 1/16 log_2 1/16 = log_2 16 = 4. (We got 3.959) The first two qubits are initialized into a superposition, and the information scrambling isn't entirely random, so you might expect the entropy to be somewhat less than 4. Here we got 3.959.

@ComancheTippie - Tippie 🦅

Exploring Time Reversal Symmetry. You initialize the qubit in a superposition with the Hadamard gate (H), meaning that it has equal probability of being in state ∣0⟩ or state ∣1⟩. The time evolution function applies a series of RX and RZ rotations controlled by θ. The effect of these gates depends on the value of θ, and they create a tailored Hamiltonian that may exhibit time reversal symmetry breaking. The time reversal function tries to reverse the process by applying the Hamiltonian with negative θ. If there's perfect time reversal symmetry, this would bring the system back to its initial state. But, if there's symmetry breaking, the state will deviate from the initial state. You measure the qubit, leading to a probabilistic outcome. If the symmetry were perfect, you would expect the final state to be close to the initial state (equal probability of 0 and 1). The imbalance in the histogram produced suggests that the time reversal operation did not perfectly invert the time evolution. + The specific choice of θ and the time steps may have contributed. A thought that changing these parameters could lead to different outcomes. Also this is a very simplified and abstract scenario and may not directly correspond to a specific physical system. For more realism, you coulld construct a Hamiltonian based on a specific physical model and input, but this does provide a cool starting point for exploring TRS.

@ComancheTippie - Tippie 🦅

A very highly abstract and simplified representation of a Neutron Star with adjustable parameters for neutron interaction strength, relative velocity (for time dilation), and gravitational field strength. We break down the simulation into three main parts: neutron interactions, relativistic effects, and gravitational effects. Neutron Interactions: We can model neutron neutron interactions using controlled gates, with the strength of the interaction determined by a parameter. This part introduces correlations between neighboring qubits, controlled by the interaction_strength parameter. Higher values will increase the correlations, meaning that neighboring qubits will more often be measured in the same state. Relativistic Effects: We can abstractly model time dilation using phase gates. The phase gates introduce relative phase shifts between the 0 and 1 states in each qubit, based on the velocity parameter. Higher velocities (closer to 1) will cause more significant phase shifts, affecting the probability of measuring 1 vs 0. Gravitational Effects: We can use rotations to model how gravity affects the quantum state of particles. The Y rotations introduce a probability of each qubit being in the 0 or 1 state, depending on the gravitational field parameter. The histogram we got could be interpreted as: The 534 at 00000 shows that the predominant outcome is all qubits in the 0 state. This could be influenced by the specific values chosen for the parameters. The other outcomes (eg, 68 at 00001, 89 at 00010, etc.) represent less frequent occurrences where one or more qubits were measured in the 1 state. These are likely influenced by the gravitational effects and relativistic effects, causing some qubits to flip.

@ComancheTippie - Tippie 🦅

Topological phases are interesting because they depend on global properties and are resilient against local perturbations. Here's a creative & abstract approach to simulating a simple quantum topological system. We'll aim to represent the Kitaev chain model, which is a well known one dimensional topological superconductor model. The kitaev_chain function models the Hamiltonian of the Kitaev chain using quantum gates. The three terms in the Hamiltonian represent different physical effects: the chemical potential mu, the hopping between sites t, and the pairing between sites delta. Chemical Potential (mu) Term: This term affects the overall energy level of each site in the chain and can cause transitions between 0 and 1 states in each qubit. If mu is balanced with the other terms, it could contribute to a variety of outcomes. Hopping (t) Term: This term represents electrons hopping between adjacent sites. If t is strong compared to the other terms, you would see correlations between adjacent qubits. In our case, it appears that this term did not heavily influence the outcome. Pairing (delta) Term: This term represents the pairing of electrons at adjacent sites. If delta is significant, you could see outcomes where neighboring qubits have the same state. The main function topological_simulation applies the Kitaev chain Hamiltonian to a set of qubits and measures the result. Looking at the histogram we got 758 for 0000 so this is the predominant result, possibly indicating that the terms in the Hamiltonian favored all qubits being in the 0 state. It could also suggest that the initial state of all qubits was 0, and the terms in the Hamiltonian were not strong enough to flip them. The others, 7 for 0011, 84 for 0101, etc, represent less frequent occurrences where one or more qubits were flipped to the 1 state. What info does this pattern reveal about the relative strengths of mu, t, and delta?

@ComancheTippie - Tippie 🦅

Basic Quantum Checkers Player setup (conceptual) Initialization: Player 1 is initialized in the position 00 (but the code actually initializes it to 10). Player 2 is initialized in the position 11 (but the code actually initializes it to 01). Movement: Player 1 is designed to make a move by flipping the second qubit, representing a move from 00 to 01 (though the code actually moves from 10 to 11). Player 2 is designed to make a move by flipping the fourth qubit, representing a move from 11 to 10 (though the code actually moves from 01 to 00). Capture Condition: The code includes a logic using two ccx gates that seem to be aiming for a capture condition. If both players are in the same position, these gates are intended to mark a capture. Measurement: The final state of the players is measured and plotted in a histogram. The Aer Simulator uses a default of 1024 shots for the simulation. Since the state of the system is deterministic and there's no superposition or entanglement, you'll get the same result of 1001 in all 1024 shots. Thus, the result we got on the histogram, showing 1024 occurrences of the state 1001, corresponds to the initialized states of the two players.

@ComancheTippie - Tippie 🦅

A very abstract Quantum Mind. A simplified and highly abstract representation that uses the principles of quantum mechanics w/@qiskit to question and explore the nature of consciousness, reality, and the mind, or observer. (Very speculative and simple but could be cool to expand on the variables). We begin by defining three layers within the quantum system, symbolizing the mind, external reality, and meta reality. Each layer has its own qubits, representing various states or dimensions within that particular concept. All the qubits are placed into a superposition of states, reflecting the potential for all possible experiences, thoughts, and perceptions within the system. Entanglement is established between the mind and external reality layers. This symbolizes the intricate relationship between consciousness and the immediate surroundings, wherein observing reality affects mental states and vice versa. A second level of entanglement is created between the external reality and meta reality layers. This models a deeper connection between what is immediately perceived and more abstract, underlying truths or constructs about the nature of existence. Rotation operations are performed on the reality and meta reality layers to symbolize the filtering and interpretation that the mind applies to raw sensations, shaping the perception of reality. Entanglements within the mind layer are created to represent the various cognitive states or patterns of thought, reflecting the mind's internal complexity and dynamics. Complexity is added to the meta reality layer, possibly symbolizing deeper levels of consciousness, hidden dimensions, or profound existential insights that transcend immediate reality. The entire system is then measured, collapsing the superpositions into definite states. This can be seen as a metaphor for the act of conscious observation, making choices, and solidifying experiences. Entropy is calculated from the results, providing a quantitative measure of the system's complexity and information integration. It could be interpreted as a measure of how rich and intricate the interplay between consciousness and reality is within this model. Our Results: Entropy (9.726): Entropy is a measure of disorder or uncertainty in a system. In this context, it represents the complexity and information integration across the layers of mind, reality, and meta reality. A relatively high entropy value means that the system is in a highly mixed state, with many possibilities and connections. It can symbolize a rich and intricate interplay between consciousness and the various levels of reality. Histogram Peaks around 1: This peak could represent the most probable states that the system can occupy. If the peaks are around values corresponding to 1 in the binary representation of the states, it may imply that the quantum circuit has certain preferred or resonant states that are more likely to be observed. This could symbolize certain stable perceptions or understandings of reality that are more commonly accessed or recognized. Secondary Peaks at 2, 3's at 3.2: These secondary peaks and distributions at other values could represent less common but still significant states of the system. These might correspond to rarer or more complex interactions between the layers of mind, reality, and meta reality. They might represent more esoteric or profound insights, alternative perceptions, or higher level connections that are not as easily accessible but still part of the overall structure.

@ComancheTippie - Tippie 🦅

A very abstract Quantum Mind + Time Like above, a simplified and highly abstract representation that uses the principles of quantum mechanics w/@qiskit to question and explore the nature of consciousness, reality, and the mind, with an added time vector. Parameters: The number of qubits for representing time, mind, reality, and meta reality layers are defined, leading to the total number of qubits required in the quantum circuit. Circuit: A new quantum circuit is created with the total number of qubits. Time Qubits: The time qubits are placed into a superposition state, representing all potential moments of time simultaneously. Entangling Time with Mind: Control-X gates are applied to entangle time qubits with the mind qubits, creating correlations between the two. Entangling Time with Reality: Control-X gates are also applied to entangle time qubits with reality qubits, linking time and the nature of reality. Special Rotations: A series of rotations are applied to the time qubits, symbolizing epochs or specific moments in time. These rotations vary with each qubit, creating a complex, evolving pattern. Time Travel Simulation: A rotation is applied to one of the time qubits to symbolize the reversing of some operations, akin to time travel. Irreversible Event: A T gate is applied to one of the qubits to represent an irreversible event, perhaps akin to a significant moment or turning point in time. Quantum Poetic Time: A rotation around the Z-axis is applied, inspired by literary or philosophical concepts, representing another layer of complexity in the time dynamics. Measurement: All qubits are measured, collapsing the superpositions to definite states and recording the outcomes. Entropy: The entropy of the system is calculated using the Shannon entropy formula. This quantifies the uncertainty or complexity in the quantum state. Resuts: Entropy (6.48) indicates a high degree of uncertainty or complexity in the quantum state. In the context of information theory, entropy quantifies the amount of information or uncertainty associated with random variables. A higher entropy means that there is more unpredictability in the outcomes. On the histogram, many 1's around 1 could represent a part of the quantum system where certain interactions or entanglements have led to a preference for a state corresponding to the number 1. The heavy weight around this number might indicate that the time qubits, reality qubits, and other interactions are somehow synchronizing or resonating to create this outcome. Many 2's Around 2, Many 3's Around 3, (getting thinner) etc could represent a kind of decay or dispersion. It might signify that as you move farther from the primary resonant state (1's around 1), the quantum system becomes more chaotic, less ordered, or less probable. This could be a manifestation of how the time dynamics, rotations, and entanglements are working together in this simple model. The highest Measurement is 28, twice, which might be an interesting artifact or emergent pattern within the quantum system. It could be a result of the specific arrangement of quantum gates and their parameters. In some interpretations, this could represent a quantum echo or some form of recurrence, where certain states or conditions within the quantum system reappear at specific intervals or under specific conditions.

@ComancheTippie - Tippie 🦅

A very abstract Quantum Mind + Time + A Machine Learning Model, SGDRegressor, to learn from the quantum system's outcomes Like both above, a simplified and highly abstract representation that uses the principles of quantum mechanics w/@qiskit to explore the nature of reality, the mind (observer), time, and an added ML model that is used to control certain quantum gate operations in the circuit, allowing the quantum system to evolve continually. This subsystem represents a learning process, allowing the quantum system to adapt and change based on the outcomes of previous simulations. Parameters: The number of qubits for representing time, mind, reality, and meta reality layers are defined, leading to the total number of qubits required in the quantum circuit. Circuit: A new quantum circuit is created with the total number of qubits. Time Qubits: The time qubits are placed into a superposition state, representing all potential moments of time simultaneously. Entangling Time w/ Mind: Control-X gates are applied to entangle time qubits with the mind qubits, creating correlations between the two. Entangling Time w/ Reality: Control-X gates are also applied to entangle time qubits with reality qubits, linking time and the nature of reality. Special Rotations: A series of rotations are applied to the time qubits, symbolizing epochs or specific moments in time. These rotations vary with each qubit, creating a complex, evolving pattern. Time Dilation Simulation: A rotation is applied to one of the time qubits to symbolize the reversing of some operations, akin to a change intime dilation. Irreversible Event: A T gate is applied to one of the qubits to represent an irreversible event, perhaps akin to a significant moment or turning point in time. Quantum Learning Subsystem w/ Machine Learning: A machine learning model, SGDRegressor, is introduced to learn from the quantum system's outcomes. The model is then used to control certain quantum gate operations in the circuit, allowing the quantum system to evolve continually. This subsystem represents a learning process, allowing the quantum system to adapt and change based on the outcomes of previous simulations. Measurement: All qubits are measured, and the outcome is analyzed. The entropy, a measure of randomness or information contained within the system, is calculated, reflecting the complexity of the interactions. Results: Entropy: 8.265264075315137 The high entropy shows a wide spectrum of possible outcomes, reflecting the complexity of the system. On the histogram, any 1's, 2's, 3's represent higher frequencies for the lowerr values might represent the more probable states in the quantum system. The entanglement and superposition operations have created a complex space of possibilities, and these values could represent the more stable or natural states of the system. The 4's, 5's, 6's, + fewer above, represent less common states. As the values increase, the occurrence decreases, possibly indicating the diminishing probability of these specific outcomes. Will be interesting to try other ML models here.

@ComancheTippie - Tippie 🦅

A very abstract Quantum Mind + A Sine Wave Like above, a mind layer of qubits that represents neural activity patterns, and a reality layer of qubits that can stand for external stimuli. But I added feedback, a sine wave, between these layers and construct a machine learning model, a Stochastic Gradient Descent, that tries to adapt to changes in the environment. Also, some interesting symmetry on the histogram. I like this one a lot, simpler but variable input. Initialization: Time qubits: These represent the temporal evolution of the system. Mind qubits: These are entangled with the time qubits and symbolize neural patterns of an observer. Reality qubits: These are also entangled with time and symbolize external stimuli. Mind reality feedback: The CX gates between the mind and reality qubits represent interactions between the brain and the environment. Stimuli: This is modeled as a sine wave here but could be replaced with real world data representing any form of sensory input. A Stochastic Gradient Descent Regressor is trained on these features to model gate parameters. Rewards: Randomly generated here but could be based on alignment or coherence between mind and reality, reflecting how well the system is adapting to environmental changes. Results: Entropy (4.2555) indicates a moderate level of unpredictability within the system. It's neither entirely random nor entirely deterministic. This value might suggest that the entangled layers and the machine learning driven parameters create a system that has underlying patterns but also possesses inherent complexity. The histogram shows eight spikes around 100, having spikes at specific locations means that certain states or outcomes are more probable than others. These could correspond to resonances or equilibrium states in the model. The spikes at the first and last positions might indicate boundary effects or symmetries in the system. These could be resulting from the entanglements and special rotations applied within the circuit. The lower data on the histogram suggest that those other outcomes are less probable. This could be related to the constraints and entanglements within the system, making certain states more favorable. It might also reflect a sort of quantization of the modeled phenomena, where specific discrete statess are more energetically favorable or more aligned with the underlying physics. This data visualization tells of a multi dimensional system that is structured, yet complex. It is abstract, however, the patterns observed can be seen as a manifestation of the intricate interplay between different layers and dimensions, shaped by QM and machine learning, and reflective of potential symmetries within models.

@ComancheTippie - Tippie 🦅

A Basic 4 Bit Quantum Signature 🖊️ This experiment, using @qiskit, creates and verifies a quantum digital signature by first hashing a given message into a 4 bit binary string (this is variable and can change). This hashed message is encoded into a quantum state using a series of X-gates. A signature key is created by applying a Hadamard gate and a sequence of CNOT gates to create entanglement. The state is then measured to obtain the signature. Verification repeats this process with the original message and compares the results; if they match, the signature is valid. Hashing: The message is passed through a hash function that returns a 4 bit binary string. Quantum Encoding: The hashed message is encoded into a quantum state using a Quantum Circuit. For each 1 in the hashed message, an X-gate (bit flip) is applied to the corresponding qubit, setting it to the state |1⟩. Signature Key Creation: A series of quantum gates is applied to the qubits to create a signature key. Specifically, a Hadamard gate (H-gate) is applied to the first qubit, creating a superposition. Then, three CNOT gates (controlled-X) are applied in sequence, entangling the qubits. Measurement: The quantum state is measured, collapsing it into a classical state (string of 0s and 1s). This classical state is the quantum signature for the original message. Signature Verification: To verify a signature, the same process is repeated with the original message. The quantum signature from the verification process is compared to the original signature. If they match, the signature is considered valid, as you see in the screenshot.

@ComancheTippie - Tippie 🦅

A Basic 8 Bit Quantum Signature w/ SHA-256 🖊️ The original message is first hashed using the SHA-256 algorithm, a well-known cryptographic hash function, the same that #Bitcoin uses. The hash is then truncated to the last 8 bits for simplicity due to the limits of @qiskit on my macbook pro. We create a quantum circuit with 8 qubits, one for each bit of the truncated hash. The #qubits are prepared in states corresponding to the bits of the hash; for each 1 bit, a Pauli-X gate is applied to the corresponding qubit, flipping its state. A series of Hadamard gates are applied to the qubits, creating a superposition that represents the unique quantum signature of the message. This superposition is a complex state that depends on the original hash, acting as a quantum "fingerprint" for the message. To verify the signature, the original message is hashed again, and the same process of preparing qubits and applying gates is repeated. The resulting quantum state is thenn compared to the original signature. If they match, the signature is verified as valid, as the screenshot below shows. If the verification process succeeds, the messages authenticity is confirmed, and the quantum signature is a valid representation of the original message.

@ComancheTippie - Tippie 🦅

A Basic 8 Bit Quantum Signature w/ SHA-256 + Error Correction 🖊️ The input message is processed using the SHA-256 hash algorithm, like #Bitcoin, creating a 256 bit hash. The last 8 bits of this hash are then selected - this truncation simplifies the quantum encoding process as above. A quantum circuit is prepared, using three physical qubits for each bit in the truncated hash. If there are 8 bits in the truncated hash, the circuit will consist of 24 physical qubits and 8 classical bits for measurement. Each bit in the truncated hash is encoded in a quantum state using the 3 qubit bit-flip code. If the bit is 1, an X-gate (NOT gate) is applied to the corresponding qubit, and then two CNOT gates are used for error correction. The bit-flip code helps in detecting and correcting errors in the quantum state. It can correct if a single qubit in the three qubit group has been flipped. This adds robustness against noise and errors in the quantum computation. 💪🏽 The quantum circuit is measured, collapsing the quantum state into classical bits. The measurement results are collected in an array, corresponding to the encoded bits, as you see on the screenshot below. The result of 1024 measurements on 10001010 (in our histogram) is the most likely measurement outcome we would expect, corresponding to the encoded truncated hash of our original message. The result likely indicates our simulation was relatively noise free and the error correction worked as intended.

@ComancheTippie - Tippie 🦅

A Basic 8 Bit Quantum Signature w/ SHA-256 + Error Correction + Quantum Key Distribution🖊️ Hash Function: The input message is processed using the SHA 256 hash algorithm, like #Bitcoin, creating a 256 bit hash. The last 8 bits of this hash are then selected - this truncation simplifies the quantum encoding process like above. Quantum Key Distribution: This initiates a quantum key distribution, a BB84 Protocol, between two parties (Alice and Bob). Alice prepares qubits in random bases, sends them to Bob, who then measures them in random bases. The shared key is formed from the measurements. Quantum Signature Function: Encoding - The hashed message is encoded into a quantum circuit, setting the qubit to 1 if the corresponding bit in the hash is 1. Quantum Error Correction - A simple repetition code is applied to enhance the robustness against noise and errors. Quantum Fourier Transform - A QFT is applied to transform the qubits into the frequency domain. Verification Function: We reverse the QFT, transforming the qubits back to the time domain. The code then decodes the hashed message, measures the qubits, and checks if the signature is valid. Main Function: Generate Shared Key - The QKD BB84 protocol is used to generate a shared key between the parties. Combine Hash and Shared Key - The hashed message is XORed with the shared key to combine them. Generate Signature - The combined message is used to create a quantum signature. The signature is verified to check its validity, returning true on the screenshot below.

@ComancheTippie - Tippie 🦅

An Abstract Gravitational Wave Detector 🌌 In this quantum experiment using @qiskit, we construct a simulated gravitational wave detector, analogous to a LIGO-like system, to detect signals from colliding astronomical objects such as black holes or neutron stars. Initializing the Detector - this function initializes the detector's sensitivity using two qubits. The rx gates rotate the qubits around the x-axis by an angle equal to the sensitivity, representing the initial setup of the detector. Applying a Gravitational Wave - this function models the incoming gravitational wave as a series of rotations around the z-axis. The rz gates rotate the qubits by angles specified in the wave_signal array, simulating the effect of the gravitational wave on the detector. Detecting the Signal - this function represents the detection logic, using a Hadamard gate (h) and a CNOT gate (cx). The Hadamard gate creates a superposition, representing the uncertainty in the detection. Fine-Tuning the Detector - this function allows us to fine tune the detector by applying additional rotations around the x-axis. The rx gates represent adjustments to the detector's parameters, with angles specified in the adjustments array. The gravitational_wave_detector function puts all above together and measures the result. Results: In our histogram, each measurement outcome represents a different possible state of the gravitational wave detector. 00 (608) might correspond to the case where no significant gravitational wave signal is detected. The system is in its initial or neutral state, meaning that either the incoming signal was weak, or the detector's settings didn't align with the incoming gravitational wave. 01 (47) might represent the opposite scenario to 01, where the first part of the detector system (qubit 0) detected the wave, but the second part (qubit 1) did not. 10 (102) might represent the opposite scenario to 01, where the first part of the detector system (qubit 0) detected the wave, but the second part (qubit 1) did not. 11 (267) might correspond to a scenario where both parts of the detector system successfully detected the gravitational wave signal.

@ComancheTippie - Tippie 🦅

An Abstract Gravitational Wave Detector + Mirror Positioning, Laser Alignment, Interferometer Arm Length, and Noise Factors 🌌 In this experiment using @qiskit , an abstract quantum simulation of a gravitational wave detector, akin to something like LIGO, is constructed using a multi-qubit system. The simulation is designed with 8 qubits, each representing various components or states of the detector, such as mirror positioning, laser alignment, interferometer arm length, and noise factors. First, a multi-qubit quantum circuit (8 qubits) is created, with each qubit representing components of the gravitational wave detector. Quantum gates simulate the precise physical aspects of the detector, including mirror alignments, interferometer arm lengths, and laser alignments. A Hadamard gate (h) is applied to all qubits to create a superposition, representing all possible states of each component. Various rotation gates (rx, ry, rz) are used to model possible misalignments and variations in laser alignment, mirror positioning, and interferometer arm length. A noise model is created to simulate various noise factors such as thermal noise. A 5% depolarizing error is applied to qubits 4 to 7 to simulate different noise aspects in the system. Multi-qubit operations model the interaction between the gravitational wave and the detector's components. The qubits are measured, collapsing their states, and the results are plotted on the histogram below. Results: Many 1s and 2s could indicate the most probable or natural states of the system, possibly representing a stable configuration or alignment within the gravitational wave detector. Some 3s and 4s, similar 5s, 6s, and 7s may signify transitions or perturbations from the stable state due to gravitational waves or noise. The presence of these states at similar levels may indicate certain symmetries or resonances within the system. More spread 8s might suggest that as the system evolves into these states, the complexity and uncertainty increase, making it harder to predict or control these states. Decreasing 9s to 11s, 12s to 16s could represent more rare or extreme conditions within the gravitational wave detector, such as highly misaligned mirrors or strong gravitational wave signals. Their decreasing frequency corresponds to these being less likely scenarios in the physical system.

@ComancheTippie - Tippie 🦅

An Abstract Time-Dependent Schrödinger Simulation 🐈‍⬛ This @qiskit program simulates a time-dependent evolution of a wave function under a specific oscillatory potential. My goal is to understand how wave functions behave in a non static, complex potential environment. The potential is oscillatory in nature, changing both with position and time. This creates a dynamic environment for the wave function. V(x, t) = V_0 sin(kx) cos(ωt) Space is divided into discrete points to allow numerical calculations. We're representing continuous space and time as a series of small steps or grid points. The Hamiltonian is the total energy operator of the system. It's made of the kinetic energy (related to motion) and the potential energy (related to position). In this case, the potential energy is time-dependent, making the Hamiltonian vary with time. A Gaussian wave packet is chosen as the initial state of the system, centered around the middle of the space. It represents a localized particle, like an electron. The values I used were: Planck's reduced constant (ℏ): 1 Mass of the particle (m): 1 Amplitude of the potential (V_0​): 5 Wave number of the potential (k): 1 Frequency of oscillation of the potential (ω): 0.1 Number of spatial points (N): 1000 Length of the space (L): 10 Spatial step size (dx): L/N=0.01 Time step (dt): 0.01 Time Evolution of System: The potential is recalculated at each time step since it's a function of time. Calculate the Hamiltonian: The Hamiltonian is updated with the new potential, reflecting the current state of the system. H(t) = -h² ∇² + V (x, t) Using the Crank-Nicolson method, the wave function is evolved by a small time step, based on the current Hamiltonian. It's like taking a snapshot of the system's state at every moment. Results: We plot the probability density (square of the wave function's amplitude) at various intervals to see how the wave function evolves on the histogram below. I picked 5 first for simplicity. The initial Gaussian wave function was centered around the middle of the space (position 5), so there's a focus at that point. The wave function's initial configuration can have a substantial impact on its subsequent evolution. Given the chosen values for V_0, k, and ω (above), the potential's behavior may lead to the formation of traps or resonances at certain locations, including position 5. If the oscillatory behavior of the potential coincides with the wave function's natural frequency at that location, it can create a resonance, leading to an increase in the probability density there. Awesome we got what was expected, will experiment with other variables.

@ComancheTippie - Tippie 🦅

An Abstract Time-Dependent Schrödinger Simulation + Interference 🐈‍⬛ In this experiment, with @qiskit, a wave packet is evolved within a one-dimensional space governed by the Schrödinger equation. The code simulates how the wave packet interacts with a time-dependent sinusoidal potential, creating complex dynamics that can lead to constructive or destructive interference patterns. Setup: We define constants such as Planck's reduced constant (hbar), mass (mass), and potential amplitude (V0). The values I used were: V(x, t) = V_0 sin(kx) cos(ωt) Planck's reduced constant (ℏ): 1 Mass of the particle (m): 1 Amplitude of the potential (V_0​): 5 Wave number of the potential (k): 1 Frequency of oscillation of the potential (ω): 0.1 Number of spatial points (N): 1000 Length of the space (L): 10 Spatial step size (dx): L/N=0.01 Time step (dt): 0.01 We set up spatial and time discretization parameters like N, L, dx, and dt, determining the size of the space, the number of points, and the time step for evolution. Initialization: We create a spatial array x from 0 to L. We initialize the wave function psi as a Gaussian centered in the middle of the space and normalize it. Kinetic Energy Operator (T) Construction: We define the kinetic energy operator, which governs how the wave packet spreads in free space. This involves setting up a tridiagonal matrix with a particular pattern, reflecting the second spatial derivative. Time Evolution Loop: We loop through time steps, evolving the wave function according to the given Hamiltonian. This is where the real dynamics happen. Inside the loop: Potential (V) Definition: We create a time-dependent potential with a sinusoidal spatial pattern and a cosine time dependence. This can model a moving wave-like potential. Hamiltonian (H) Construction: The Hamiltonian, the total energy operator, is formed by adding the kinetic energy operator to the potential energy represented by V. H(t) = -h² ∇² + V (x, t) Time Evolution (Crank-Nicolson method): We apply the Crank-Nicolson method, a numerical technique for solving the Schrödinger equation, using the matrices A and B. This leads to the new wave function psi at the next time step. Visualization: Every 100 steps, we plot the probability density (|psi|^2). This gives a visual representation of the wave function's behavior over time, showing how the wave packet interacts with the potential and evolves. Our Histogram results: Peaks to 0.003 between 1 and 3: These smaller peaks may correspond to non-resonant frequencies where the wave packet and the potential are out of phase. The constructive interference is partial, leading to smaller probability densities. Large Peak to 0.008 on 5: This might represent a resonant frequency where the wave packet and potential are perfectly in phase, leading to a maximum constructive interference. At this point, the wave function aligns with the potential in such a way that it amplifies the probability density, which is why you see a higher peak. Many Peaks to 0.006 between 7 to 9: These peaks could signify a complex interaction zone where the wave packet is interacting with different modes of the potential. It might correspond to a higher energy state or harmonic of the system.

@ComancheTippie - Tippie 🦅

An Abstract Time-Dependent Schrödinger Simulation + Two Dimentions 🐈‍⬛ As above, this @qiskit experiment simulates a wave packet that is evolved within a two dimensional space governed by the #Schrödinger equation. The code models a particle in a time-dependent potential, utilizing a Crank-Nicolson method to evolve the wave function in time. The particle's behavior is observed in a 2D grid, and a Gaussian wave packet is used as the initial wave function. The time-dependent potential is characterized by sinusoidal functions, and the kinetic energy operator is represented by a finite difference method. The code provides visualizations of the probability density at regular intervals. Setup: I used the same constants as above, the reduced Planck constant (hbar), mass, potential amplitude (V0), wave number (k), frequency (omega), grid points (N), space length (L), and time step (dt) are all defined. We use: V(x, t) = V_0 sin(kx) cos(ωt) Planck's reduced constant (ℏ): 1 Mass of the particle (m): 1 Amplitude of the potential (V_0​): 5 Wave number of the potential (k): 1 Frequency of oscillation of the potential (ω): 0.1 Number of spatial points (N): 1000 Length of the space (L): 10 Spatial step size (dx): L/N=0.01 Time step (dt): 0.01 Discretize Space: We divide the space into a 2D grid using a linearly spaced vector. A mesh grid is created for both x and y dimensions. Initialize Wave Function: A Gaussian wave function is used to describe the initial state of the particle, centered in the middle of the space. Create Kinetic Energy Operator: A finite difference method is applied to create the kinetic energy operator (T) and then extended to 2D using the Kronecker product. Time Evolution Loop: Create Time-Dependent Potential: A sinusoidal function representing the time-dependent potential is applied to the grid. Construct Hamiltonian: The Hamiltonian is created by summing the kinetic energy operator and the potential energy operator. H(t) = -h² ∇² + V (x, t) Crank-Nicolson Method: A numerical method used to evolve the wave function in time. The Crank-Nicolson scheme involves solving a system of linear equations using matrices A and B. Reshape Wave Function: The wave function is reshaped back to its 2D grid form. Visualization: Every plot_interval steps, the probability density is visualized using imshow. The plot displays the x and y positions along with a color bar indicating the probability density. Love this kind of density plot. Results: The brightest Probability Density we see at (x = 5) and (y = 5) indicates that the particle is most likely to be found at this central location. Fading to 0.005 around (x=4) and (y=6) indicates that the further away, the probability density decreases. This is consistent with the Gaussian distribution, where the probability drops off as you move away from the mean. It reflects the decreasing likelihood of finding the particle in these locations. Fading to 0.001 around (x=2.8) and (y=6.25) indicates that as you move even further from the center, the probability density decreases even more. This fading continues to reflect the Gaussian nature of the initial wave function.

@ComancheTippie - Tippie 🦅

An Abstract Time-Dependent Schrödinger Simulation + Three Dimensions 🐈‍⬛🐈‍⬛🐈‍⬛ Using @qiskit, this simulation builds upon the principles of the #Schrödinger equation. Like above, our focus is to capture the time-evolution of a quantum state inside a (now) three-dimensional box. The quantum state, initially described by a Gaussian wave packet centered in the middle of the box, evolves under the influence of a periodic potential that varies sinusoidally in all three spatial dimensions, governed by the wave vector k and frequency ω. To visualize the outcome, we extract a 3D surface (isosurface) from the probability density and render it. Setup: I used the same constants as above, the reduced Planck constant (hbar), mass, potential amplitude (V0), wave number (k), frequency (omega), grid points (N), space length (L), and time step (dt) are all defined. We use: V(x, t) = V_0 sin(kx) cos(ωt) Planck's reduced constant (ℏ): 1 Mass of the particle (m): 1 Amplitude of the potential (V_0​): 5 Wave number of the potential (k): 1 Frequency of oscillation of the potential (ω): 0.1 Number of spatial points (N): 1000 Length of the space (L): 10 Spatial step size (dx): L/N=0.01 Time step (dt): 0.01 Space Discretization: x = y = z = np.linspace(0, L, N): This creates three linearly spaced arrays for the x, y, and z dimensions, each ranging from 0 to L and consisting of N points. The L represents the total length of each dimension, and N determines how many discrete points you have along that length. Then using the np.meshgrid function, three 3D arrays are created where: x_grid[i, j, k] gives the x-coordinate of the point (i, j, k), y_grid[i, j, k] gives the y-coordinate, and z_grid[i, j, k] gives the z-coordinate. The parameter indexing='ij' ensures that the resulting grid arrays follow a matrix-style indexing convention which is particularly useful when dealing with 3D arrays. Wave Function Initialization: The quantum state, represented by the wave function Ψ, is initialized as a Gaussian blob centered in the middle of this 3D space. The chosen Gaussian ensures that the highest probability density is in the center, and it tapers off towards the edges. The wave function Ψ is then normalized to ensure its integral (or in this discrete case, its sum) across the space equals one - a fundamental property in #quantummechanics. Kinetic Energy Operator: The kinetic energy operator, vital for describing the quantum system's motion, is constructed in a sparse matrix form to save memory and increase computational efficiency. Time Evolution Loop: Create Time-Dependent Potential: A sinusoidal function representing the time-dependent potential is applied to the grid. Construct Hamiltonian: The #Hamiltonian is created by summing the kinetic energy operator and the potential energy operator. H(t) = -h² ∇² + V (x, t) Crank-Nicolson Method: A numerical method used to evolve the wave function in time. The Crank-Nicolson scheme involves solving a system of linear equations using matrices A and B. Visualization (3D): At a specific point in time, the state's 3D probability density is visualized using the marching cubes algorithm. This algorithm extracts a 3D surface (isosurface) from the probability density that represents regions of space with a particular probability value. The first time I've used this method! Results: X, Y, Z Positions (20-30 each) indicates that the wave packet (or state) was initially localized around the center of the 3D grid since the total span is from 0 to L (which is 0 to 10 in our constants), and 20-30, when converted back to our grid dimensions, becomes centered around L/2, which is 5! Right in the middle. It is also consistent with the Gaussian wave packet we initialized in the middle of the space.

@ComancheTippie - Tippie 🦅

Mapping Quantum Entanglement in 3D Vector Space 🐈‍⬛🐈‍⬛🐈‍⬛ In this experiment using @qiskit, we construct a quantum circuit to generate an entangled state using two #qubits. Once achieved, we visualize the degree of this entanglement in a 3D scatter plot, first time I've visualized entanglement this way! Subsequently, we evolve the state using a random unitary transformation and then visualize the entanglement of the newly evolved state, providing a graphical representation of how entanglement can change under quantum operations. All entangled states are uniform here. Quantum Circuit Initialization: A #quantum circuit with two qubits is initialized. These qubits will be used to produce the #entangled state. Entangled State Creation: A Hadamard gate (qc .h(0)) is applied to the first qubit, creating a superposition. Following that, a controlled-X gate (qc .cx(0, 1)) creates an entanglement between the two qubits. Statevector Retrieval: We utilize Qiskit's Aer module to simulate the quantum circuit and retrieve the statevector that represents the quantum state of the circuit after entanglement. Entanglement Degree Calculation: A custom function, entanglement_degree, computes a degree of entanglement by taking the outer product of the statevector and its complex conjugate. The degree is essentially the sum of off-diagonal elements, giving us an abstract measure of the entanglement. degree = ∑_(i≠j) * | M_(ij) ​∣ Where M_(ij)​ are the elements of matrix M, and the sum runs over all off-diagonal elements. 3D Visualization Setup: We set up a 3D grid using np. meshgrid. This will serve as the canvas for our entanglement visualization. Entanglement Visualization: The computed entanglement degree is visualized as color intensities on a 3D scatter plot. The colormap viridis provides a gradient from yellow (low) to purple (high), representing the degree of entanglement. Time Evolution of the State: A random unitary transformation is applied to the initial entangled state, effectively evolving the quantum state. This is to understand how the state (and its entanglement) can change under quantum operations. Visualization of the Evolved State: Just like the initial state, the evolved state's degree of entanglement is computed and then visualized on a separate 3D scatter plot. Results: The Cube from 0 to 1 on each axis is a representational canvas. Each point in this cube doesn't correspond to a particular quantum state or a part of it. Instead, the entire space is taken to show variation (if any) of our metric: the degree of entanglement. We chose a cube from 0 to 1 in each dimension for simplicity and normalization, meaning the values are bounded between 0 and 1. Each dot represents a value of the degree of entanglement. In our case, since we are using the same #statevector throughout the entire cube, the entanglement degree doesn't vary spatially. So, every dot has the same degree of entanglement, and its color signifies this value. The colormap viridis is used to visually depict the degree of entanglement. In this colormap, lower values are represented with a more purple color and higher values with a more yellow color. The transition from purple to yellow goes through light green to darker green. The color of each dot is a direct representation of the entanglement degree at that point. Since our entanglement degree doesn't vary spatially, every dot should have the same color, depicting the same entanglement degree.

@ComancheTippie - Tippie 🦅

Mapping Quantum Entanglement in Variable 3D Vector Space 🐈‍⬛🐈‍⬛🐈‍⬛ This simulation with @qiskit models a two-qubit #quantum system in a maximally entangled Bell state and represents the spatial distribution of #entanglement in a 3D volume. As you radiate outwards, the entanglement diminishes, hence the change in color from yellow (maximum entanglement) to blue (minimum entanglement). Quantum Circuit Initialization: A #quantum circuit with two qubits is initialized. These qubits will be used to produce the #entangled state. Entangled State Creation: A Hadamard gate is applied to the first qubit, creating a #superposition of its states. A CNOT gate is then applied, with the first qubit as control and the second as target, thus generating an entangled state between them. Simulation and State Representation: The quantum circuit is simulated using Qiskit's statevector_simulator, resulting in the #statevector of the final quantum state. The outer product of the statevector with its conjugate transpose generates a density matrix, representing the quantum state. Entanglement Degree Calculation: A custom function, entanglement_degree, computes a degree of entanglement by taking the outer product of the statevector and its complex conjugate. The degree is the sum of off-diagonal elements, giving us an abstract measure of the entanglement. degree = ∑_(i≠j) * | M_(ij) ​∣ Where M_(ij)​ are the elements of matrix M, and the sum runs over all off-diagonal elements. 3D Grid Generation: A #3D grid of points is created within a unit cube ([0, 1] in all three dimensions). This will be the spatial volume where the entanglement is visualized. Each point's distance from the center of this volume is computed. Spatial Entanglement Representation: The computed distances from the center are normalized to lie between 0 and 1. The X, Y, and Z axis labels are set, and a colorbar indicating the degree of entanglement is set. These normalized distances are inversely related to the entanglement degree. That means a point closer to the center (smaller distance) would have a higher degree of entanglement compared to one farther away. Visualization: Using #matplotlib, a 3D scatter plot is drawn. The color of each point in this plot represents its degree of entanglement, with darker colors signifying stronger entanglement. Results: The blue outer cube represents points in the 3D space with minimal entanglement. As we see on our #vectorspace, points farther from the center have less entanglement. In color representation, this lower entanglement corresponds to the blue color. It effectively creates a boundary for our visualization. As you move towards the center of this cube, you notice a transition from green to yellow. This color gradient is a direct representation of increasing entanglement. Green Regions have a moderate amount of entanglement. They form a sort of intermediate zone between the highly entangled center and the minimally entangled outer blue region. The center appears yellow, which corresponds to the highest level of entanglement. Based on the code's design, entanglement is strongest at the very center of the 3D space. By associating color with entanglement strength, this experiment conveys the idea that two qubits in a Bell state are maximally entangled and, in this spatial representation, this maximum entanglement is centralized.

@ComancheTippie - Tippie 🦅

Quantum Tunneling Simulation + Three Dimensions ⚛️⚛️ In this @qiskit simulation, a wave packet representing a #quantum particle propagates within a 3D box. As the wave packet encounters a predefined potential barrier, we observe the phenomenon of quantum tunneling. Using a discretized representation of space, the simulation captures the probability density of the quantum particle across the grid, allowing for a visual representation of the wave packet's interactions with the barrier, evident through its color-coded spatial distribution. Setup: Nx, Ny, Nz dimensions of the 3D grid representing the spatial extent of our quantum system. dx, dy, dz: Spatial step size in each dimension. dt: Temporal step size for time evolution. We define a 3D space, represented by a grid. This grid will be used to calculate the quantum wave packet's evolution in discretized space and time. The wave packet is initialized in the 3D space. It is typically a localized distribution representing the quantum particle's initial position and momentum. Potential Barrier Definition: Variable V is the Potential landscape, a 3D matrix. The potential barrier is defined within this grid, usually as a region with elevated potential values. This barrier represents an obstruction for the wave packet. Time Evolution: Ψ (x, y, z, t + dt) = e^(-iHdt/ℏ) Ψ (x, y, z, t), Where H is the Hamiltonian operator, ℏ is the reduced Planck constant, and Ψ is the wave function. Hamiltonian: H(t) = -(ℏ²/2m) ∇² + V, where m is the particles mass, ∇² is the Laplacian operator, and V is the potential landscape. Utilizing the split-operator method, we evolve the quantum wave packet in time steps of dt. This method separates the kinetic and potential energy terms of the Hamiltonian for efficient and accurate computation. The wave packet interacts with the potential barrier as time progresses. This interaction results in the quantum tunneling phenomenon, where part of the wave packet may penetrate the barrier, even if classically it wouldn't have enough energy. Visualization: At each time step or selected intervals, the probability density, given by |Ψ (x, y, z)|², of the quantum particle is computed across the 3D grid. This density offers insight into the likelihood of finding the quantum particle at a given position. Using a color gradient (from green to yellow), we visually represent the probability density on the grid - green for low density and yellow for high. This visualization aids in understanding how the wave packet evolves, especially its interaction with the barrier. Results: The blue cube represents the 3D space of the quantum system. The dimensions of this space are dictated by the grid points that are used to numerically compute the system's evolution. Each point within this space can be thought of as representing a small volume element of the box in which the quantum particle exists. The green to yellow gridded gradient is representing the probability density of the quantum wave packet at different positions in the box. Green Regions indicate where the probability density of the quantum particle is relatively low. It suggests that there's a lower likelihood of the quantum particle being detected here. Yellow Regions indicate areas with a higher probability density. This means that if you were to measure the position of the quantum particle, you're more likely to detect it in these yellow regions. The behavior we see is due to the evolution of the quantum wave packet as it encounters the potential barrier. As the wave packet approaches the barrier, parts of it reflect off, while others tunnel through depending on the height and width of the barrier relative to the energy of the wave packet. The patterns you see are a manifestation of this quantum behavior. My computer can barely handle this, so unfortunately can't get a video with variable zoom, but cool.

@ComancheTippie - Tippie 🦅

Testing Quantum Speed Limits 🚄🚄 This code using @Qiskit simulates the evolution of a #quantum system of three qubits. Starting from an initial state, the system evolves under a predefined Hamiltonian representing interactions between the qubits. As the state evolves over time, the script calculates and tracks several quantities of interest: the fidelity of the evolved state with a target state, the entanglement between the first two qubits, and the Margolus-Levitin and Mandelstam-Tamm quantum speed limits. These quantities are then visualized in a series of plots, providing insights into the dynamics of the quantum system and the fundamental limits of its evolution speed. Setup: We specify the initial and target quantum states using Qiskit's Statevector.from_label() function. The labels 000 and 111 represent the computational basis states of a three qubit system. Define Hamiltonian: We define the system's #Hamiltonian, which describes the dynamics of the system. Here, we construct it using Pauli matrices representing qubit interactions, with a coupling constant J. H = J (X₁ X₂ + Y₁ Y₂ + Z₁ Z₂ ) ⊗ I₃ where J is the coupling constant, X, Y, and Z are the Pauli matrices for the i-th qubit (representing spin along the x, y, and z directions, respectively), and I₃ is the identity operator for the third #qubit. This form of the Hamiltonian represents a system where the first two qubits interact with each other, but the third qubit does not interact with the others. The evolution operator at time t is given by the equation U(t) = e^-(iHt) where e^x denotes the matrix exponential of x. This operator is applied to the initial state to obtain the state at time t. Fidelity: | ⟨evolved state | target state⟩ |² where ⟨A | B⟩ ⟨A∣B⟩ denotes the inner product of states A and B, and | ⋅ |² denotes the square of the absolute value. The entanglement of the first two qubits is calculated as the von Neumann entropy of the reduced state of these two qubits: Entanglement: -Tr (ρ log₂ ρ) where ρ is the reduced density matrix obtained by tracing out the third qubit, and Tr denotes the trace of a matrix. The Margolus-Levitin and Mandelstam-Tamm quantum speed limits are given by the equations: ML speed limit = π/2⟨H⟩ MT speed limit = π/2ΔH where ⟨H⟩ is the average energy (expectation value of the Hamiltonian), and ΔH = sqrt( ⟨H²⟩ - ⟨H²⟩ ) is the standard deviation of the energy. These quantities represent the theoretical maximum speed at which a quantum state can evolve. Set Time Points: We set the time points at which we'll calculate the evolution of the system. Initialize Lists for Results: We prepare empty lists to store the calculated values of fidelity, entanglement, and speed limits. Main Loop: Generate the evolution operator using the matrix exponential of the Hamiltonian times the time point. Evolve the initial state by applying the evolution operator. Calculate the fidelity of the evolved state with the target state. Calculate the #entanglement of the first two qubits by tracing out the third qubit and computing the von Neumann entropy of the reduced state. Calculate the Margolus-Levitin and Mandelstam-Tamm quantum speed limits based on the average energy and energy uncertainty of the evolved state. We create four subplots to display how the calculated quantities change over time. Each subplot includes gridlines, a title, and a legend for clarity. Results: Fidelity: The fidelity is calculated as the square of the absolute value of the inner product (overlap) between the evolved state and the target state. As the quantum state evolves under the Hamiltonian, it gradually transforms from the initial state towards the target state. This process is reflected in the increasing fidelity over time. Entanglement: The entanglement between the first two qubits is quantified using the von #Neumann entropy of the reduced state obtained by tracing out the third qubit. The increase in entanglement over time indicates the emergence of quantum correlations between the first two qubits as the state evolves. Margolus-Levitin and Mandelstam-Tamm Speed Limits: These quantities represent the maximum speed at which a quantum state can evolve, based on the average energy and energy uncertainty of the state, respectively. The constant values of these speed limits over time reflect the conservation of energy in the quantum system, as governed by the Hamiltonian, just as we expect.

@ComancheTippie - Tippie 🦅

Simulating The 2022 Nobel Prize-Winning Entanglement Experiment With @qiskit 🏆🏆 This is a simulation of the #entanglement experiment conducted by Alain Aspect, John F. Clauser, and Anton Zeilinger, that won the 2022 #Nobel Prize in Physics. I detail their experiment below, then detail how my simulation works. Alain Aspect, John F. Clauser, and Anton Zeilinger: Photon Pair Generation: ⚛️ Creating an entangled pair of particles: The experiment started by generating an entangled pair of photons with linked polarization states. |Ψ⁻⟩ = 1/sqrt(2) * (|01⟩ - |10 ⟩) Sending the particles to two different locations: These entangled #photons were sent to two different stations where measurements were performed. The stations were sufficiently distant to uphold the principle of locality. Choosing a measurement basis independently: The polarization of the incoming photon was measured along one of two possible directions at each station. This direction (or basis) was chosen independently at each station using a fast quantum random number generator (QRNG). Incorporating cosmic data: They used data from distant #quasars to determine the settings of the measuring devices. This is a novel way of ensuring the independence of the chosen measurement settings. Incorporating human choices: #Human choices were also incorporated into the selection of measurement settings to test the so called "freedom of choice" loophole. Performing a coincidence detection: A coincidence circuit was used after the measurements to keep only the events where both photons were detected, eliminating noise or errors from photon loss or detection inefficiency. Repeating the experiment: The experiment was repeated many times to collect a sufficient amount of data for statistical analysis. Analyzing the data: The collected data was analyzed by calculating the #CHSH inequality, a key quantity that provides a limit for correlations predicted by any local realistic theory. | E(A, b) - E(a, b') + E(a', b) + E(a', b') | ≤ 2 My Simulation: 💻 Creating an entangled pair of qubits: We start by creating an entangled pair of qubits using the #Hadamard gate and the #CNOT gate. This corresponds to the creation of entangled particles in the real experiment. Choosing a measurement basis independently: We independently chose a measurement basis for each #qubit. We used a simple random choice function to represent the fast quantum random number generator (#QRNG) used in the actual experiment. Our three ways to ensure randomness: Fast Switching: This method uses Python's random.choice to randomly select between the Z and X bases. Decimal Expansion of π: This method utilizes the decimal expansion of #π, extracting digits from π to decide the basis. #Even digits lead to the Z basis, and #odd digits lead to the X basis. User Input: This method leverages user-generated random numbers (in this case, randomly generated integers) to choose the basis, using the parity of the numbers. Performing a form of coincidence detection: We simulated a basic form of coincidence detection by randomly discarding some measurements, representing the noise and inefficiencies of real world detectors. Repeating the simulation: We repeated our #quantum circuit many times (1000) to gather enough data, similar to how the real experiment was repeated. Analyzing the data: We analyzed the data by calculating the CHSH quantity and visually representing the results. We also performed statistical tests (chi-square tests) to check the quality of our randomness. Results: 3D Scatter Plot of Outcome Distributions: Each point represents an experiment run, with its position in the 3D space determined by the counts of the 00, 01, 10, and 11 outcomes. The colors correspond to the CHSH value calculated for that particular run. This visual gives a spatial representation of the measurement outcomes across different experiments and their corresponding CHSH values. CHSH Inequality Violation w/ Histogram: The #histogram here is a representation of the CHSH quantities calculated throughout the simulation. It provides a distribution of these quantities over the course of the experiment. If we look at the range of the x-axis, we can see that most of the calculated CHSH quantities are between 2 and 3, (scaled to 0.02 and 0.03 on our data) which is consistent with quantum predictions. A CHSH quantity above 2, the #classical limit, implies violation of local realism and thus indicates entanglement. Hence, the fact that most of the values are above 2 (0.02) strongly suggests that our simulation is indeed creating and measuring entangled states. We can see that the CHSH quantity often exceeds 2, and sometimes even reaches the quantum limit. This indicates that the two qubits in our simulation indeed exhibit quantum entanglement, thus successfully replicating the key result of the Prize-winning #Physics experiment.

@ComancheTippie - Tippie 🦅

Quantum Text Encoding: ASCII Characters in 10 Qubits ⚛️🔤 This @qiskit code takes a text string "Hello Quantum World" and encodes each character into a set of 10 qubits using its #ASCII value. The function maps the text string and prints the results. Setup: Entangling Qubits: A pair of qubits is #entangled using a Hadamard gate followed by a CNOT gate. Mathematically, the Hadamard gate transforms the state |0⟩ to (|0⟩ + |1⟩) / (sqrt(2)), and the CNOT gate creates an entangled state, such as (|00⟩ + |11⟩) / (sqrt(2)). Encoding Binary: The binary value of a character is encoded into qubits using X gates. If a bit in the binary representation is 1, an X gate is applied to the corresponding #qubit, flipping its state from |0⟩ to |1⟩. Creating the Quantum Circuit: We set up a #quantum circuit with 10 qubits for each character in the text: 2 qubits for entanglement and 8 qubits for ASCII encoding. Encoding Text into Quantum States: Looping through Characters: For each character in the text, the code performs the following steps: Entanglement: Two qubits are entangled to represent a shared quantum state. ASCII Encoding: The ASCII value of the character is converted to an 8 bit #binary value. Each bit is encoded into one of the 8 additional qubits using X gates. Measurement: All qubits are measured, #collapsing the quantum state into classical bits. The entangled qubits will yield correlated measurement results, while the ASCII encoded qubits will yield results that reflect the binary representation of the characters. A histogram is plotted with our outcomes. The x-axis labels represent the binary outcomes, and the y-axis represents the frequency of each outcome. Results: The x-axis of the histogram represents the possible measurement outcomes. Each outcome is a binary string that corresponds to the states of the measured qubits. For example, if we have 10 qubits in total, the x-axis may show outcomes like "0000000000," "0000000001," "0000000010," and so on. The y-axis represents the frequency or count of each measurement outcome. The taller the bar for a particular outcome, the more frequently that outcome was observed in the measurement results. The entangled qubits had correlated outcomes, meaning that certain patterns will appear more frequently. The ASCII encoded qubits will yield outcomes that correspond to the #binary representation of the ASCII values of the characters in the text. The text output on our #histogram, "Decoded text: Hello Quantum World," provides a direct link between the measurement outcomes and the original text that we encoded using our quantum circuit.

@ComancheTippie - Tippie 🦅

Quantum Image Processing: Binary Encoding and Superposition w/ @qiskit + a Mfer + Color 🎨⚛️ In this experiment, like above, we explore quantum image processing by resizing a selected image, my nft pfp #Mfer, to a binary form and encode it into a quantum circuit. Each pixel's value, and now color, is mapped to a qubit, and quantum superposition was introduced through Hadamard gates. This image processing successfully handled up to 3072 Qubits!, you can see the variable pixel amounts I used below. Setup: Image Selection: I selected an image to be processed, my mfer nft profile picture. This image served as the starting point for our quantum encoding experiment. Image Resizing: I resized the image to various scales, ranging from 4x4 to 32x32 pixels (see below), to reduce the complexity and allow the use of qubits to represent each pixel. The resizing was done using interpolation, a mathematical technique that estimates pixel values based on surrounding pixels. Color Channel Separation: The resized image was separated into three color channels: Red (R), Green (G), and Blue (B). Each channel was treated as a separate grayscale image, where pixel values ranged from 0 to 255. Binary Quantization: I applied binary quantization to the resized image by setting a threshold (eg, 128) to create a binary image where each pixel and its color are assigned a value of either 0 or 1. quantized_pixel_value = { 1 if pixel_value ≥ 128, 2 if pixel_value < 128 Quantum Encoding: I encoded the binary quantized image into a quantum circuit. Each pixel value was mapped to a qubit in the quantum circuit, resulting in a one to one correspondence between pixels and qubits. For pixels with value 1, we applied an X-gate to the corresponding qubit, flipping its state to |1⟩. For pixels with value 0, we left the corresponding qubit in its initial state. Superposition Creation: I applied Hadamard gates to all the qubits, creating a #superposition of states representing the encoded image. The Hadamard gate transforms the state of each qubit as follows: H |0⟩ = 1/sqrt(2) * ( |0⟩ + |1⟩ ) H |1⟩ = 1/sqrt(2) * ( |0⟩ - |1⟩ ) Combining Quantized Channels: The binary quantized images for the R, G, and B channels were combined to create a color image, representing the quantized version of the original. Results: On the histogram we visualize the original image, the resized image, the quantized binary image, and the #quantum circuit representing the encoded image is print (that is too large to show in these). Variable image resizes below. 10 Pixels - 27 Qubits 100 Pixels - 300 Qubits 500 Pixels - 1875 Qubits 1000 Pixels - 3072 Qubits O-`

@ComancheTippie - Tippie 🦅

A @qiskit Simulation Of Two Abstract Black Holes + Accretion Disk + Event Horizon ✨✨ In this #quantum code, we create an abstract model to simulate interactions between two black holes. Utilizing 8 qubits, we employ quantum gates to represent black hole entanglement, accretion disk dynamics, event horizons, and #Hawking radiation. The system undergoes two rounds of interactions, with the results visualized through a histogram and Bloch sphere representations. Setup: Variables: The circuit is initialized with 8 qubits and 2 classical bits. A Hadamard gate is applied to qubit 0, placing it in a superposition state: |Ψ⁻⟩ = 1/sqrt(2) * (|01⟩ - |10 ⟩) The Hadamard gate sets up an initial condition that allows exploration of both possible paths. 1. First #BlackHole Interaction: Black Hole Interaction: Variables used are Qubits 0 and 1. A CNOT gate (controlled-X) followed by a Hadamard gate on qubit 1. Accretion Disk Interaction: Variables used are Qubits 1 and accretion qubits 3, 4. A controlled rotation around the X-axis, CRX(θ), where θ is a random angle. This models the interaction between a black hole and its accretion disk using controlled rotations, simulating the dynamic and random nature of accretion disks. Event Horizon Interaction: Variables used are Black Hole #Qubit 1. A Z gate is applied, which introduces a phase flip. This represents the event horizon's influence, possibly capturing some aspects of information loss or transformation. Hawking Radiation: Variables used are Black Hole Qubit 1. A rotation around the X-axis, RX(θ), where θ is a random angle. This models Hawking radiation, using a random rotation to simulate the random emission of #particles. 2. Second Black Hole Interaction: The same steps as the first black hole interaction are repeated for qubits 1 and 2, and accretion qubits 5, 6. This models a second set of black hole interactions, accretion disk dynamics, event horizons, and Hawking radiation. Then measurement collapses the quantum state into one of the possible outcomes, giving rise to the histogram of results. Results: The histogram plot represents the measurement outcomes of the two qubits (qubit 0 and qubit 1) being measured. Here's a breakdown of the results: 00: Occurred 218 times, indicating both qubits are in the |0⟩ state. 10: Occurred 233 times, indicating qubit 0 is in the |1⟩ state, and qubit 1 is in the |0⟩ state. 11: Occurred 282 times, indicating both qubits are in the |1⟩ state. 01: Occurred 291 times, indicating qubit 0 is in the |0⟩ state, and qubit 1 is in the |1⟩ state. The predominance of the 01 and 11 outcomes suggests that the interactions between qubits, modeled as black hole interactions, accretion disk interactions, and event horizon simulations, have led to a particular state distribution. The #Bloch sphere representations provide a geometric view of the quantum states of all the qubits in the system. Each sphere corresponds to a qubit, and the vectors represent the qubits' states. Qubits 0, 1, and 2 are involved in the main black hole interactions and show significant deviations from the poles. Their states reflect the complexity of the interactions and the applied gates. Qubits 3, 4, 5, and 6 are involved in the accretion disk interactions. Their states vary due to the random controlled rotations applied to simulate accretion disk behavior. Qubit 7 is not used in the circuit and remains in the initial state. The Bloch sphere representation provides a visual understanding of how the quantum states evolve through the circuit.

@ComancheTippie - Tippie 🦅

A 88 Qubit Quantum Piano Made With @qiskit 🎹⚛️ In this experiment, a quantum circuit is programmed to simulate a full 88 key piano, employing 88 qubits - each corresponding to a unique piano note. For each note in the melody list, the corresponding frequency is mapped and a sine wave is generated. The quantum circuit uses Hadamard gates to create a superposition of musical possibilities, collapses the wavestates, then is normalized and encoded into an mp3. Qubits: The number of qubits (88) is set to match the number of standard piano keys. Sample Rate: The audio sample rate (44100) is set to 44.1 kHz, which is a standard value for mp3s. Duration: The duration (duration = 0.5) of each note is set to 0.5 seconds. Frequencies: A list of frequencies corresponding to each piano key is defined based on standard tuning. Melody: A melody (simple classical) defines the sequence of notes to be played. Each integer maps to a specific frequency, and -1 represents a rest note. melody = [60, 62, 64, 65, 67, 69, 71, 72, -1, 72, 71, 69, 67, 65, 64, 62] Quantum Circuit for Keyboard: A quantum circuit (quantum_keyboard_circuit) is created with 88 qubits. A Hadamard gate (H) is applied to each qubit in sequence, followed by a barrier. Mathematically, if ∣0⟩∣0⟩ is the initial state of a qubit, the Hadamard operation transforms it as: H∣0⟩ = 1/(sqrt(2)) * (∣0⟩ + ∣1⟩) Finally, all qubits collapsed and are measured. Generating Audio: For each note in the melody list, the corresponding frequency is mapped and a sine wave is generated. Results: You can hear the mp3 below! Going to try to make more complex melodies/sounds and harmonies on the next iterations of this. Also working on adding kick and snare qubits to the export.

@ComancheTippie - Tippie 🦅

A Quantum Time Crystal Simulation Using @qiskit ⚛️🔮 Got it working! In this simulation experiment, we employ a two-qubit quantum circuit initialized to a custom superposition state, (1/2) * (∣00⟩+∣01⟩+∣10⟩+∣11⟩), aiming to explore complex quantum dynamics reminiscent of time crystals. The circuit undergoes three iterations of a multifaceted gate sequence comprising Hadamard, T, phase, and rotation gates, as well as entangling Controlled-Not operations. To simulate realistic conditions, we incorporate a noise model featuring both depolarizing and phase damping errors. The simulation is executed using Qiskits Aer simulator, and the state distributions are analyzed with a histogram. Initialization: We initialize the qubits to a specific state rather than the default ground state ∣0⟩. The initialization is done using the Initialize class in Qiskit, and the state we choose is [0.5,0.5,0.5,0.5], which is essentially a normalized superposition over two qubits: Initial state = (1/2) * (∣00⟩+∣01⟩+∣10⟩+∣11⟩) Quantum Circuit: We define a Quantum Circuit with two qubits and two classical bits for measurement. We apply a sequence of gates multiple times (three loopss in this case): Hadamard (H) Gates: Create a superposition of basis states. T-Gates: Introduce a phase of 44/π​ to the ∣1⟩ component of the state. Phase (P) Gates: Add a phase of 0.1 radians to the ∣1⟩ component of the first qubit. Rotation Gates (RX, RY, RZ): Rotate the qubit states around the X, Y, and Z axes of the Bloch sphere by specified angles. Controlled-Not (CX) Gates: Create entanglement between the two qubits. T-Dagger (Tdg) Gates: The inverse of the T-gate, removes the phase added by T-gates. Noise Model: Depolarizing Errors: Represent the qubit's tendency to forget its state, modeled by a depolarizing channel. Phase Damping Errors: Account for the loss of quantum information without energy loss, essentially representing dephasing in the system. The noise model uses both depolarizing and phase damping errors, composed together for single-qubit gates, while only depolarizing errors are applied to the two-qubit (CX) gate. We use Qiskits Aer simulator to perform a Quantum Assembly Language (QASM) simulation. We retrieve the counts of each quantum state after the simulation and plot them in a histogram for analysis. Results: 00 State: This state could be seen as closest to the ground state for our quantum system. A high frequency of 00 outcomes might suggest that the system is not evolving in a particularly complex manner, and could be more analogous to the stable but non-oscillating states in classical systems. 01 and 10 States: These states represent a flip of one qubit while the other remains in its ground state. In a time crystal, you might expect to see periodic flips between states. If the frequency of 01 and 10 is comparable and significant, it could be an indication of some form of periodic or complex behavior. 11 State: This is the most excited state for a two-qubit system. If we observe a frequency of 11 states, it could indicate that the system has gone through a complex evolution, moving far from its initial state. The mathematical formulations, the quantum gates, and the noise model together try to simulate a realistic quantum system subject to errors and complexities, thereby approaching the behavior we would expect from a discrete time crystal in a quantum setting.

@ComancheTippie - Tippie 🦅

Exploring Localized and Global Decoherence in Massively Entangled Quantum Systems With @qiskit ⚛️⚛️⚛️⚛️⚛️ This Qiskit code creates a quantum circuit with 20 qubits, each initialized in the ground state. It then applies a Hadamard gate to every qubit to generate a superposition and utilize controlled-NOT gates to entangle all pairs of qubits. To simulate the effects of noise, two types of Pauli errors are introduced: universal errors affecting all qubits and focused errors affecting a subset of five qubits. These errors are modeled through a noise model in the AerSimulator. After simulation, the measurement results are grouped by their Hamming weight, and displayed as a histogram. This allows for a more interpretable visualization of how localized and global noise impact a massively entangled quantum system. My system can only handle 30 qubits in this before stalling, but it would be fun to explore models with tens of thousands. Note - If we're talking about massive entanglement decoherence in a localized area, it could imply that an area of spacetime is experiencing a breakdown of quantum entanglement on a grand scale, perhaps due to environmental interactions or some other external influence. This would be an exotic phenomenon, and might even resemble what Roger Penrose has discussed about quantum events being responsible for consciousness through orchestrated objective reduction or what Stephen Hawking suggested about the quantum fluctuations at the edge of a black hole. Initialization: We start with 30 qubits, each in the ground state ∣0⟩. Superposition Creation: For each qubit, we apply a Hadamard gate H, which transforms it into a superposition state: H|0⟩ = 1/sqrt(2) * (|01⟩ - |10 ⟩) This allows each qubit to exist in a superposition of ∣0⟩ and ∣1⟩. Entanglement: We apply CNOT gates CX between every pair of qubits to create an entangled state. Mathematically, the CNOT operation can be represented as: CX ∣a,b⟩=∣ a,a ⊕ b ⟩ So, when a=0, b remains unchanged, and when a=1, b is flipped. Noise Modeling: We introduce two types of errors, 'universal' and 'focused,' modeled by Pauli X,Y,Z operators. Universal Error: Each qubit has a 1% chance to undergo X,Y, or Z flip. Focused Error: A designated set of 5 qubits (qubits 0-4) has a 5% chance for each type of Pauli flip. Simulation: We use Qiskit AerSimulator to simulate the quantum operations, including the noise models. The noise model impacts the resulting state after superposition and entanglement. Measurement: All qubits are measured in the computational basis ∣0⟩,∣1⟩, collapsing each to a definite state. The many states are grouped according to the Hamming weight, making the output much more interpretable for my system. Results: The spike (13 - 17) suggests that the qubits, regardless of their location in the focused area or not, are experiencing a similar type of decoherence. If the localized noise had a significant, differentiating impact, we would expect to see multiple peaks or perhaps a broader distribution. The concentration around median Hamming weights suggests that there's a notable level of entanglement that remains intact, even under the influence of noise. The system seems to prefer states where approximately half the qubits are in the 1 state and half are in the 0 state. Despite introducing local and global noise, the system maintains a degree of symmetry and balance.

@ComancheTippie - Tippie 🦅

Quantum Loops in Time: Resolving an Abstract Grandfather Paradox with @qiskit ⌚⌚ This simulation is to explore abstract closed time-like curves and their potential paradoxes. The experiment is divided into four sections: 1. Abstract Ordinary Spacetime Region: This is where we model events occurring in normal spacetime, before entering the Closed Time-like Curve. 2. Closed Time-like Curve: This is the core of the experimentt. We need to model a section of the circuit that mimics an abstract closed time-like curve. The idea is to create a loop in time where the future can affect the past. The Paradox: We introduce an operation that would lead to a logical paradox if interpreted classically. For example, inverting a bit that's supposed to represent an event that should be unchangeable, like the grandfather in the grandfather paradox. Resolution: Finally, we measure the system to see if quantum mechanics resolves the paradox. We're looking to see if the resulting quantum state is self-consistent. The Code: Abstract Ordinary Spacetime Region: We initialize our quantum system in state ∣0⟩. We apply a Hadamard gate H to create a superposition: |Ψ⁻⟩ = 1/sqrt(2) * (|01⟩ - |10 ⟩) Closed Time-like Curve: We model the closed time-like curve using a Controlled-X (CNOT) gate, which entangles our qubits. The intention is to simulate the loop by making the state of one qubit dependent on another. The Paradox: We introduce a Pauli-X (NOT) gate to flip the first qubit. This operation mimics an action that would create a paradox if time travel to the past were possible. Collapse and Measure: Finally, we apply the CNOT gate again to close the time-like curve. Then, we then measure the quantum state. If quantum mechanics inherently resolves the paradox, the final state should be self-consistent. Results: As you can see on the histogram, the quantum state ∣10⟩ was observed 514 times, and the quantum state ∣11⟩ was observed 510 times. The near-equal probabilities of ending up in states ∣10⟩ and ∣11⟩ signify that the quantum system navigates the abstract paradox by existing in a superposition. This is a form of quantum resolution to the paradox. The system is essentially saying, "I can be in a state where the paradoxical action was taken ∣11⟩ and also in a state where it wasn't ∣10⟩, and I'm okay with being in a superposition of both." Thus, the results could be seen as a quantum mechanical vote for the idea that these types of paradoxes are resolvable, at least within this simulation. It's like a quantum take on the Novikov self-consistency principle, which says that if time travel exists, then events will unfold in a way that is self-consistent.

@ComancheTippie - Tippie 🦅

Hamiltonian Dynamics in Simulated Cosmological Phase Transitions with @qiskit ⚛️⚛️⚛️ In this experiment, we simulate a simple and abstract model of the universe undergoing cosmological phase transitions. The simulation employs a 1D lattice of spins, represented by qubits, with each governed by a Hamiltonian that captures kinetic, potential, and interaction terms. By employing the Variational Quantum Eigensolver algorithm, we calculate the ground state energy of the system for varying values of mass m and interaction strength J. The results are visualized as a heatmap, revealing the ground state energy landscape as m and J vary. This could serve as a quantum-analogous of how the universe's ground state might evolve over time. Hamiltonian Construction: We define a function construct_hamiltonian that takes m, J, and N as parameters. The Hamiltonian H is formulated as: H = ∑ n-1, i=0 (1/2Xᵢ + m^2 * Zᵢ) - J * ∑ n-2, i=0 (Zᵢ * Z_(i+1)) Xᵢ and Zᵢ are Pauli-X and Pauli-Z matrices operating on the i-th qubit. Ansatz Construction: We create a quantum circuit ansatz with N qubits. A parameterized R_y​ rotation and a chain of CNOT gates are applied. Energy Evaluation Function: The function evaluate_energy takes variational parameters and returns the expected value of H for the state prepared by the ansatz. Optimizer and Backend Setup: We use the COBYLA optimizer with a maximum of 500 iterations. Parameter Sweep and Energy Calculation: For a range of m and J values, we run VQE to find the ground state energy. The energies are stored in a 2D NumPy array. Visualization: A heatmap is generated using Seaborn. The x-axis represents J values, and the y-axis represents m values. Each cell's color indicates the ground state energy for the corresponding m and J. Results: The result is not symmetric, indicating that m and J have distinct roles in the system's behavior. The values generally start from negative, suggesting a lower energy state, and transition to positive values. This could represent a phase transition. Particularly in the last two rows, there are sudden jumps from negative to positive values. Such discontinuities can indicate significant changes in the system's behavior and may correspond to critical points in the phase diagram. The results seem to indicate at least three regions: A low energy, negative value region possibly indicating a stable phase. A transitional region where values are relatively small but increasing. A high energy region, particularly in the bottom right, where the system might be in a highly excited state.

@ComancheTippie - Tippie 🦅

Simulating Twistor Space Mapping in @Qiskit 🌌🌌🌌 Relevance to Twistor Theory and Objective: This code is a highly speculative and simplified representation that draws inspiration from the complex and geometric nature of Roger Penrose Twistor Theory. In Twistor Theory, a point in spacetime is mapped to a point in twistor space via a complex geometric transformation. This experiment aims to mimic this by applying a quantum Fourier transform followed by a phase rotation to simulate the transition to a complex space. Theoretical Framework: In this experiment, we consider a simplified 1+1 dimensional spacetime with one spatial dimension x and one time dimension t. A point in this spacetime is (x,t). Twistor Space: A point Z in twistor space is creatively considered as Z=x+it in this experiment. Quantum Circuit Setup: Initialization: We start with a quantum circuit of n=4 qubits, initializing them to the state ∣0⟩. Step A: Encoding Spacetime Events: 1. We choose a spacetime event (x,t) and represent it as a binary string. For example, (x,t)=(2,3) can be represented in binary as x=10 and t=11. 2. We combine these to form a binary string like 1011. 3. Using Qiskit's little-endian format, this becomes 1101. ∣Spacetime State⟩=∣1101⟩ Step B: Quantum Fourier Transform (QFT): 1. We apply the standard QFT on the qubits. The Fourier transform is mathematically defined as: F(x) = 1/sqrt(N) * (Σ (N - 1), (k = 0))*(e^((2πikx)/N)) * f(x) 2. The QFT is applied to each qubit with controlled phase gates: CU_1(θ) = (1, 0 , 0 , e^(iθ)) where θ = π/(2(j+1)), and j is the qubit index. Step C: Introducing Imaginary Phase: 1. To simulate the imaginary unit i in Z = x + it, we apply a phase rotation gate P(ϕ) to each qubit with ϕ = π/4. P(ϕ) = (1, 0, 0, e^(iϕ)) Step D: Optional Inverse QFT: 1. We apply the inverse of QFT to map back to a different representation of the original space. This is just for demonstration purposes. Step E: Measurement: We measure all the qubits. Results: The histogram represents the distribution of quantum states after the transformation, which has similarities with how frequencies are distributed in a Fourier transform. The higher states (ie the states with higher probabilities) could potentially correspond to more fundamental elements in the corresponding twistor space, while the lower states might represent more complex or composite elements. The bar chart represents the frequency of each quantum state after measurement. The macro results around 50 for most of the states suggest a nearly uniform distribution. This could imply that these states are almost equally likely, which could be due to the complex phase and QFT making the system evolve into a superposition of many states. Peak at ∣0100010⟩: The state ∣0100010⟩ stands out with a much higher count (554). This suggests that the system is more likely to be found in this state after the transformation.

@ComancheTippie - Tippie 🦅

Nonlinear Sigma Models in Twistor Theory with @qiskit 🌌🌌🌌 1. Problem: This idea is to explore a simplified version of nonlinear sigma models within the context of twistor theory. Nonlinear sigma models describe how fields transform under changes in some target space, and they are key in twistor theory. Mathematically, the equations of motion are often derived from an action S given by: S = ∫ d² x g_ab (ϕ) (∂^μ) (ϕ^μ) (∂_μ) (ϕ^b) where ϕ^μ is the field, g_ab is the metric in the target space, and ∂^μ denotes partial derivatives. 2. Quantum Encoding: We aim to encode this physical system into a quantum computer for simulation. Here, we have a chain of 4 qubits (will scale up), where each qubit represents a discretized point in spacetime. Each qubit will hold information about the field ϕ^a at that point. 3. Variational Form: We employ a variational approach to approximate the ground state of this system. We define a parameterized quantum circuit U(θ) where θ are the parameters we'll optimize. The circuit uses R_x and R_z rotations, along with CNOT gates, to create entanglement and cover the Hilbert space effectively. 4. Objective Function: Ideally, we should find θ that minimizes the expectation value ⟨Ψ(θ)∣H∣Ψ(θ)⟩ of the Hamiltonian H representing the system. In this example, we used a placeholder objective function Σ_i θ²_i to demonstrate the optimization process. In a real world scenario, this would be replaced with the expectation value of the Hamiltonian derived from the sigma model. 5. Optimization: We used the COBYLA optimizer to find the optimal θ. The optimizer changes θ iteratively to find the minimum of the objective function. The optimal values of θ are plotted in a bar chart for visualization. Results: The bars represent the optimized parameters θ for each 4-qubit system. The values 2.23, -2.19, 2.238, and -4 are the optimized angles (in radians) for the R_x and R_z rotations applied to each qubit. Variability: The wide range of values and their signs indicate a complex landscape for the objective function. This could be a reflection of the complex dynamics we'd expect in a nonlinear sigma model or any intricate quantum system. Magnitude: The magnitudes of these angles suggest that the rotations applied to the qubits are substantial, indicating a large portion of the Hilbert space to find the minimum of the objective function. Symmetry & Anti-Symmetry: The values are not all the same, reflecting the non-trivial and potentially complex interactions between different spacetime points (qubits) in the context of a sigma model. In a more theoretical setting like Twistor Theory, these optimized parameters would represent an approximate solution to the equations of motion of the nonlinear sigma model. They might correspond to a particular configuration in the twistor space that minimizes the action, although highly simplified here.

@ComancheTippie - Tippie 🦅

Conformal Field Theory (CFT) and Twistors (400 to 700 qubits) with @qiskit 🌌🌌🌌 The aims to simulate the interaction between Conformal Field Theory (CFT) and twistor space using quantum computing. We focus on approximating the action of vertex operators in CFT, which are key building blocks for correlation functions. These vertex operators are represented by specialized quantum gates in a circuit involving 400 to 700 qubits. The optimized parameters of these gates may serve as a bridge to twistor configurations, providing a novel approach to explore the quantum aspects of both theories. 1. Problem: Conformal Field Theory (CFT) respects conformal symmetry and is often key to understanding quantum gravity and string theory. Vertex operators are essential elements in CFT and can be mapped to points in twistor space. 2. Quantum Encoding: The experiment uses between 400 and 700 qubits, each representing a discretized point in the target space of the CFT. The state of each qubit represents the field configuration at that point. 3. Vertex Operator Approximation: In CFT, vertex operators are generally represented as: V(α) =: e^(iαϕ(z,zˉ)) where ϕ is the field and α is a parameter. We approximate these vertex operators using quantum gates. We use parameterized R_x and R_z rotations, along with CNOT gates for entanglement. 4. Objective Function and Optimization: We aim to optimize the parameters θ of these approximated vertex operators. The objective function F(θ) is a placeholder, approximated as F(θ) = Σ_i ((θ_i)^2). Optimization is carried out using the COBYLA algorithm to find θ that minimizes F(θ). The optimized θ values are interpreted as the parameters that best approximate the action of the vertex operators in CFT. These θ values are then considered as a specific configuration in twistor space, forming a bridge between CFT and twistor theory. Results: ~0.5 to 0.8: The bulk of the optimized parameters lying in this range suggests that the quantum states are exploring a specific region of the Hilbert space. In the context of CFT, this could indicate a tendency towards certain field configurations that are more favorable. ~1: Few spikes at this level might imply that it's less likely for the vertex operators to have parameters that significantly rotate the qubits (since R_x(π) = R_z(π) = -I, a full rotation). ~0.2: The presence of a non-negligible number of spikes around this value could indicate the existence of sub optimal configurations that are still significant in the landscape of the objective function. CFT: In Conformal Field Theory, vertex operators play a crucial role in defining correlation functions. The optimized parameters could be interpreted as defining a specific correlation function in the theory. The spikes might then represent the sensitive points in this function where small changes could have a significant impact. Twistor Theory: These optimized parameters could be thought of as specific points or configurations in twistor space. The density and distribution of these spikes might provide insights into how twistor space and CFT are interrelated. Regions where spikes are denser could correspond to hot spots in twistor space that are particularly relevant for the underlying CFT.

@ComancheTippie - Tippie 🦅

Twistor Qubits with @qiskit 🌌🌌🌌 The code aims to explore the concept of Twistor Theory and Qubits, Twister Qubits, which are quantum bits existing in a Hilbert space mapped to twistor space. By creating a set of quantum gates that correspond to their twistor space equivalents, the experiment seeks to perform computations in this novel computational space. 1. Problem: Twistor Theory provides a framework to unify quantum mechanics and general relativity by replacing spacetime with a complex space known as twistor space. In quantum mechanics, a qubit is the fundamental unit of quantum information. A Twistor Qubit would be a quantum bit that exists in a Hilbert space mapped to twistor space. 2. Quantum Encoding: We use 10 qubits to simulate the concept of twistor qubits. Each qubit represents a point in the twistor space, and its state encodes the geometry at that point. 3. Twistor Mapping: Traditional quantum gates like Pauli-X, Pauli-Y, and Pauli-Z are mapped to their twistor space equivalents. For example: Pauli−X→Rx​(π/3), Pauli−Y→Ry​(π/4), Pauli−Z→Rz​(π/5) 4. Twistor Operations: These twistor-based quantum gates are then used to perform computations. A series of controlled operations to simulate the interactions between different points in twistor space, using C−R_x​, C−R_y​, and C−R_z​ gates. The final state of each twistor qubit is measured to analyze the outcomes. By encoding qubits as points in twistor space and performing computations using twistor-based operations, we're exploring quantum mechanics in a spacetime-geometry-aligned computational framework. A quantized twistor theory, where each twistor qubit encodes a piece of the quantum nature of spacetime. Results: Initial Spikes: The spikes at the beginning (up to 40, 60, and 100) suggest that certain states are more likely to be observed. These spikes could correspond to the quantum states that are most aligned with the initial ∣0⟩ states under the sequence of rotations we applied. In the language of twistor theory, these might be the "most natural" or "lowest-energy" configurations of twistor space given the initial conditions and transformations. Dying Down: The decrease in frequency as you move further along the outcome axis could suggest that these states are less naturally aligned with the initial ∣0⟩ states under your sequence of rotations. Stable Variability: The continued variability between 1 and 15 toward the end suggests that while these states are less likely, they are still significantly populated. This indicates that the quantum circuit's operations do not lock the system into a small number of states but allow for a broad exploration of the Hilbert space (or in this case, the twistor space).

@ComancheTippie - Tippie 🦅

Quantum Scattering Amplitudes with @qiskit ⚛️⚛️⚛️ This aims to simulate the computation of scattering amplitudes in twistor space using quantum circuits. We encode essential aspects of twistor theory into a quantum algorithm. We begins by mapping qubits to points in twistor space, initializes their states, and then simulates their interactions via a Hamiltonian model. Finally, we extract the scattering amplitudes using a Quantum Fourier Transform (QFT). 1. Twistor Encoding: Equations: R_x (θ), R_y​(θ), R_z​(θ) R_x = (cos(θ/2), -isin(θ/2), -isin(θ/2), cos(θ/2)) Ry_​(θ) and Rz​_(θ) are similarly defined. We start by encoding points in twistor space using qubits. Each qubit undergoes rotations R_x​,R_y​, and R_z​ with randomly chosen angles to mimic the complex structure of twistor space. 2. Initial State Encoding: ∣ψ⟩=∑i​ci​∣i⟩ Normalization: ∑​_i ∣ci​∣ 2 = 1 We initialize the state of a subset of qubits. These qubits represent the initial state of the system in twistor space. The state is a superposition defined by the coefficients c_i​, which are normalized. 3. Interaction Hamiltonian: We model the interaction between twistors using a Hamiltonian. - This is an oversimplification but serves to demonstrate the concept. H = 0.5X ⊗ X+0.3Y ⊗ Y+0.2Z ⊗ Z 4. Time Evolution: We simulate the time evolution of the system by applying a unitary transformation corresponding to the Hamiltonian. U = e^(−iHt) 5. Scattering Amplitude Extraction: We apply a QFT to the phase qubits to extract the scattering amplitudes. This serves as a quantum analog to the Penrose transform, linking the complex twistor space to physical space-time events. QFT : ∣j⟩ → 1/sqrt(N) * ∑_(k = 0) N - 1 (e^(2πijk/N)) * ∣k⟩ Results: Scattering Amplitudes: Higher frequencies at lower counts may imply that certain paths in twistor space are more likely to be taken by the twistors during interactions, possibly indicating preferred or more natural configurations or interactions within twistor space. Quantum Interference: The descending pattern may also be a manifestation of quantum interference among the qubits, particularly as they evolve through time. This is a hallmark of quantum systems and could be reflecting some intrinsic geometric properties of twistor space. Limitations of the Toy Model: Since this Hamiltonian and time evolution steps are simplified models, the output might be influenced by these approximations. The distribution could change with a more accurate representation of the interactions in twistor space. Will work on closer models with next iterations. Normalization Effect: The initial states were normalized, and this could introduce a bias toward specific outcomes when observed. The experiment could be revealing more about the initial conditions than the dynamics of twistor interactions. Quantum Fourier Transform: The QFT is designed to extract frequency components from a quantum state. The pattern might be indicative of the frequency of certain scattering events in our simulated twistor space. The decline in frequency might hint at a hierarchy or structure in twistor interactions. In twistor theory, complex numbers play a significant role in describing space time events. This experiment, although very simplified, might be capturing some essence of this complexity, manifesting it as a probabilistic outcome in a quantum system.

@ComancheTippie - Tippie 🦅

Abstract Quantum Gravity in Twistor Space with @Qiskit 🌌🌌🌌 This aims to explore an abstract representation of quantum gravity in the framework of twistor theory. We encode twistors into qubits and introduce a nonlinear graviton representation to model complex interactions within twistor space. By applying controlled rotations that simulate gravitational interactions, we introduce a representation of Penrose's nonlinear gravitons into our quantum system. A quantum Fourier transform (QFT) serves as a Penrose transform, mapping the complex twistor space into simpler mathematical structures that are interpretable. 1. Twistor Encoding: We initialize the qubits (representing points in twistor space) by applying random rotations around the x and y axes. The angles θ and ϕ are randomly sampled from a uniform distribution between 0 and π. R_x​(θ)R_y​(ϕ) 2. Nonlinear Graviton Representation: Controlled rotations CRZ and CRX are applied between adjacent qubits. These represent the gravitational interactions within the twistor space, following Penrose's concept of the nonlinear graviton. CRZ(4π​)CRX(3π​) 3. Penrose Transform via QFT: The quantum Fourier transform is applied to all qubits, acting as a Penrose transform. The QFT transforms the complex space into a space where the relationships between twistors are more straightforward to analyze. e^(iϕ) H Result: The general variability between 0 and 60 could be indicative of the complex, high-dimensional landscape that is twistor space. It suggests a large range of possible states and interactions, many of which are not preferred but are still relevant for a complete understanding of quantum gravitational effects in this framework. The outliers, ranging from 50 to 127, are more noteworthy. In the context of twistor theory, these could represent states where the nonlinear graviton representations have particular symmetries or characteristics that make them more likely. In the language of quantum gravity, these could be considered as preferred quantum states where gravity manifests more strongly or uniquely.

@ComancheTippie - Tippie 🦅

Penrose Transform in Quantum Circuits with @qiskit ⚛️⚛️⚛️ The Penrose transform serves as a tool to map functions between the twistor space and spacetime. This experiment employs a quantum circuit to approximate the transform. The objective is to gain insight into how twistor theory, initially developed as a mathematical framework for particle physics and general relativity, can be simulated on a quantum level. 1. Initial Setup: We start with n qubits, here n=50. These qubits are partitioned into two sets: one representing functions in twistor space and the second representing functions in spacetime. 2. Twistor Space and Spacetime Encoding: The initial set of qubits is prepared in a superposition state using Hadamard gates to represent functions in twistor space. H∣0⟩ = 1/sqrt(2) ​(∣0⟩+∣1⟩) The second set of qubits is initialized to represent functions in spacetime. This could be any quantum state depending on the specifics of what function you want to represent. 3. Quantum Fourier Transform (QFT): A Quantum Fourier Transform is applied to the qubits representing twistor space. This is a quantum version of the classical Fourier transform and serves to move from a position to momentum representation. QFT : ∣j⟩ → ∑_k = 0, N-1 (​e^(2πijk/N)) ∣k⟩ 4. Penrose Transform Approximation: Penrose Transform: F(ω)→f(x)=∫F(ω)δ(x,ω)dω Here, F(ω) and f(x) are functions in twistor space and spacetime respectively, and δ(x,ω) is the delta function capturing the correspondence between x and ω. Then the spacetime qubits are measured to obtain the transformed function. Results: High Counts at Lower Values at 1, 2 could indicate that the more straightforward or common mappings between twistor space and spacetime are being realized more frequently. These could be the default states that the system naturally tends to, perhaps representing simpler or more symmetrical functions in spacetime. As we move to higher values 3 - 7, the frequency decreases, possibly indicating that these represent more complex or less likely mappings between twistor space and spacetime. Outliers at 8 - 11 are the most interesting. The outliers may signify rare or unique conditions under which specific, less common mappings occur. These could be akin to resonant frequencies in the transform, and they might represent particularly interesting or unusual relationships between twistor space and spacetime.

@ComancheTippie - Tippie 🦅

Abstract Twistor Encoding with @qiskit ⚛️⚛️⚛️ Leveraging twistor space, we encode entangled quantum states and execute operations to study their properties. This abstract experiment explores our understanding of geometric encoding foundations of quantum entanglement within the framework of twistor theory. 1. Qubit Allocation: We allocated around 10 qubits. These qubits were logically partitioned into three different sets: Twistor Variable Qubits (QT​): For encoding twistor variables. Entangled State Qubits (QE​): For generating and holding entangled states. Ancillary Qubits (QA​): For auxiliary operations and error correction if necessary. 2. Twistor Encoding: We used Pauli rotation gates R_x​, R_y​, and R_z​ to perform a mapping from the computational basis to a basis that corresponds to twistor variables. R_x (θ) = (cos(θ/2), −isin(θ/2), −isin(θ/2)​, cos(θ/2)​) and likewise for R_y(θ) and R_x(θ) 3. Entanglement Generation: Equation used for Bell State: ∣Ψ⟩=12(∣00⟩+∣11⟩)∣Ψ⟩=2​1​(∣00⟩+∣11⟩) A Hadamard gate followed by a CNOT gate are used on selected pairs of qubits from Q_E​ to generate entangled states. 4. Twistor Operations: Twistorial transformation equations are represented as unitary matrices U_T​ acting on our twistor qubits Q_T​. 5. Twistor Diagram Encoding: Unitary operations were custom designed to emulate the encoding of vertices and lines in twistor diagrams. These were applied to Q_T. 6. Measurement & Decoding: A QFT was applied to QE​ to translate frequency information into spatial information, aiding measurement. Quantum Fourier Transform (QFT) equation: QFT= ∑_x, y=0, N-1 (ω_N)^(xy) ​∣y⟩⟨x∣ Results: The spread between the least and most frequent outcomes can provide insights into the flatness of the quantum state in the computational basis. A more peaked distribution might suggest that the quantum state has localized in a few basis states, whereas a flat distribution would imply a more delocalized state. The bitstring 1010000000 appears 12 times, the highest among all the bitstrings, suggesting it might be a state of particular interest or significance. The bitstrings are quite varied, but some bitstrings occur more frequently than others. States starting with 000 and 010 seem to appear quite often. This could imply a kind of clustering in the Hilbert space around these regions, or it could be a consequence of how the initial states evolved under the quantum operations.

@ComancheTippie - Tippie 🦅

Black Hole Information Paradox in Abstract Twistor Space with @qiskit ⚛️⚛️⚛️ This aims to simulate an abstract Black Hole Information Paradox within the framework of Twistor Theory using a quantum circuit. With 10 qubits, the experiment models an event horizon of a black hole and attempts to track the flow of information as it approaches, crosses, and possibly reemerges from the event horizon. The quantum states are encoded into twistor variables, allowing us to explore how the unique mathematical structure of twistor space might shed light on the information paradox. Initialization: The first set of qubits represents the spacetime near a black hole, and the second set encodes information within the twistor framework. Mathematically, the spacetime qubits are initialized in a superposition to represent different points near the event horizon, while the twistor qubits are initialized to encode specific twistor variables. ∣Ψ⟩= 1/sqrt(2) (∣0⟩+∣1⟩)^(⊗n) Event Horizon Encoding: A series of gates, including controlled-Z and controlled-X gates, are applied to simulate the gravitational effects near the black hole's event horizon. Equations from General Relativity are mapped to quantum gates to simulate this behavior. H is a Hamiltonian that models the event horizon. U_(EH) ​= e^(−iHt) Twistor Transformation: A Quantum Fourier Transform is applied to the twistor qubits to bring them into the twistor space. This is akin to performing the Penrose transform, mapping functions from spacetime to twistor space. F(ω,π) = ∫ f(x)e^(i(ωx+πx))dx Entanglement and Information Flow: Entangled pairs are created between spacetime and twistor qubits to study how information gets entangled as it approaches the event horizon. ∣Φ⟩ = 1/sqrt(2) (∣00⟩+∣11⟩) Information Retrieval: Specific gates are applied to simulate Hawking radiation and to see if any of the entangled information reemerges from the event horizon. H′ is a Hamiltonian that models Hawking radiation. U_(HR) ​= e^(−iH′t) The final step is to measure all the qubits and analyze the resulting states to interpret the flow of information and how it correlates with twistor variables. Results: Event Horizon Encoding: The first 400 qubits are encoding the event horizon information. A higher frequency of certain bit strings in this region would imply those configurations are more probable at the event horizon. Twistor Information: The next 400-1100 qubits represent the twistor variables. In the context of our experiment, these are encoded to capture the complex light ray configurations near a black hole. Information Retrieval: The remaining qubits are modeled to capture the Hawking radiation or other forms of information retrieval. Information Flow: The flow of information can be expressed in a quantum mechanical sense through the concept of quantum entanglement and correlations between different qubit sectors: ∣Ψ⟩ = i,j,k ∑ a_ijk ​∣i⟩ Event Horizon​⊗ ∣j⟩Twistor ​⊗ ∣k⟩Info Retrieval Here a_ijk​ are complex coefficients. The most probable states (having the highest counts) can be interpreted as the most likely configurations of the event horizon, twistor space, and information retrieval mechanism. 1111011111 occurred 13 times: Strong indication of a particular configuration of event horizon and associated twistor variables. 0100011111 occurred 15 times: Another highly probable configuration. The variety and frequency of bitstrings can give insights into whether information is lost, gained, or preserved as it crosses the event horizon. If we see a uniform distribution of states in the Information Retrieval qubits but not in the Event Horizon qubits, it could imply information loss.

@ComancheTippie - Tippie 🦅

Cosmological Models in Twistor Theory with @qiskit 🌌🌌🌌 This aims to model abstract cosmological equations, transformed into twistor space, using a 20 qubit quantum circuit. The experiment breaks down the problem into four main subsystems: twistor functions, the cosmological constant, tensor fields, and time evolution. 1. Initialization: 8 qubits are initialized in a superposition of all possible states using Hadamard gates H. Mathematically, the state after application of the Hadamard gate is given by: ∣ψtwistor​⟩ = 1/sqrt(2^n) ∑_x=0, 2^(n)-1 (∣x⟩) where n=8. Cosmological Constant Qubits (4 qubits): These are initialized using R_X and R_Z gates. The rotations are set to angles of 0.3 and 0.7 respectively, creating a specific initial state. The rotation gates are given by: R_x​(θ) = (cos(θ/2), −isin(θ/2), ​−isin(θ/2), cos(θ/2)​) R_z​(θ)=(e^(−iθ/2), 0, ​0, e^(iθ/2)​) Tensor Field Qubits (4 qubits): These are also initialized in a superposition using Hadamard gates similar to the Twistor Qubits. Time Evolution Qubits (4 qubits): These are not specifically initialized but will be entangled with the Tensor Field Qubits in the next step. 2. Time Evolution: For each Time Evolution qubit, a CNOT gate CX is applied, controlled by a corresponding Tensor Field qubit. The idea is to simulate how tensor fields evolve over time, possibly mimicking the dynamics of spacetime. The CNOT gate is given by: CX= (​1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0​) 3. Measurement: All qubits are measured, and the results are stored in classical registers corresponding to each subsystem. Results: The bitstring 000 appears most frequently, followed by 010 and 100. Others like 001, 110 also appear more than once. This could indicate that certain states in the quantum circuit are more likely to be observed. Since we see a variety of bit strings with different frequencies, the entropy of the system would likely be relatively high, indicating a complex state space. The entanglement between the Tensor Field and Time Evolution qubits can be seen as a simple representation of the intricate twistor functions that govern the underlying geometry of our spacetime. Though the experiment is limited by the number of qubits and the simplicity of the quantum gates used, it lays the groundwork for more complex simulations with Twister Theory.

@ComancheTippie - Tippie 🦅

Recreating The 2022 Nobel Prize-Winning Entanglement Experiment on @ibm's 7 Qubit Quantum Computer Nairobi using @qiskit ⚛️⚛️ The first code I've processed through a real quantum computer. ⚡⚡ The experiment aims to recreate the Nobel-winning tests of quantum entanglement conducted by Alain Aspect, John F. Clauser, and Anton Zeilinger, that won the 2022 Nobel Prize in Physics, which provided compelling evidence against classical theories of local realism. Utilizing IBM's Nairobi quantum computer (being a Computer Science student @ASU, I get 10 minutes a month run time on their machines), the experiment employs the Clauser-Horne-Shimony-Holt (CHSH) inequality as a testbed for entanglement. By creating and measuring entangled qubit pairs in various bases, and incorporating randomness through multiple methods, the experiment seeks to quantify the degree to which quantum phenomena can deviate from classical expectations. Alain Aspect, John F. Clauser, and Anton Zeilinger Experiment: Photon Pair Generation: The experiment started by generating an entangled pair of photons with linked polarization states. |Ψ⁻⟩ = 1/sqrt(2) * (|01⟩ - |10 ⟩) Sending the particles to two different locations: These entangled photons were sent to two different stations where measurements were performed. The stations were sufficiently distant to uphold the principle of locality. Choosing a measurement basis independently: The polarization of the incoming photon was measured along one of two possible directions at each station. This direction (or basis) was chosen independently at each station using a fast quantum random number generator (QRNG). Incorporating cosmic data: They used data from distant quasars to determine the settings of the measuring devices. This is a novel way of ensuring the independence of the chosen measurement settings. Incorporating human choices: Human choices were also incorporated into the selection of measurement settings to test the so called "freedom of choice" loophole. Performing a coincidence detection: A coincidence circuit was used after the measurements to keep only the events where both photons were detected, eliminating noise or errors from photon loss or detection inefficiency. Repeating the experiment: The experiment was repeated many times to collect a sufficient amount of data for statistical analysis. Analyzing the data: The collected data was analyzed by calculating the CHSH inequality, a key quantity that provides a limit for correlations predicted by any local realistic theory. | E(A, b) - E(a, b') + E(a', b) + E(a', b') | ≤ 2 My Experiment: ⚛️⚛️ Creating an entangled pair of qubits: We start by creating an entangled pair of qubits using the Hadamard gate and the CNOT gate. This corresponds to the creation of entangled particles in the real experiment. Entangled State = (1/sqrt(2))​ * (∣00⟩+∣11⟩) Choosing a measurement basis independently: We independently chose a measurement basis for each qubit. We used a simple random choice function to represent the fast quantum random number generator (QRNG) used in the actual experiment. Our three ways to ensure randomness: Fast Switching: This method uses Python's random.choice to randomly select between the Z and X bases. Decimal Expansion of π: This method utilizes the decimal expansion of π, extracting digits from π to decide the basis. Even digits lead to the Z basis, and odd digits lead to the X basis. User Input: This method leverages user-generated random numbers (in this case, randomly generated integers) to choose the basis, using the parity of the numbers. Performing a coincidence detection: Any qubits included in the measurement will contribute to the count in the output histogram, so if we have a two-qubit circuit and we measure both, we're already effectively only considering the "coincidences" where both are measured. Repeating the simulation: We repeated our quantum circuit once to gather data. The Nobel experiment was repeated many times, I only get 10 minutes on their machines per month so have to save on time. Analyzing the data: We analyzed the data by calculating the CHSH quantity and visually representing the results. We also performed statistical tests (chi-square tests) to check the quality of our randomness. Code Walkthrough: 1. Initialization: We import the necessary libraries and modules such as Qiskit, matplotlib, and numpy. Connect to IBM's quantum computing backend, specifically the 'ibm_nairobi' backend. Initialize empty dictionaries to hold results (results) and CHSH values (chsh_values). 2: Creating Entangled Pairs: A quantum circuit is created with two qubits and two classical bits. An entangled pair is then generated between the two qubits using a Hadamard gate on the first qubit followed by a CNOT gate between the first and second qubits. Mathematically, this takes the initial state Entangled State = (1/sqrt(2))​ * (∣00⟩+∣11⟩) 3: Random Basis Selection: Three methods are used to ensure randomness in the basis selection for measurements: 1. Fast switching using Python's random.choice. 2. Using digits from the decimal expansion of π. 3. User-generated random numbers. 4: Measuring in Selected Basis: The two qubits are measured in the randomly chosen basis ('Z' or 'X'). If the 'X' basis is chosen, a Hadamard gate is applied to the qubit before measurement. 5: Data Collection: The outcomes ('00', '01', '10', '11') are collected for each pair of basis ('ZZ', 'ZX', 'XZ', 'XX'). 6: CHSH Value Calculation: The CHSH value is calculated using the formula: S = E(a,b)−E(a,b′)+E(a′,b)+E(a′,b′) where E(a,b) is the expectation value for measurements in bases a and b. It is calculated as: E(a,b) = (N_(00) ​+ N_(11)​ + N_(01) ​+ N_(10)) /​ N_(00) ​+ N_(11) ​− N_(01) ​− N_(10)​​ Here, N_(ij)​ represents the number of times the outcome ij was observed. 7: Data Visualization and Analysis: The results are visualized through a 3D scatter plot and a histogram, providing a comprehensive view of how often each combination of basis and outcomes occurs. Results: The CHSH inequality S value is: 2.0 Results dictionary: {'ZZ': {'00': 1, '01': 0, '10': 0, '11': 0}, 'ZX': {'00': 0, '01': 1, '10': 0, '11': 0}, 'XZ': {'00': 1, '01': 0, '10': 0, '11': 0}, 'XX': {'00': 1, '01': 0, '10': 0, '11': 0}} 3D Scatter Plot of Outcome Distributions: Each point represents an experiment run, with its position in the 3D space determined by the counts of the 00, 01, 10, and 11 outcomes. This visual gives a spatial representation of the measurement outcomes across different experiments. CHSH Inequality Violation w/ Histogram: The histogram here is a representation of the CHSH quantities calculated throughout the simulation. It provides a distribution of these quantities over the course of the experiment. For this single run we got a CHSH value of 2.0, which is at the very limit that classical theories can accommodate. In a real-world setting like this, factors such as noise, errors in quantum state preparation, and measurement could affect the results and thus this should be done many times. I only have 10 minutes a month on IBM's machines, so limited, but will do more rigorous runs. Just getting started. CODE: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from qiskit import QuantumCircuit, execute from qiskit_ibm_provider import IBMProvider import numpy as np import random from math import pi # Initialize the IBMProvider with your API key provider = IBMProvider(token='') # Insert your API key here backend = provider.get_backend('ibm_nairobi') config = backend.configuration() status = backend.status() print("Jobs in queue:", status.pending_jobs) def create_entangled_pair(qc, a, b): qc.h(a) qc. cx(a, b) def measure_in_basis(qc, a, b, basis): if basis == 'Z': pass elif basis == 'X': qc.h([a, b]) qc.measure([a, b], [a, b]) def get_random_basis_switcher(): return random.choice(['Z', 'X']) def get_random_basis_pi(): pi_digits = str(pi)[2:] digit = int(pi_digits[random.randint(0, len(pi_digits) - 1)]) return 'Z' if digit % 2 == 0 else 'X' def get_random_basis_user_input(): user_input = random.randint(0, 9) return 'Z' if user_input % 2 == 0 else 'X' def calculate_chsh_value(results): S = 0 for basis_combination, counts in results.items(): E_value = 0 total_counts = sum(counts.values()) if total_counts == 0: continue for outcome, count in counts.items(): sign = 1 if outcome in ['00', '11'] else -1 E_value += sign * (count / total_counts) sign = 1 if basis_combination in ['ZZ', 'XX'] else -1 S += sign * E_value return abs(S) num_experiments = 2 bases = ['Z', 'X'] results = {basis_a + basis_b: {} for basis_a in bases for basis_b in bases} randomizers = [get_random_basis_switcher, get_random_basis_pi, get_random_basis_user_input] for i in range(num_experiments): randomizer = random.choice(randomizers) for basis_a in bases: for basis_b in bases: qc = QuantumCircuit(2, 2) create_entangled_pair(qc, 0, 1) basis_a_switcher = randomizer() basis_b_switcher = randomizer() measure_in_basis(qc, 0, 1, basis_a_switcher + basis_b_switcher) job = execute(qc, backend, shots=1) result = job.result() counts = result.get_counts(qc) for outcome in ['00', '01', '10', '11']: if outcome not in results[basis_a + basis_b]: results[basis_a + basis_b][outcome] = counts.get(outcome, 0) else: results[basis_a + basis_b][outcome] += counts.get(outcome, 0) S_value = calculate_chsh_value(results) print(f"The CHSH inequality S value is: {S_value}") print(f"Results dictionary: {results}") # Plotting fig = plt.figure(figsize=(10, 8)) ax = fig.add_subplot(111, projection='3d') scatter = ax.scatter(list(range(4)), [sum(counts.values()) for counts in results.values()], [0]*4, c='b', alpha=0.6, edgecolors='w', s=80) ax.set_xticks(list(range(4))) ax.set_xticklabels(list(results.keys())) ax.set_xlabel('Basis Combinations') ax.set_ylabel('Total Counts') ax.set_zlabel('Z (Placeholder)') plt.title('3D Scatter Plot of Total Counts') plt.figure(figsize=(10, 6)) plt. bar(results.keys(), [sum(counts.values()) for counts in results.values()], color=['blue', 'aqua', 'green', 'red']) plt.xlabel('Bases') plt.ylabel('Total Counts') plt.title('Total Counts for Each Basis') plt. show() O-`

Saved - August 11, 2023 at 5:02 PM
reSee.it AI Summary
A conversation ensued regarding XRP holders' outcry in SEC enforcement. @jchervinsky praised @JohnEDeaton1 for their efforts, while @MattCorva criticized them for promoting conspiracy theories. @ComancheTippie and @gsglobalpro expressed their opinions, and @Kirby_Knows defended the need for mature discussion.

@jchervinsky - Jake Chervinsky

It's rare in the world of SEC enforcement to see public outcry register on a federal court docket in the way we've seen from XRP holders since December 2020, and @JohnEDeaton1 deserves a lot of credit for that, and for this brief. 👏 I look forward to reading the SEC's reply.

@JohnEDeaton1 - John E Deaton

Dedicated to #XRPHolders. It truly is a #Decentralized Community Brief.

@CryptoLawUS - CryptoLaw

🚨🚨BREAKING🚨🚨 JUST ADDED to our Document Library (1/2): ✅Motion for Leave by @JohnEDeaton1 and #XRPHolders to File Amicus Brief in Opposition to @SECGov's Motion for Summary Judgment + Exhibit (Text of Amicus Brief Seeking to Submit)👇 Link: https://www.crypto-law.us/wp-content/uploads/2022/10/10312022-MFL-Amicus-XRP-Holders.pdf

Page not found - CryptoLaw U.S. Legal and Regulatory News for Digital Asset Holders crypto-law.us

@MattCorva - Matt Corva

@jchervinsky @JohnEDeaton1 Odd choice to cheer for people who drive unfounded conspiracy theories that lead to financially motivated mobs terrorizing private citizens with unfounded accusations including calling private numbers to tell people they are coming after them, but to each their own.

@jchervinsky - Jake Chervinsky

@MattCorva @JohnEDeaton1 Hopefully it's obvious I'm not cheering for those things and don't support them.

@MattCorva - Matt Corva

@jchervinsky @JohnEDeaton1 I know you're not cheering for that behavior but hard to separate the two. Hard to support their cause when that nonsense is going on.

@ComancheTippie - Tippie 🦅

@MattCorva @jchervinsky @JohnEDeaton1 Mmhm

@EleanorTerrett - Eleanor Terrett

“…the SEC spent 18 months fighting six separate bench orders to turn them [Hinman docs] over, making it increasingly clear that their real behind-the-scenes confusion around tokens would be humiliating if it ever went public.” - @RoslynLayton https://www.forbes.com/sites/roslynlayton/2022/10/30/crypto-law-experts-suggest-sec-likely-to-lose-key-case-and-discredit-howey-test/

Crypto Law Experts Suggest SEC Likely To Lose Key Case And Discredit Howey Test Ripple is ready to settle and pay fine if SEC declares XRP a currency, says company lawyer. Agency credibility, Gensler reputation at stake. forbes.com

@gsglobalpro - GeeLovingLife.DLT

@MattCorva @jchervinsky @JohnEDeaton1 JAIL TIME FOR ALL THE ETHGATE FOLKS 📣📣📣📣🙌🙌

@gsglobalpro - GeeLovingLife.DLT

@MattCorva @jchervinsky @JohnEDeaton1 @mattcorva

@gsglobalpro - GeeLovingLife.DLT

@MattCorva @jchervinsky @JohnEDeaton1

@BrukerikkenavnJ - StaaalStaalesen.xrp☀🇳🇴

@MattCorva @jchervinsky @JohnEDeaton1 #ETHGATE #TheyAllBelongInJail

@dancraw23373570 - XRP.HODL

@MattCorva @jchervinsky @JohnEDeaton1

@XRPSAINT - @XRPSAINT 🪝 🏴‍☠️ Not$Advice, RT's ≠ endorsement

@MattCorva @jchervinsky @JohnEDeaton1

@Kirby_Knows - Kirby

@MattCorva @jchervinsky @JohnEDeaton1 There are plenty of personalities that would probably host you to discuss, if you can back this up. Plenty of terrible people breathe air, I don’t see anyone accusing air of supporting terrorism. Grow up.

View Full Interactive Feed