I wrote a program to connect to IBM quantum to test looking for puzzle 66 and am currently connected to IBM_Kyoto Japan super computer with the free 10 minutes outcome unknown, is 10 minutes enough?. System puts you in and out of queue with 2 to 3 second snipets so the 10 minutes could take hours before any results if any. anyone who wants to try it go to my github page to download script/instructions
https://github.com/unclevito2017 If like me I have already tried everything
import qiskit
from qiskit import execute, Aer, IBMQ
from qiskit.circuit.library import PhaseOracle
from qiskit_ibm_provider import IBMProvider
from qiskit import QuantumCircuit
def sha256_compression_function(qc, message_bits, expression):
# Ensure the length of message_bits is 256
assert len(message_bits) == 256, "Message must be 256 bits long"
# Apply controlled-X gates based on the message bits
for i, bit in enumerate(message_bits[:32]):
if bit == '1' and i < 16: # Ensure i is within the valid range
qc.cx(i, 31) # Apply CX gate to qubit 16 with control qubit i
# Manually construct the boolean conditions from the expression
for i, char in enumerate(expression):
if char == '1' and i < 16: # Ensure i is within the valid range
qc.x(i) # Apply X gate to qubit i
# Apply the oracle to each qubit individually
for i in range(16):
qc.cx(i, 16) # Controlled-X gate with control qubit i and target qubit 16
qc.x(i) # Reset the control qubit qubit 16
def main():
# Load IBM Quantum account
IBMQ.load_account()
provider = IBMProvider() # No hub, group, or project parameters
# Target Bitcoin address
target_address_hex = "20d45a6a762535700ce9e0b216e31994335db8a5"
target_address_decimal = int(target_address_hex, 16)
# Define the range for iteration in hexadecimal
start_range = 0x2000000000000000
end_range = 0x3fffffffffffffff
# Iterate over the range
for decimal_value in range(int(start_range), int(end_range) + 1):
# Convert decimal value to bytes and binary string
hex_value = hex(decimal_value)[2:].zfill(32) # Ensure a fixed length of 32 characters
message_bytes = bytes.fromhex(hex_value)
binary_message = ''.join(format(byte, '08b') for byte in message_bytes)
binary_message = binary_message.zfill(256) # Pad to 256 bits
# Initialize quantum circuit with the initial state based on the binary message
qc = QuantumCircuit(32, 32, name="qc", global_phase=0)
# Apply bit operations to encode the initial state and message onto the qubits
for i, bit in enumerate(binary_message[:16]):
if bit == '1':
qc.x(i)
# Implement the SHA-256 compression function using a quantum oracle search for target address prefix 20d45
sha256_compression_function(qc, binary_message, expression="message[0] == '1' and message[1] == '0' and message[2] == '1' and message[3] == '1'")
# Measure the final state of the qubits
qc.measure_all()
# Use the IBM Quantum backend
backend = provider.get_backend('ibm_kyoto')
# Simulate the circuit on the IBM Quantum backend
job = execute(qc, backend=backend, shots=1024)
# Get the results and extract the final state
counts = job.result().get_counts(qc)
final_state = int(list(counts.keys())[0].replace(" ", ""), 2)
# Check if the generated hash matches the target address characters 10
if hex(final_state)[:10] == hex(target_address_decimal)[:10]:
print(f"Target address found!")
print(f"Decimal Value: {decimal_value}")
print(f"Simulated Bitcoin hash160: {hex(final_state)[2:].zfill(40)}")
break
else:
print("Target address not found within the specified range.")
if __name__ == "__main__":
main()
<a href="
https://ibb.co/zXfjbwB"><img src="
https://i.ibb.co/BysdjRQ/quantum.jpg" alt="quantum" border="0"></a>