diff --git a/README.md b/README.md index bf9798e18..3616e1d7d 100644 --- a/README.md +++ b/README.md @@ -194,10 +194,8 @@ print(device.run(bell, s3_folder).result().measurement_counts) The code sample imports the Amazon Braket framework, then defines the execution environment as the AWSQuantumSimulator and the device to use. The `s3_folder` statement defines the Amazon S3 bucket for job output and the folder in the bucket to store job output. This folder is created when you run the job. It then creates a Bell Pair circuit, executes the circuit on the simulator and prints the results of the job. ### Available Simulators -There are currently three simulators available for Amazon Braket. To specify which simulator to use, change the code sample to replace the value for the `AwsQuantumSimulator` to one of the following values: +There is currently one AwsQuantumSimulator available: - `arn:aws:aqx:::quantum-simulator:aqx:qs1` – a Schrödinger simulator. Simulates exactly running a job on a quantum computer. Limit of 25 qubits. This simulator samples only from the state vector and outputs an array of bit strings that appears as though it came from a quantum computer. Does not provide a state vector. -- `arn:aws:aqx:::quantum-simulator:aqx:qs2` – a tensor network simulator. Provides an approximation of running a job on a quantum computer. -- `arn:aws:aqx:::quantum-simulator:aqx:qs3` – a Schrödinger simulator. Simulates exactly running a job on a quantum computer. Limit of 25 qubits. This simulator samples from the state vector but includes the entire state vector. This generates more data, and therefore incurs additional costs for storage of data in Amazon S3. #### To validate your configuration using a Python file 1. Open a text editor with example file `../braket-python-sdk/examples/bell.py`. diff --git a/src/braket/aws/aws_quantum_simulator_arns.py b/src/braket/aws/aws_quantum_simulator_arns.py index 3c2c7a36a..4e47c3ded 100644 --- a/src/braket/aws/aws_quantum_simulator_arns.py +++ b/src/braket/aws/aws_quantum_simulator_arns.py @@ -16,5 +16,3 @@ class AwsQuantumSimulatorArns(str, Enum): QS1 = "arn:aws:aqx:::quantum-simulator:aqx:qs1" - QS2 = "arn:aws:aqx:::quantum-simulator:aqx:qs2" - QS3 = "arn:aws:aqx:::quantum-simulator:aqx:qs3" diff --git a/test/integ_tests/test_device_creation.py b/test/integ_tests/test_device_creation.py index 3d87f048f..797f0b1d6 100644 --- a/test/integ_tests/test_device_creation.py +++ b/test/integ_tests/test_device_creation.py @@ -31,12 +31,7 @@ def test_device_across_regions(aws_session): @pytest.mark.parametrize( - "simulator_arn,simulator_name", - [ - (AwsQuantumSimulatorArns.QS1, "quantum-simulator-1"), - (AwsQuantumSimulatorArns.QS2, "quantum-simulator-2"), - (AwsQuantumSimulatorArns.QS3, "quantum-simulator-3"), - ], + "simulator_arn,simulator_name", [(AwsQuantumSimulatorArns.QS1, "quantum-simulator-1"),], ) def test_simulator_creation(simulator_arn, simulator_name, aws_session): simulator = AwsQuantumSimulator(simulator_arn, aws_session=aws_session) diff --git a/test/integ_tests/test_simulator_quantum_task.py b/test/integ_tests/test_simulator_quantum_task.py index 71b082e20..129034708 100644 --- a/test/integ_tests/test_simulator_quantum_task.py +++ b/test/integ_tests/test_simulator_quantum_task.py @@ -18,9 +18,7 @@ from braket.circuits import Circuit -@pytest.mark.parametrize( - "simulator_arn", [AwsQuantumSimulatorArns.QS1, AwsQuantumSimulatorArns.QS3] -) +@pytest.mark.parametrize("simulator_arn", [AwsQuantumSimulatorArns.QS1]) def test_bell_pair(simulator_arn, aws_session, s3_destination_folder): device = AwsQuantumSimulator(simulator_arn, aws_session) bell = Circuit().h(0).cnot(0, 1) @@ -31,9 +29,7 @@ def test_bell_pair(simulator_arn, aws_session, s3_destination_folder): assert len(result.measurements) == 750 -@pytest.mark.parametrize( - "simulator_arn", [AwsQuantumSimulatorArns.QS1, AwsQuantumSimulatorArns.QS3] -) +@pytest.mark.parametrize("simulator_arn", [AwsQuantumSimulatorArns.QS1]) def test_qubit_ordering(simulator_arn, aws_session, s3_destination_folder): device = AwsQuantumSimulator(simulator_arn, aws_session) @@ -46,26 +42,3 @@ def test_qubit_ordering(simulator_arn, aws_session, s3_destination_folder): state_001 = Circuit().i(0).i(1).x(2) result = device.run(state_001, s3_destination_folder).result() assert result.measurement_counts.most_common(1)[0][0] == "001" - - -def test_state_vector(aws_session, s3_destination_folder): - device = AwsQuantumSimulator(AwsQuantumSimulatorArns.QS3, aws_session) - bell = Circuit().h(0).cnot(0, 1) - state_vector = device.run(bell, s3_destination_folder, shots=1).result().state_vector - assert state_vector["00"] == complex(1 / math.sqrt(2), 0) - assert state_vector["01"] == 0 - assert state_vector["10"] == 0 - assert state_vector["11"] == complex(1 / math.sqrt(2), 0) - - -def test_qs2_quantum_task(aws_session, s3_destination_folder): - device = AwsQuantumSimulator(AwsQuantumSimulatorArns.QS2, aws_session) - - bell = Circuit().h(range(8)) - measurements = device.run(bell, s3_destination_folder, shots=1).result().measurements - - # 1 shot - assert len(measurements) == 1 - - # 8 qubits - assert len(measurements[0]) == 8