Spaces:
Paused
Paused
File size: 663 Bytes
6d8ed8c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import logging
import adaptaqc.utils.circuit_operations as co
from adaptaqc.compilers import AdaptCompiler
logging.basicConfig()
logger = logging.getLogger("adaptaqc")
logger.setLevel(logging.INFO)
# Create circuit creating a random initial state
qc = co.create_random_initial_state_circuit(4)
adapt_compiler = AdaptCompiler(qc)
result = adapt_compiler.compile()
approx_circuit = result.circuit
print(f"Overlap between circuits is {result.overlap}")
print(f'{"-" * 32}')
print(f'{"-" * 10}OLD CIRCUIT{"-" * 10}')
print(f'{"-" * 32}')
print(qc)
print(f'{"-" * 32}')
print(f'{"-" * 10}ADAPT-AQC CIRCUIT{"-" * 10}')
print(f'{"-" * 32}')
print(approx_circuit)
|