How aaronmcleancs/fidelitychain works
Main Components
• Blockchain Core: Represent the essential blockchain entities including Transaction, Block, and Blockchain (ledger update process).
• Quantum Components: Include components unique to the quantum-assisted consensus such as:
• QuantumRandomNumberGenerator (for random number generation using quantum circuits)
• QuantumHashFunction (for mapping data to quantum states)
• QuantumTeleportation (to share quantum states among nodes)
• FidelityChecker (for computing similarity metrics between quantum states)
• QuantumConsensusProtocol and QuantumConsensusNode (which coordinate and execute the quantum consensus process)
• Classical Components: Represent elements specific to the classical blockchain simulation:
• ClassicalConsensusNode
• ClassicalConsensusProtocol (which leverage proof-of-work)
• Simulation / CLI: The cli.py acts as an entry point for triggering simulations (both quantum and classical) and can be shown as the orchestration layer.
Relationships and Data Flow
• How the simulation initializes nodes (both quantum and classical) and distributes transactions.
• Parallel execution paths:
• In the quantum branch, emphasize the flow from quantum random number generation, candidate block creation, mapping blocks to quantum states, sharing these states between nodes, calculating fidelity, and finally selecting the winning block.
• In the classical branch, show how proof-of-work is computed to choose the block.
• Interactions where both protocols may run concurrently or be compared against one another to demonstrate advantages of the quantum approach over classical methods.
Architectural Patterns and Design Principles
• External Libraries and Dependencies: Indicate auxiliary dependencies such as Qiskit, Qiskit Aer, and NumPy as external modules that support quantum computations.
Relevant Technology and Framework Details
• Python: The project is implemented in Python 3.7+.
Specific Elements
• Labels: Clearly label blockchain core components, quantum-specific modules, classical consensus modules, and simulation control.
• From Transaction Generation → Block Creation → Quantum State Preparation.
• From Quantum State Sharing → Fidelity Calculation → Consensus decision.
• For the classical path, from Candidate Block → Proof-of-Work Verification → Consensus decision.