Added Phase Gates (Z, S, T): I integrated phase manipulation matrices using Python’s complex number notation (1j). This allows my simulator to rotate qubits along the Z-axis of the Bloch sphere, shifting the phase coefficients without altering immediate measurement probabilities.
Executed the Deutsch-Jozsa Algorithm: I verified the simulator’s computational accuracy by running a true quantum algorithm. Using a 3-qubit register and a balanced oracle constructed from my CNOT logic, the simulator successfully utilized phase kickback to identify the function as balanced in a single evaluation pass.
Implemented Non-Destructive Observables: I created get_expectation_value(), a method that calculates the theoretical average outcome of a specific qubit (0.0 to 1.0). It reads the state probabilities using Born’s rule without triggering a wavefunction collapse, keeping the superposition intact for debugging.
Built a High-Level Circuit Wrapper: I abstracted the raw matrix math behind a QuantumCircuit class API (similar to Qiskit). It queues gate instructions and automates running the simulator across multiple execution “shots.” A 1,000-shot test on an entangled system yielded a statistically sound 50/50 distribution (001 and 111), proving full framework stability.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.